wallet-core icon indicating copy to clipboard operation
wallet-core copied to clipboard

Not support BTC Taproot address or SegWit address?

Open Sunshineyg00 opened this issue 1 year ago • 5 comments

Describe the bug When using TWBitcoinAddressIsValidString to verify a correct BTC Taproot address or a SegWit address, the return result is NO, which should be right.

To Reproduce Steps to reproduce the behavior:

  1. use the latest version TrustWalletCore (4.0.40)
  2. try to verify a BTC Taproot address and a SegWit address: NSLog(@"--== btc: %d", TWBitcoinAddressIsValidString(TWStringCreateWithUTF8Bytes(@"bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq".UTF8String))); NSLog(@"--== btc: %d", TWBitcoinAddressIsValidString(TWStringCreateWithUTF8Bytes(@"bc1p5d7rjq7g6rdk2yhzks9smlaqtedr4dekq08ge8ztwac72sfr9rusxg3297".UTF8String)));
  3. the results are both "NO"

Expected behavior The results are both "YES" as these are valid addresses.

Sunshineyg00 avatar Apr 29 '24 05:04 Sunshineyg00

Hi @Sunshineyg00, we're already working on this, thank you for noticing

satoshiotomakan avatar Apr 29 '24 07:04 satoshiotomakan

Hi @Sunshineyg00, we're already working on this, thank you for noticing

Thank you for your reply and your tremendous effort!

Sunshineyg00 avatar Apr 29 '24 08:04 Sunshineyg00

whats the status on this?

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

does not generate a valid taproot address

nftsupply avatar Jul 23 '24 14:07 nftsupply

Hi @nftsupply, @Sunshineyg00 we finished working on full BTC Rust migration, and P2TR address generation is coming soon. I'll give an update once it's ready for the production use

satoshiotomakan avatar Jul 30 '24 07:07 satoshiotomakan

Hi @nftsupply, @Sunshineyg00 we finished working on full BTC Rust migration, and P2TR address generation is coming soon. I'll give an update once it's ready for the production use

Why migration Rust is necessary? the Main SKD is in Rush? Amazing news!!

ronaldoguedess avatar Jul 30 '24 18:07 ronaldoguedess