Bitcoin

bitcoin core – How do I verify the signature in a P2WPKH transaction?

(assuming there is no OP_CODESEPERATOR)

For standard P2PKH, the signature digest is generated as follows:

new deal

Set TxOut well and set all TxIn scripts to empty. Insert the previous locking script into TxIn. Add the hash type code to the TxIn to sign twice the transaction SHA256. It becomes a digest.

What do I do to verify the signature of p2pwkh? It would be helpful if you could provide documentation or basic code related to the algorithm.

Related Articles

Back to top button