Support bech32 and bech32m (taproot) addresses in the query command

Coin.BECH32_HRP (plm, tplm, rplm) and a BIP173/BIP350 segwit decoder let
address_to_hashX read segwit addresses. The witness transaction fixtures are
no longer skipped.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
davideandClaude Sonnet 5.5 committed 2026-10-23 15:32:17 +02:00
1 parent 2ef6a7abcb
commit b7ce0efad1
6 files changed
+170 -10

No files matched your search

-2
View File
@@ -61,7 +61,5 @@ def test_transaction(transaction_details):
spk = vout[i]['scriptPubKey']
tx_pks = tx.outputs[i].pk_script
assert spk['hex'] == tx_pks.hex()
if spk['type'].startswith("witness_"):
continue # bech32 addresses are not supported by Coin.address_to_hashX
address, = spk["addresses"]
assert coin.address_to_hashX(address) == coin.hashX_from_script(tx_pks)