txscriptw

package
v0.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 4, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcTaprootSigHash

func CalcTaprootSigHash(
	tx *wire.MsgTx,
	sigHashes *TaprootSigHashes,
	index int,
	hashType txscript.SigHashType,
) ([]byte, error)

CalcTaprootSigHash crafts signature digest. It only supports SIGHASH_ALL without ANYONECANPAY, and no annex or script paths.

func PayToAddrScript

func PayToAddrScript(address btcutil.Address) ([]byte, error)

PayToAddrScript uses txscript.PayToAddrScript for all cases except AddressTaprootKey, which is by this wrapper.

Types

type TaprootSigHashes

type TaprootSigHashes struct {
	HashPrevOuts      chainhash.Hash
	HashSequence      chainhash.Hash
	HashOutputs       chainhash.Hash
	HashAmounts       chainhash.Hash
	HashScriptPubKeys chainhash.Hash
}

TaprootSigHashes contains the sigHash parts for a PayToTaproot signature

func NewTaprootSigHashes

func NewTaprootSigHashes(tx *wire.MsgTx, prevOuts []*wire.TxOut) *TaprootSigHashes

NewTaprootSigHashes calculates and returns the TaprootSigHashes

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL