Is it possible to use the bitcoinlib Python library to create a function that takes a mnemonic phrase, a passphrase and an account number and returns the corresponding zpub (purpose=84)?
Something like this:
`from bitcoinlib.mnemonic import Mnemonic
from bitcoinlib.keys import HDKey
def get_zpub_from_mnemonic(mnemonic_phrase, password, account_num):
# Get the extended public key (zpub) for the account
return zpub
mnemonic_phrase = “abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about”
password = “my_password”
account_num = 0
zpub = get_zpub_from_mnemonic(mnemonic_phrase, password, account_num)
print(zpub)`
Sam Dassor is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.