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
{{ message }}
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
I am trying to use ecRecover in 1.0.0-beta.50, not working!
I expected to get the recoveredAddress, but get Error
code is here
·
var account_address = '0x3Df7a01f4CE7d6F9870325B219647daFF3f3467c';
var message = '8dfe9be33ccb1c830e048219729e8c01f54c768004d8dc035105629515feb38e';
console.log(message.length);
var messageBuffer = new Buffer(message, 'hex');
console.log('message: ' + message);
web3.eth.personal.sign(message, account_address, '123456').then(result => {
console.log('signature: ' + result);
var pub = web3.eth.personal.ecRecover(message, result).then(recoveredAddress => {
console.log('recoveredAddress: ' + recoveredAddress);
console.log('isMatch: ' + recoveredAddress === account_address);
});
});
·
Error Logs
(node:8572) UnhandledPromiseRejectionWarning: Error: Invalid Arguments length: expected: 3, given: 2......
Versions
The text was updated successfully, but these errors were encountered: