rundown of different scripts and what is what and what goes where.
- the
prevoutScriptis the script of the output being spend - the
redeemScriptis the script that is used to solve the P2SH - the
signatureScriptis the script that is taken into thesignatureHashfor signing - the
witnessRedeemScriptis the script that is used to solve the P2WSH - the
scriptSigis what goes into theinput.scriptSigwhen serializing the TX - the
witnessScriptis what goes into theinput.witnesswhen serializing the TX