0

Type of transaction: p2wpkh transaction creating a multisig (p2wsh) on signet.

Error:TX must have atleast one inputs.

Output on online decoder

{
    "addresses": [
        "tb1q94nuuw96ye4x3u8hc3nga8g02kzvdknug49ucgmgh70l7yqn29ts56cl57",
        "tb1q6ajhfx4xvscts4m9hhk7ujy0tl3us25wu97pkv"
    ],
    "block_height": -1,
    "block_index": -1,
    "confirmations": 0,
    "double_spend": false,
    "fees": 0,
    "hash": "0fa2e7ac35739d727d1298922906127cdfe04040b98051f06314dc137d319a41",
    "inputs": [
        {
            "age": 0,
            "output_index": 365,
            "prev_hash": "e748d035309c2f7312176789f6fbe77a20582733817ed66b19fc675bfc1c4208",
            "script_type": "empty",
            "sequence": 4294967295
        }
    ],
    "lock_time": 2888877058,
    "outputs": [
        {
            "addresses": [
                "tb1q94nuuw96ye4x3u8hc3nga8g02kzvdknug49ucgmgh70l7yqn29ts56cl57"
            ],
            "script": "00202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157",
            "script_type": "pay-to-witness-script-hash",
            "value": 1000000
        },
        {
            "addresses": [
                "tb1q6ajhfx4xvscts4m9hhk7ujy0tl3us25wu97pkv"
            ],
            "script": "0014d765749aa66430b85765bdedee488f5fe3c82a8e",
            "script_type": "pay-to-witness-pubkey-hash",
            "value": 8093449
        }
    ],
    "preference": "low",
    "received": "2024-02-09T10:13:35.159062502Z",
    "relayed_by": "3.235.156.159",
    "size": 202,
    "total": 9093449,
    "ver": 2,
    "vin_sz": 1,
    "vout_sz": 2,
    "vsize": 145
}

Manual decoding

nVersion
02000000

marker
00

flag
01

txin
01
08421cfc5b67fc196bd67e81332758207ae7fbf689671712732f9c3035d048e7 // 32 bytes (txid reversed little endian)
6d010000
00
ffffffff

txout
02
40420f0000000000 
22 00202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157 // 34 bytes script  
097f7b0000000000
16 0014d765749aa66430b85765bdedee488f5fe3c82a8e // scriptpubkey for change

witness
02
473045022100a5faff9808555961e9ff213550b365ef86b993e07116fe445f27594f96f8798c022067571f9e0050f6c7e50057dd0e628613dffe1b573f48697019b6aa0fe97d658e01
2102c430ac1cb8ea090e63d171df5502ed5815ba579c6b38dd13e069e96816e4d247

nLocktime
00000000

Output of an accepted transaction

{
    "addresses": [
        "tb1qzeuvnr6u39npxdaxmhhxwwn68w5rplwet350nr",
        "tb1qk3qesjjnpztf2fs3r80haq9uddnw495f96w9tk5mdxyz8htuxu9qcwcurs"
    ],
    "block_height": -1,
    "block_index": -1,
    "confirmations": 0,
    "double_spend": false,
    "fees": 0,
    "hash": "33128f3a32d65c30f5bb4d4c2419f4c4e5c9c601e091c180e17592bda0ad10b3",
    "inputs": [
        {
            "age": 0,
            "output_index": 0,
            "prev_hash": "71e6a41254dc239a285e5cbf5cded15e099e18989b10ee10e23daed9e5fe052f",
            "script_type": "empty",
            "sequence": 4294967295
        }
    ],
    "outputs": [
        {
            "addresses": [
                "tb1qk3qesjjnpztf2fs3r80haq9uddnw495f96w9tk5mdxyz8htuxu9qcwcurs"
            ],
            "script": "0020b441984a53089695261119df7e80bc6b66ea96892e9c55da9b698823dd7c370a",
            "script_type": "pay-to-witness-script-hash",
            "value": 1000000
        },
        {
            "addresses": [
                "tb1qzeuvnr6u39npxdaxmhhxwwn68w5rplwet350nr"
            ],
            "script": "00141678c98f5c89661337a6ddee673a7a3ba830fdd9",
            "script_type": "pay-to-witness-pubkey-hash",
            "value": 888318652
        }
    ],
    "preference": "low",
    "received": "2024-02-09T10:17:43.206930294Z",
    "relayed_by": "18.213.115.114",
    "size": 235,
    "total": 889318652,
    "ver": 2,
    "vin_sz": 1,
    "vout_sz": 2,
    "vsize": 153
}

Raw transaction

0200000000010108421cfc5b67fc196bd67e81332758207ae7fbf689671712732f9c3035d048e76d01000000ffffffff0240420f00000000002200202d67ce38ba266a68f0f7c4668e9d0f5584c6da7c454bcc2368bf9fff10135157097f7b0000000000160014d765749aa66430b85765bdedee488f5fe3c82a8e02473045022100a5faff9808555961e9ff213550b365ef86b993e07116fe445f27594f96f8798c022067571f9e0050f6c7e50057dd0e628613dffe1b573f48697019b6aa0fe97d658e012102c430ac1cb8ea090e63d171df5502ed5815ba579c6b38dd13e069e96816e4d24700000000

1 Answer 1

2

The signature is 72 bytes long, but the signature witness item is prepended with the byte 0x47 (71), not 0x48 (72). The decoder then interprets the last byte of the signature (the sighash flag, 0x01) as the length of the second witness item, and parses it as 0x21. The next 4 bytes (0x02c430ac, converted to decimal as 2888877058) are interpreted as the locktime, and that's where the transaction is supposed to end. Apparently BlockCypher silently ignores any remaining bytes.

If you replace the 0x47 byte with 0x48, the transaction will decode correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.