I wonder if the wallet screwed up or if I am missing something in my bitcoin understanding.

Here is the tx output being spent:

    "value": 0.00180675,
                "n": 154,
                "scriptPubKey": {
                    "asm": "OP_HASH160 771962306e72e479245d48e879dd2a1862225b4c OP_EQUAL",
                    "hex": "a914771962306e72e479245d48e879dd2a1862225b4c87",
                    "address": "3CYkk3x1XUvdXCdHtRFdjMjp17PuJ8eR8z",
                    "type": "scripthash"

Here is the spending Input:

    "txid": "d80ff02d0d9eb2da8c8a1c47ab099901f447dd197e34220ea13eca72d7d6d21d",
                    "vout": 154,
                    "scriptSig": {
                        "asm": "002044c55c1da36a576217259c3bc21b0c3943f7eb3ff4e3c381d9fd3502434b9e87",
                        "hex": "22002044c55c1da36a576217259c3bc21b0c3943f7eb3ff4e3c381d9fd3502434b9e87"
                    "txinwitness": [
                    "sequence": 4294967295

2 Answers 2


SegWit introduced a compatibility mode usually called wrapped SegWit or nested SegWit. It allows you to create a P2SH output spendable using SegWit rules, which include the witness discount and malleability fix. It's slightly more expensive than native SegWit (which uses a new output type whose addresses start with bc1) because of the extra data included in the scriptSig, but it has the advantage of being supported in older software (which was especially useful after SegWit activation as some exchanges and wallets took years to implement sending to native SegWit).


You are looking at a transaction that spends wrapped-segwit (2-of-3 P2SH-P2WSH) inputs. Wrapped segwit was introduced as a bridging technology with segwit, because other than native segwit addresses, any sender that could already send to P2SH addresses was able to pay to them without an update and it allowed the receiver to immediately benefit from segwit improvements such as a reduced blockspace weight and the transaction malleability fix. In wrapped segwit inputs, the redeem script just checks the pre-image of the P2SH hash in the output, and then forwards to the witness stack for further validation.

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.