x402 Forge BundlesCatalog

Catalog / btc-tx-decode

Bitcoin transaction decoder

Turns a raw Bitcoin transaction in hex into its inputs, outputs, addresses, txid, size and fee-relevant weight, offline.

Benched Security-tested against the seller traps of our Agent Benchmark Exam.

Buy $1.00

What it does

Decodes a raw Bitcoin transaction (hex, up to 50000 bytes) offline, as Bitcoin Core's decoderawtransaction does: legacy and BIP-144 segwit serialization with canonical CompactSize checks, tried in Core's order (DecodeHexTx: the extended reading, then the legacy one), so zero-input transactions such as an unfunded createrawtransaction result are decoded as Core does; version as an unsigned 32-bit number. Txid, wtxid, sizes, weight, counts, the output total and the consensus checks cover the whole transaction; to keep the answer under 50 KB at most 20 inputs and 20 outputs are listed in detail, from index 0 or from input_offset / output_offset (inputs_start / outputs_start, inputs_truncated / outputs_truncated and a warning say what is left out), and listed script, witness and OP_RETURN hex is cut at 70 bytes with the full size given (witness_sizes for witness items). Input of exactly 32 bytes is refused without decoding (reason refused_32_bytes), because 32 bytes could be a private key; this includes the rare valid 32-byte transaction. Listed inputs (previous txid, vout, scriptSig, sequence, BIP-125 RBF signal, witness stack), outputs (value in satoshis and BTC as exact strings, script type p2pkh/p2sh/p2wpkh/p2wsh/p2tr/p2a/p2pk/multisig/op_return/witness_unknown/nonstandard and the address for the chosen network), locktime meaning, txid and wtxid (double SHA-256), size, BIP-141 weight and vsize. Incomplete hex (reason truncated), trailing bytes and non-canonical encodings give valid: false with a reason and byte offset. Decoding only: signatures, previous outputs, fees and confirmation status are not checked.

Example input
{"hex":"0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b00000000434104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac00000000","network":"mainnet"}
Answer
{"ok":true,"result":{"valid":true,"reason":null,"error_offset":null,"txid":"f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16","wtxid":"f4184fc596403b9d638783cf57adfe4c75c605f6356fbc91338530e9831e9e16","version":1,"segwit":false,"size":275,"base_size":275,"weight":1100,"vsize":275,"locktime":{"value":0,"type":"none","time_utc":null,"enforced":false},"coinbase":false,"rbf_signaled":false,"input_count":1,"output_count":2,"inputs_truncated":false,"outputs_truncated":false,"inputs_start":0,"outputs_start":0,"total_output_sats":"5000000000","total_output_btc":"50.00000000","inputs":[{"index":0,"txid":"0437cd7f8525ceed2324359c2d0ba26006d92d856a9c20fa0241106ee5a597c9","vout":0,"script_sig_hex":"47304402204e45e16932b8af514961a1d3a1a25fdf3f4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd12909d831cc56cbbac4622082221a8768d1d","script_sig_size":72,"script_sig_truncated":true,"sequence":4294967295,"rbf_signaling":false,"witness":[],"witness_sizes":[],"witness_count":0,"witness_truncated":false}],"outputs":[{"index":0,"value_sats":"1000000000","value_btc":"10.00000000","script_pubkey_hex":"4104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84cac","script_pubkey_size":67,"script_pubkey_truncated":false,"type":"p2pk","address":null,"witness_version":null,"hash_hex":null,"pubkeys":["04ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa28414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6cd84c"],"pubkey_count":1,"pubkeys_truncated":false,"required_sigs":1,"op_return_data_hex":null,"op_return_data_truncated":false},{"index":1,"value_sats":"4000000000","value_btc":"40.00000000","script_pubkey_hex":"410411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3ac","script_pubkey_size":67,"script_pubkey_truncated":false,"type":"p2pk","address":null,"witness_version":null,"hash_hex":null,"pubkeys":["0411db93e1dcdb8a016b49840f8c53bc1eb68a382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b64f9d4c03f999b8643f656b412a3"],"pubkey_count":1,"pubkeys_truncated":false,"required_sigs":1,"op_return_data_hex":null,"op_return_data_truncated":false}],"network":"mainnet","standard":"Bitcoin Core transaction serialization, BIP-144 (segwit), BIP-141 (weight), BIP-125 (RBF), BIP-173/BIP-350 (addresses)"},"warnings":[]}
Try it free
/try/btc-tx-decode

Buy

Price $1.00, once. One buyer only: the first one owns the tool, we stop selling it and list your copy, and every paid call to it goes to your wallet. Comes with a licence: run it, change it and earn from it; the code itself is not passed on or resold.

  1. Pay with an x402 walletThe buy link is https://forge.fizzl.eu/forge/packages/btc-tx-decode?format=zip. It answers with a payment request (HTTP 402) that an x402 wallet pays in USDC on Base. From Claude, ChatGPT or Grok with the Fizzl Agent Wallet: ask “buy https://forge.fizzl.eu/forge/packages/btc-tx-decode?format=zip”. From code:
    const pay = wrapFetchWithPayment(fetch, client); // see /llms.txt
    const zip = await pay("https://forge.fizzl.eu/forge/packages/btc-tx-decode?format=zip");
  2. Start it with your walletUnzip, npm install, then PAY_TO=0xYourWallet PUBLIC_URL=https://your-host npm start on any Node host.
  3. We list it for youYour copy tells us where it runs; we check it and add it to the x402 Trust Index and the Bazaar under your wallet.
Bought it, and something is wrong?

Paste the receipt you got with the purchase (the X-Forge-Receipt token; a bundle receipt works too) and say what is wrong. Free. We pick it up within the hour; a real fault is fixed, passes the same checks, and you download the new version free at /forge/packages/btc-tx-decode/update with your receipt. No money back through this form.

Missing a tool?

Tell us in one sentence what it should do: what goes in, what comes out. Free, no wallet. Our agents read every suggestion and build the useful ones in the next shift. Want it for sure? Order it for $1.