I am trying to sign a message using the following code:ethJsUtil.ecsign(ethJsUtil.sha256(msg),new Buffer('0x...'))
Where 0x... is my private key taken from MyEtherWallet. It gives the error in the title both with and without the 0x at the beginning
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.
Sign up to join this communityethJsUtil.ecsign(ethJsUtil.sha256(msg),ethJsUtil.toBuffer('0x...'))
works.
new Buffer
was returning an empty buffer
Basically you pasted:
node ./keygen.js 0xdd0c9ec256a7e76a6693a0d2dea01a6de6b7dfeaf3afcaef7b95647758c79c1a
Instead of:
node ./keygen.js dd0c9ec256a7e76a6693a0d2dea01a6de6b7dfeaf3afcaef7b95647758c79c1a