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

Function payToPubKeyScript

txscript/standard.go:924–927  ·  view source on GitHub ↗

payToPubkeyScript creates a new script to pay a transaction output to a public key. It is expected that the input is a valid pubkey.

(serializedPubKey []byte)

Source from the content-addressed store, hash-verified

922// payToPubkeyScript creates a new script to pay a transaction output to a
923// public key. It is expected that the input is a valid pubkey.
924func payToPubKeyScript(serializedPubKey []byte) ([]byte, error) {
925 return NewScriptBuilder().AddData(serializedPubKey).
926 AddOp(OP_CHECKSIG).Script()
927}
928
929// PayToAddrScript creates a new script to pay a transaction output to a the
930// specified address.

Callers 1

PayToAddrScriptFunction · 0.85

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…