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

Function payToWitnessScriptHashScript

txscript/standard.go:906–908  ·  view source on GitHub ↗

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

(scriptHash []byte)

Source from the content-addressed store, hash-verified

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.
906func payToWitnessScriptHashScript(scriptHash []byte) ([]byte, error) {
907 return NewScriptBuilder().AddOp(OP_0).AddData(scriptHash).Script()
908}
909
910// payToWitnessTaprootScript creates a new script to pay to a version 1
911// (taproot) witness program. The passed hash is expected to be valid.

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…