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
Is your feature request related to a problem and use case? Please describe.
Sometimes a user wants to get the public key hash from a public key.
Describe the solution you'd like
tz1/ed25519 case
Given a public key: edpku61nGAwkeoA7PQJEFWmrVP1eWrSTVoHgCaF2isjWqDeGdux37k
I want a function that will give me the PKH: tz1ipB38oB5F76HnbTRqWPLEnVtCgj6yf2nB
tz2/secp256k1 case
Given a public key: sppk7czKu6So3zDWjhBPBv9wgCrBAfbEFoKYzEaKUsjhNr5Ug6E4Sn1
I want a function that will give me the PKH: tz2Gsf1Q857wUzkNGzHsJNC98z881UutMwjg
tz3/p256 case
Given a public key: p2pk67BANWUUX2fod9EQbv8ev7GGLpb4UXvLHEVVMiHBSWPHgyzf1tv
I want a function that will give me the PKH: tz3daYfTrShLBfH24hv2kGwXD5y2bApH83RC
Implementation details
In the @taquito/utils package, implement a helper function that will take a public key as a parameter and return the public key hash.
The function needs to support the 3 curves (ed25519, secp256k1, and p256).
Consider using the b58cdecode and b58cencode functions of the utils package and the hash function from '@stablelib/blake2b' library.
Describe alternatives you've considered
...
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem and use case? Please describe.
Sometimes a user wants to get the public key hash from a public key.
Describe the solution you'd like
tz1/ed25519 case
Given a public key:
edpku61nGAwkeoA7PQJEFWmrVP1eWrSTVoHgCaF2isjWqDeGdux37k
I want a function that will give me the PKH:
tz1ipB38oB5F76HnbTRqWPLEnVtCgj6yf2nB
tz2/secp256k1 case
Given a public key:
sppk7czKu6So3zDWjhBPBv9wgCrBAfbEFoKYzEaKUsjhNr5Ug6E4Sn1
I want a function that will give me the PKH:
tz2Gsf1Q857wUzkNGzHsJNC98z881UutMwjg
tz3/p256 case
Given a public key:
p2pk67BANWUUX2fod9EQbv8ev7GGLpb4UXvLHEVVMiHBSWPHgyzf1tv
I want a function that will give me the PKH:
tz3daYfTrShLBfH24hv2kGwXD5y2bApH83RC
Implementation details
In the @taquito/utils package, implement a helper function that will take a public key as a parameter and return the public key hash.
The function needs to support the 3 curves (ed25519, secp256k1, and p256).
Consider using the
b58cdecode
andb58cencode
functions of the utils package and thehash
function from '@stablelib/blake2b' library.Describe alternatives you've considered
...
The text was updated successfully, but these errors were encountered: