1200wd / bitcoinlib

Bitcoin and other Cryptocurrencies Library for Python. Includes a fully functional wallet, Mnemonic key generation and management and connection with various service providers to receive and send blockchain and transaction information.
http://bitcoinlib.readthedocs.io/
GNU General Public License v3.0
596 stars 199 forks source link

I want to generate a taproot wallet, how do I do it? #358

Open chung1912 opened 8 months ago

chung1912 commented 8 months ago

w = Wallet.create("Wallet_taproot", keys=mnemonic, network='bitcoin',witness_type='taproot',db_uri='taproot.db') This will cause an error

xll970211 commented 8 months ago

348

you can try like this

wallet = Wallet.create("Wallet_taproot", network='bitcoin')
taproot = Address(wallet.get_key().address, script_type="p2tr", encoding='bech32').address
mccwdev commented 8 months ago

Taproot wallets are not supported at the moment. But it is currently under development.