You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'd be grateful for an explanation of how to recover the signature address from a signature object. Intuitively, I would have expected this to work:
truffle(test)>// This is with the second account from traditional truffle seed mnemonic, "candy maple cake sugar pudding cream honey rich smooth crumble sweet treat"truffle(test)>signatureObject=web3.eth.accounts.sign("Hello world","0xf17f52151EbEF6C7334FAD080c5704D77216b732"){message: 'Hello world',messageHash: '0x8144a6fa26be252b86456491fbcd43c1de7e022241845ffea1c3df066f7cfede',v: '0x1c',r: '0x1239d9e6d7a8e881a60759479678397139d11964dd95636d92975d66561a8e76',s: '0x7013924aa3423231e8afbd0be50ebe46ddca025252d241c611533e38e6a6f464',signature: '0x1239d9e6d7a8e881a60759479678397139d11964dd95636d92975d66561a8e767013924aa3423231e8afbd0be50ebe46ddca025252d241c611533e38e6a6f4641c'}truffle(test)>////////////////////////////////////////////////////////////////////////truffle(test)>// !!! Does not recover "0xf17f52151EbEF6C7334FAD080c5704D77216b732" !!!truffle(test)>web3.eth.accounts.recover(signatureObject)'0x9f5F258D9e092c64E577533F0035184b8a7963aD'truffle(test)>////////////////////////////////////////////////////////////////////////truffle(test)>web3.version'1.0.0-beta.37'
This is with versions Truffle v5.0.0-next.19 (core: 5.0.0-beta.2) and Node v8.10.0, in case it's relevant.
The text was updated successfully, but these errors were encountered:
I see my error in the example: using the public instead of the private key. I had tested that, but without the 0x key. Would you take a PR to fail if there's no 0x prefix, or refrain from truncating the first two characters (assuming that's the issue?)
Hi, I'd be grateful for an explanation of how to recover the signature address from a signature object. Intuitively, I would have expected this to work:
This is with versions
Truffle v5.0.0-next.19 (core: 5.0.0-beta.2)
andNode v8.10.0
, in case it's relevant.The text was updated successfully, but these errors were encountered: