blockchainethereumsmart-contractssoliditytutorialdappweb3ethtruffleweb3jstransactionsigntransactionsignaturesign-datasignpublickeyprivatekeyethereum-identityencryptioncipher
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
429 B
14 lines
429 B
import { recoverPublicKey } from './recover-public-key';
|
|
import { toAddress as addressByPublicKey } from './public-key';
|
|
|
|
/**
|
|
* returns the adress with which the messageHash was signed
|
|
* @param {string} sigString
|
|
* @param {string} hash
|
|
* @return {string} address
|
|
*/
|
|
export function recover(sigString, hash) {
|
|
var pubkey = recoverPublicKey(sigString, hash);
|
|
var address = addressByPublicKey(pubkey);
|
|
return address;
|
|
} |