View definition

func SignatureScript(tx *MsgTx, idx int, subscript []byte, hashType SigHashType, privKey *PrivateKey, compress bool) ([]byte, error)

Defined in github.com/btcsuite/btcd/txscript/sign.go

Description

SignatureScript creates an input signature script for tx to spend BTC sent from a previous output to the owner of privKey. tx must include all transaction inputs and outputs, however txin scripts are allowed to be filled or empty. The returned script is calculated to be used as the idx’th txin sigscript for tx. subscript is the PkScript of the previous output being used as the idx’th input. privKey is serialized in either a compressed or uncompressed format based on compress. This format must match the same format used to generate the payment address, or the script validation will fail.

SignatureScript is referenced in 9 repositories

github.com/Stash-Crypto/btcd github.com/jongillham/btcd github.com/stevenroose/btcd

...