We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Piece of code to prepare hash for KeyChain
const keyname = 'test1@76de427d42c38be4'; const message = '12345'; const prefix = "\x19Ethereum Signed Message:\n" + message.length; const messageHash = web3.utils.sha3(prefix + message).substr(2); const result = await keychain.signHash(messageHash, keyname);
Example messageHash: 0xffdc74e2c931e2639c9642e818d04d9e13ce814360876d99c8738521cb0502bf
KeyChain result: f9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc01
Web3 const privateKey = '0xb3d3427eea7867c243baaf2f4c67a9551eea2ea96556acfb0051dffa18d182d4'; web3.eth.accounts.sign('12345', privateKey) result:
{ message: '12345', messageHash: '0xffdc74e2c931e2639c9642e818d04d9e13ce814360876d99c8738521cb0502bf', v: '0x1c', r: '0xf9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b', s: '0x58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc', signature: '0xf9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc1c' }
Web3 result: '0xf9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc1c'
The last byte in signature is different What can be done to make the last bytes the same?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Piece of code to prepare hash for KeyChain
Example messageHash: 0xffdc74e2c931e2639c9642e818d04d9e13ce814360876d99c8738521cb0502bf
KeyChain result:
f9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc01
Web3
const privateKey = '0xb3d3427eea7867c243baaf2f4c67a9551eea2ea96556acfb0051dffa18d182d4';
web3.eth.accounts.sign('12345', privateKey) result:
Web3 result: '0xf9d5c73b846d85b13ca588338a98002babaf5581c3bcea87b71cc811ee31d85b58cc4ed45bcb5a4c902f9b2b246c3caefa33138e97dbc4fd446c4b7d0df65bfc1c'
The last byte in signature is different
What can be done to make the last bytes the same?
The text was updated successfully, but these errors were encountered: