2

Is there a helper method from the new web3.js library to convert a CryptoKey into a base58 string

export const { privateKey, publicKey } = await createKeyPairFromBytes(
    keypairBytes
);

1 Answer 1

3

Yep, getAddressFromPublicKey

const addressBase58 = await getAddressFromPublicKey(publicKey)

https://solana-labs.github.io/solana-web3.js/functions/_solana_addresses.getAddressFromPublicKey.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.