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

Function payToScriptHashScript

txscript/standard.go:899–902  ·  view source on GitHub ↗

payToScriptHashScript creates a new script to pay a transaction output to a script hash. It is expected that the input is a valid hash.

(scriptHash []byte)

Source from the content-addressed store, hash-verified

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.
899func payToScriptHashScript(scriptHash []byte) ([]byte, error) {
900 return NewScriptBuilder().AddOp(OP_HASH160).AddData(scriptHash).
901 AddOp(OP_EQUAL).Script()
902}
903
904// payToWitnessPubKeyHashScript creates a new script to pay to a version 0
905// script hash witness program. The passed hash is expected to be valid.

Callers 2

PayToAddrScriptFunction · 0.70

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…