How to use the @ethersproject/signing-key.computePublicKey function in @ethersproject/signing-key

To help you get started, we’ve selected a few @ethersproject/signing-key examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ethers-io / ethers.js / packages / transactions / lib / index.js View on Github external
function computeAddress(key) {
    var publicKey = signing_key_1.computePublicKey(key);
    return address_1.getAddress(bytes_1.hexDataSlice(keccak256_1.keccak256(bytes_1.hexDataSlice(publicKey, 1)), 12));
}
exports.computeAddress = computeAddress;
github ethers-io / ethers.js / packages / transactions / lib.esm / index.js View on Github external
export function computeAddress(key) {
    const publicKey = computePublicKey(key);
    return getAddress(hexDataSlice(keccak256(hexDataSlice(publicKey, 1)), 12));
}
export function recoverAddress(digest, signature) {

@ethersproject/signing-key

Elliptic curve library functions for the secp256k1 curve.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis