P2WPKH
P2WPKH is a type of Bitcoin transactions
bips/bip-0141.mediawiki at master · bitcoin/bips
scriptPubkey(locking script) is called witness program in Segwit world.
Witness program for p2wpkh
bips/bip-0141.mediawiki at master · bitcoin/bips
witness program looks like
$ 0x0014{20-byte-key-hash}
version: 00
OP_PUSHBYTES_20: 14
data: 20 byte hash of pubkey
p2wpkh は witness program は必ず 20byte で HASH160(pubkey)
witness looks like
$ {signature}{pubkey}
0204_Segwitの特徴と利用.pdf
script code
For P2WPKH witness program, the scriptCode is 0x1976a914{20-byte-pubkey-hash}88ac.
https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki