Documentation ¶
Overview ¶
Package template provides a collection of functions and types for working with script templates.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Evaluate ¶
Evaluate processes a given Bitcoin script by parsing it, replacing certain opcodes with the public key hash, and returning the resulting script as a byte array. Will replace any OP_PUBKEYHASH or OP_PUBKEY
Parameters: - script: A byte array representing the input script. - pubKey: A pointer to a bec.PublicKey which provides the dedicated public key to be used in the evaluation.
Returns: - A byte array representing the evaluated script, or nil if an error occurs.
Types ¶
type OutputTemplate ¶
OutputTemplate represents the script and satoshis for a Pike output
func P2PKH ¶
func P2PKH(satoshis uint64) (*OutputTemplate, error)
P2PKH creates a single output with the PIKE template