1

Can I convert an xPub key into a public key (address) using derivePath with @solana/web3.js?

1 Answer 1

2

The solana web3.js package does not contain utilities for deriving new addresses in the BIP sense, only for deriving "program addresses", so you'll have to use some other library to do it.

Feel free to search on npmjs.org for packages involving BIP39, BIP44, or BIP32 depending on what you need.

More information about program-derived addresses at https://docs.solana.com/developing/programming-model/calling-between-programs#program-derived-addresses

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.