MCPcopy Create free account
hub / github.com/btcsuite/btcd / payToWitnessPubKeyHashScript

Function payToWitnessPubKeyHashScript

txscript/standard.go:893–895  ·  view source on GitHub ↗

payToWitnessPubKeyHashScript creates a new script to pay to a version 0 pubkey hash witness program. The passed hash is expected to be valid.

(pubKeyHash []byte)

Source from the content-addressed store, hash-verified

891// payToWitnessPubKeyHashScript creates a new script to pay to a version 0
892// pubkey hash witness program. The passed hash is expected to be valid.
893func payToWitnessPubKeyHashScript(pubKeyHash []byte) ([]byte, error) {
894 return NewScriptBuilder().AddOp(OP_0).AddData(pubKeyHash).Script()
895}
896
897// payToScriptHashScript creates a new script to pay a transaction output to a
898// script hash. It is expected that the input is a valid hash.

Callers 2

PayToAddrScriptFunction · 0.85
computeWitnessPkScriptFunction · 0.85

Calls 4

NewScriptBuilderFunction · 0.85
AddDataMethod · 0.80
AddOpMethod · 0.80
ScriptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…