trustwallet / wallet-core

Cross-platform, cross-blockchain wallet library.
https://developer.trustwallet.com/wallet-core
Apache License 2.0
2.76k stars 1.56k forks source link

Taproot Address Generation Failure #3951

Closed nftsupply closed 1 month ago

nftsupply commented 1 month ago

// Generate Wrapped SegWit address (BIP49)

let wrappedSegwitKey = wallet.getKey(coin: .bitcoin, derivationPath: "m/49\'/0\'/0\'/0/0")
let wrappedSegwitAddress = btcCoin.deriveAddress(privateKey: wrappedSegwitKey)

// Generate Taproot address (BIP86)
let taprootKey = wallet.getKey(coin: .bitcoin, derivationPath: "m/86\'/0\'/0\'/0/0")
let taprootAddress = btcCoin.deriveAddress(privateKey: taprootKey)

this does not generate a valid taproot address, what is the proper way to get the taproot address and what is the proper way to get the xpub of the master fingerprint

satoshiotomakan commented 1 month ago

Close due to the duplication https://github.com/trustwallet/wallet-core/issues/3821