rundown of different scripts and what is what and what goes where.
- the
prevoutScript
is the script of the output being spend - the
redeemScript
is the script that is used to solve the P2SH - the
signatureScript
is the script that is taken into thesignatureHash
for signing - the
witnessRedeemScript
is the script that is used to solve the P2WSH - the
scriptSig
is what goes into theinput.scriptSig
when serializing the TX - the
witnessScript
is what goes into theinput.witness
when serializing the TX
prevoutScript
= OP_DUP OP_HASH160 <{20byte}pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGsignatureScript
= OP_DUP OP_HASH160 <{20byte}pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGscriptSig
= <sig> <pubkey>
prevoutScript
= OP_HASH160 <{20byte}scriptHash> OP_EQUALredeemScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGsignatureScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGscriptSig
= <sigs> <redeemScript>
prevoutScript
= OP_0 PUSH[<{20byte}pubkeyHash>]signatureScript
= OP_DUP OP_HASH160 <{20byte}pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGscriptSig
= ''witnessScript
= <sig> <pubkey>
prevoutScript
= OP_HASH160 <{20byte}scriptHash> OP_EQUALredeemScript
= OP_0 PUSH[<{20byte}pubkeyHash>]signatureScript
= OP_DUP OP_HASH160 <pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGscriptSig
= <redeemScript>witnessScript
= <sig> <pubkey>
prevoutScript
= OP_0 PUSH[<{32byte}pubkeyHash>]redeemScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGsignatureScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGscriptSig
= ''witnessScript
= <sigs> <redeemScript>
prevoutScript
= OP_HASH160 <{20byte}scriptHash> OP_EQUALredeemScript
= OP_0 PUSH[<{32byte}scriptHash>]witnessRedeemScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGsignatureScript
= OP_1 <pubkey1> <pubkey2> OP_2 OP_CHECKMULTISIGscriptSig
= <redeemScript>witnessScript
= <sigs> <witnessRedeemScript>
prevoutScript
= OP_HASH160 <{20byte}scriptHash> OP_EQUALredeemScript
= OP_0 PUSH[<{32byte}scriptHash>]witnessRedeemScript
= OP_DUP OP_HASH160 <pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGsignatureScript
= OP_DUP OP_HASH160 <pubkeyHash> OP_EQUALVERIFY OP_CHECKSIGscriptSig
= <redeemScript>witnessScript
= <sig> <pubkey> <witnessRedeemScript>