Skip to content

Instantly share code, notes, and snippets.

View maxidev's full-sized avatar

Maxi maxidev

View GitHub Profile
@maxidev
maxidev / notary-tx.js
Created January 31, 2018 01:20
Create notary transaction using Bitsignjs
//Require Bitsign's library
const bitsignjs = require('bitsignjs');
//Instantiate the library with your access token
let api = bitsignjs.init('d22..83');
api.transactions.notarizeTx({
address: '0x16E843402d1bEe260D5464C927A6A0DC11b0384f',
data: '<some_hexa_data>',
password: '<your_password>'
}).then(data => console.log(data))
@maxidev
maxidev / escrow-contract.js
Created January 31, 2018 01:27
Escrow type contract creation
//Require Bitsign's library
const bitsignjs = require('bitsignjs');
//Instantiate the library with your access token
let api = bitsignjs.init('d2..83');
api.contracts.deploy({
password: '<your_password>',
type: 'Escrow',
"args": {
"_buyer": "<buyer_address>",

Keybase proof

I hereby claim:

  • I am maxidev on github.
  • I am maxidev (https://keybase.io/maxidev) on keybase.
  • I have a public key whose fingerprint is 9849 3304 C8EC C9C1 0DFB 293C 8A97 C544 5008 4A4D

To claim this, I am signing this object:

var ethUtil = require('ethereumjs-util');
var ethTx = require('ethereumjs-tx');
var privkey = "";
var privBuff = new Buffer(privkey, "hex");
var msg = ethUtil.sha3("The Times 03/Jan/2009 Chancellor on brink of second bailout for banks");
var sign = ethUtil.ecsign(msg, privBuff);
console.log(sign);
var signedHash = ethUtil.toRpcSig(sign.v, sign.r, sign.s);
var sigDecoded = ethUtil.fromRpcSig(signedHash);

Keybase proof

I hereby claim:

  • I am maxidev on github.
  • I am maxidev (https://keybase.io/maxidev) on keybase.
  • I have a public key ASAHulndivX_55vMdYP1Fa0iwHNzUyw5sX9olmk5Bhsa-wo

To claim this, I am signing this object: