Bitcoin

bitcoinjs – Broadcast ps2wsh transaction failed.

greeting,

I hope someone can guide me what the problem is with my p2wsh transaction hex below.

020000000001014cf3b8d35c7b67fa3b669900f2a42b2e8b8a90487c2fca2b913b4e9d24a7b94e5d00000000ffffffff01e80300000000000022002053461e7b7bebf5089234af05cc4bfa5447ec7a9bc611c1f8d47dfc570a0339430221876bf128fa0fe05d617494045dc8dc27a530ec4d9c80e8d35eac377bd9c4e5090024a821876bf128fa0fe05d617494045dc8dc27a530ec4d9c80e8d35eac377bd9c4e509008700000000

I tried decoding the hexadecimal number and got the result below.


"addresses": (
    "tb1qlwfxkadgkjykp24pcs699x3yx7egvm26khcpjheysknwv0ahh4zqmnc7xe",
    "tb1q2drpu7mma06s3y354uzucjl623r7c75mccgur7x50h79wzsr89psmcywrq"
),
"block_height": -1,
"block_index": -1,
"confirmations": 0,
"double_spend": false,
"fees": 1000,
"hash": "6ad4fce6043d8012105d6b2da5da3d8519124d8bf8c97fa5c1efad27a3dd72d9",
"inputs": (
    
        "addresses": (
            "tb1qlwfxkadgkjykp24pcs699x3yx7egvm26khcpjheysknwv0ahh4zqmnc7xe"
        ),
        "age": 2579745,
        "output_index": 93,
        "output_value": 2000,
        "prev_hash": "4eb9a7249d4e3b912bca2f7c48908a8b2e2ba4f20099663bfa677b5cd3b8f34c",
        "script_type": "pay-to-witness-script-hash",
        "sequence": 4294967295,
        "witness": (
            "876bf128fa0fe05d617494045dc8dc27a530ec4d9c80e8d35eac377bd9c4e50900",
            "a821876bf128fa0fe05d617494045dc8dc27a530ec4d9c80e8d35eac377bd9c4e5090087"
        )
    
),
"outputs": (
    
        "addresses": (
            "tb1q2drpu7mma06s3y354uzucjl623r7c75mccgur7x50h79wzsr89psmcywrq"
        ),
        "script": "002053461e7b7bebf5089234af05cc4bfa5447ec7a9bc611c1f8d47dfc570a033943",
        "script_type": "pay-to-witness-script-hash",
        "value": 1000
    
),
"preference": "low",
"received": "2024-02-28T06:29:26.761160172Z",
"relayed_by": "54.226.234.175",
"size": 168,
"total": 1000,
"ver": 2,
"vin_sz": 1,
"vout_sz": 1,
"vsize": 113

An error occurred when trying to broadcast the raw transaction hexadecimal number above.non-mandatory-script-verify-flag (script evaluated without error, but completed with false/empty top stack element)

I’m new to Bitcoin development and I’m still having trouble understanding it through examples.

Related Articles

Back to top button