Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 | 24x 24x 36x 36x 36x | const utils = require('ethereumjs-util');
module.exports = function getAddress(pubkey) {
const bytes = pubkey.startsWith('0x')
? Buffer.from(pubkey.replace('0x', ''), 'hex')
: Buffer.from(pubkey, 'base64');
const hash = utils.sha256(bytes).slice(0, 20);
return hash.toString('base64');
};
|