scriptPubKey
though, is modified fromscriptSig
can spend them. So even without the signatures, old nodes will consider such transactions valid. New nodes interpret the first push as the witness version and the second push as the witness program.ScriptPubKey
from a public key simply use PubKey.WitHash
instead of PubKey.Hash
.TransactionBuilder
" section, and does not differ in any way from the code used to sign a P2PKH output.witness
data is similar to the scriptSig
of P2PKH, and the scriptSig
data is empty: