Skip to content

Instantly share code, notes, and snippets.

@jim380
Created August 19, 2018 09:02
Show Gist options
  • Save jim380/d6b6d1accc66b87927fb0ca6daf7e9d5 to your computer and use it in GitHub Desktop.
Save jim380/d6b6d1accc66b87927fb0ca6daf7e9d5 to your computer and use it in GitHub Desktop.
let msg = web3.sha3(_from,_to,_value,_fee,nonce)
let signature = web3.eth.sign(_from, msg)
let r = signature.slice(0, 66)
let s = '0x' + signature.slice(66, 130)
let v = '0x' + signature.slice(130, 132)
v = web3.toDecimal(v)
console.log('r', r)
console.log('s', s)
console.log('v', v)
console.log(msg)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment