buildPublicKeyHashOut
scrypt-ts-opcat / Script / buildPublicKeyHashOut
Function: buildPublicKeyHashOut()
buildPublicKeyHashOut(
to
):Script
Defined in: node_modules/@opcat-labs/opcat/types/script/script.d.cts:398
Builds a standard P2PKH (Pay-to-Public-Key-Hash) script for a given recipient.
Parameters
to
Recipient's public key, address, or address string
Returns
A P2PKH script with the format: OP_DUP OP_HASH160 <pubKeyHash> OP_EQUALVERIFY OP_CHECKSIG
Throws
If 'to' argument is undefined or invalid type