Documentation ¶
Index ¶
- func Execute(privKeyBytes map[string][]byte, inputKeyBytes []byte, outputs []TxOutput, ...) error
- func Parse(script string) ([]byte, error)
- func StepScript(setupFunc func(func(*txscript.StepInfo) error) (*txscript.Engine, error), ...) (<-chan string, <-chan error)
- type SignFunc
- type TxOutput
- type WitnessGen
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute(privKeyBytes map[string][]byte, inputKeyBytes []byte, outputs []TxOutput, pkScripts [][]byte, scriptIndex int, witnessGen []WitnessGen, interactive, noStep bool, tags map[string]string, skipAhead int) error
Execute builds a tap leaf using the passed pkScript and executes it step by step with the provided witness.
privKeyBytes should map names of private keys given in the input witness to key bytes. An empty key will generate a random one.
If [input/output]KeyBytes is empty, a random key will be generated.
Types ¶
type SignFunc ¶
SignFunc should return a signature for the current input given the private key ID given as an argument.
type WitnessGen ¶
WitnessGen returns an element to place on the witness stack.
func ParseWitness ¶
func ParseWitness(witness string) ([]WitnessGen, error)
ParseWitness parses the given witness string and returns a slice of WitnessGen functions. Each function should provide the witness element at its index, given a function to optionally obtain a signature.
Signatures can be created by <sig:privkeyid> in the witness string, which will attempt to produce a signature from the key with name privkeyid.