Files
coruna-lab/app
root 30357c108f fix(chain): support Taproot (bech32m/BIP350) in BtcAddress validation + scriptPubKey
BtcAddress::bech32Verify only checked the bech32 (BIP173) checksum
constant (=== 1), so valid Taproot addresses (bc1p, witness v1,
bech32m, const 0x2bc830a3) failed checksum verification and were
rejected as 'Invalid to address' by TransferService.

- bech32Verify now returns the detected encoding ('bech32' | 'bech32m' | null)
- decodeBech32 enforces BIP350 version<->encoding consistency
  (v0 must be bech32, v1+ must be bech32m)
- scriptPubKey adds the P2TR (v1 + 32-byte) branch: OP_1 <32> = 5120...
- bech32Checksum/bech32Encode pick the correct constant per witness
  version so Taproot encoding round-trips correctly

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-02 19:28:00 +00:00
..
2026-09-30 04:04:12 +08:00
2026-09-29 05:25:55 +08:00
2026-09-29 05:25:55 +08:00
2026-09-20 06:15:26 +08:00
2026-09-26 12:27:12 +08:00
2026-09-19 01:03:23 +08:00