vault

package module
v0.0.0-...-e4f4683 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidScript                         = errors.New("invalid script")
	ErrParsingFailed                         = errors.New("parsing failed")
	ErrInvalidNetwork                        = errors.New("invalid network")
	ErrFailedToSign                          = errors.New("failed to sign")
	ErrFailedToSignAndCollectSigs            = errors.New("failed to sign and collect sigs")
	ErrInvalidPsbt                           = errors.New("invalid psbt")
	ErrNoTapScriptSigs                       = errors.New("no tap script sigs")
	ErrFailedToAggregateTapScriptSigs        = errors.New("failed to aggregate tap script sigs")
	ErrFailedToFinalizePsbtAndExtractTx      = errors.New("failed to finalize psbt and extract tx")
	ErrFailedToBuildCustodianOnlyUnlockingTx = errors.New("failed to build custodian only unlocking tx")
)

Functions

func AggregateTapScriptSigs

func AggregateTapScriptSigs(psbtBytes []byte, tapScriptSigsMap go_utils.TapScriptSigsMap) ([]byte, error)

func BuildCustodianOnlyUnstakingTx

func BuildCustodianOnlyUnstakingTx(tag []byte, serviceTag []byte, version uint8, network types.NetworkKind, inputs []types.PreviousOutpoint, outputs []types.UnlockingOutput, custodianPubKeys []types.PublicKey, custodianQuorum uint8, rbf bool, feeRate uint64) ([]byte, error)

func BuildPoolingRedeemTx

func BuildPoolingRedeemTx(tag []byte,
	serviceTag []byte,
	version uint8,
	network types.NetworkKind,
	inputs []types.PreviousOutpoint,
	outputs []types.UnlockingOutput,
	custodianPubKeys []types.PublicKey,
	custodianQuorum uint8,
	rbf bool,
	feeRate uint64,
	sessionSequence uint64,
	custodianGroupUID []byte,
) ([]byte, error)

func CustodiansOnlyLockingScript

func CustodiansOnlyLockingScript(custodianPubKeys []types.PublicKey, custodianQuorum uint8) ([]byte, error)

func EncodePoolingRedeemParams

func EncodePoolingRedeemParams(tag []byte,
	serviceTag []byte,
	version uint8,
	network types.NetworkKind,
	inputs []types.PreviousOutpoint,
	outputs []types.UnlockingOutput,
	custodianPubKeys []types.PublicKey,
	custodianQuorum uint8,
	rbf bool,
	feeRate uint64,
	sessionSequence uint64,
	custodianGroupUID []byte,
) []byte

func FinalizePsbtAndExtractTx

func FinalizePsbtAndExtractTx(psbtBytes []byte) ([]byte, error)

func ParseVaultEmbeddedData

func ParseVaultEmbeddedData(scriptPubkey []byte) (*types.VaultReturnTxOutput, error)

ParseVaultEmbeddedData parses the script pubkey and returns the vault return transaction output

func SignPsbtAndCollectSigs

func SignPsbtAndCollectSigs(psbt []byte, privkey []byte, network types.NetworkKind) (types.TapScriptSigsMapType, error)

func SignPsbtBySingleKey

func SignPsbtBySingleKey(psbt []byte, privkey []byte, network types.NetworkKind, finalize bool) ([]byte, error)

Types

type ByteBuffer

type ByteBuffer struct {
	Data []byte
	Len  int
}

Directories

Path Synopsis
tests
cmd

Jump to

Keyboard shortcuts

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