meherett / python-hdwallet

Python-based library for the implementation of a hierarchical deterministic wallet generator for more than 140+ multiple cryptocurrencies.
https://hdwallet.readthedocs.io
MIT License
451 stars 150 forks source link

How do I generate a Taproot Bech32m address #84

Open lusharenck opened 1 year ago

lusharenck commented 1 year ago

How do I generate a Taproot Bech32m address

jjhesk commented 9 months ago

Lets have more detail about this. I am trying to generate an Taproot address with this package. As we know that the taproot address has a specific format starting with bc1q... with another library that does the work like this..

from bitcoinlib.wallets import Wallet

passphrase = 'input display smile visa surround learn solar hero vacuum parrot cigar devote'

w = Wallet.create("Wallet11", witness_type='segwit', keys=passphrase, network='bitcoin')
WalletKeys = (w.get_keys(number_of_keys=10))
# bech32 address (p2wpkh)
for k in WalletKeys:
    print(k.address)

it is a part of bech32 address (p2wpkh)

jjhesk commented 7 months ago

The above is not correct. I will need some more assistance.