(Assume there’s no OP_CODESEPERATOR)
For standard P2PKH, the signature digest is generated this way:
NewTransaction
settle the TxOuts well
set all TxIn scripts to empty
insert the Previous Locking Script into the TxIn you are signing
append hash type code to the end of the transaction
SHA256 twice this transaction
Be a digest.
What does one do for signature verification of p2pwkh?
It would be helpful if you can provide with some docs related to algorithm or some basic code would also be appreciated










