Documentation
¶
Index ¶
- Variables
- func AddConditionWitness(inIndex int, ptx *psbt.Packet, witness wire.TxWitness) error
- func AddCosignerKey(inIndex int, ptx *psbt.Packet, key *btcec.PublicKey) error
- func AddTaprootTree(inIndex int, ptx *psbt.Packet, leaves []string) error
- func AddVtxoTreeExpiry(inIndex int, ptx *psbt.Packet, vtxoTreeExpiry arklib.RelativeLocktime) error
- func AnchorOutput() *wire.TxOut
- func ExtractWithAnchors(p *psbt.Packet) (*wire.MsgTx, error)
- func FindAnchorOutpoint(tx *wire.MsgTx) (*wire.OutPoint, error)
- func GetConditionWitness(in psbt.PInput) (wire.TxWitness, error)
- func GetCosignerKeys(in psbt.PInput) ([]*btcec.PublicKey, error)
- func GetTaprootTree(in psbt.PInput) ([]string, error)
- func GetVtxoTreeExpiry(in psbt.PInput) (*arklib.RelativeLocktime, error)
- func ReadTxWitness(witnessSerialized []byte) (wire.TxWitness, error)
- type TapTree
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ANCHOR_PKSCRIPT = []byte{ 0x51, 0x02, 0x4e, 0x73, } ANCHOR_VALUE = int64(0) )
View Source
var ( COSIGNER_PSBT_KEY_PREFIX = []byte("cosigner") CONDITION_WITNESS_KEY_PREFIX = []byte("condition") VTXO_TREE_EXPIRY_PSBT_KEY = []byte("expiry") VTXO_TAPROOT_TREE_KEY = []byte("taptree") )
Functions ¶
func AddConditionWitness ¶
func AddCosignerKey ¶
func AddTaprootTree ¶
AddTaprootTree adds the whole taproot tree of the VTXO to the given PSBT input. it follows the format of PSBT_OUT_TAP_TREE / BIP-371
func AddVtxoTreeExpiry ¶
func AnchorOutput ¶
func ExtractWithAnchors ¶
ExtractWithAnchors extracts the final witness and scriptSig from psbt fields and ignores anchor inputs without failing.
func GetTaprootTree ¶
GetTaprootTree returns the taproot tree of the given PSBT input.
func GetVtxoTreeExpiry ¶
func GetVtxoTreeExpiry(in psbt.PInput) (*arklib.RelativeLocktime, error)
Types ¶
type TapTree ¶
type TapTree []string
TapTree is a wrapper around a list of tapscripts it is used to encode and decode the taproot tree in a way that is compatible with the PSBT_OUT_TAP_TREE field / BIP-371
func DecodeTapTree ¶
Click to show internal directories.
Click to hide internal directories.