vhtlc

package module
v0.0.0-...-193e617 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	Sender                               *btcec.PublicKey
	Receiver                             *btcec.PublicKey
	Server                               *btcec.PublicKey
	PreimageHash                         []byte
	RefundLocktime                       arklib.AbsoluteLocktime
	UnilateralClaimDelay                 arklib.RelativeLocktime
	UnilateralRefundDelay                arklib.RelativeLocktime
	UnilateralRefundWithoutReceiverDelay arklib.RelativeLocktime
}

type VHTLCScript

type VHTLCScript struct {
	script.TapscriptsVtxoScript

	Sender                                 *btcec.PublicKey
	Receiver                               *btcec.PublicKey
	Server                                 *btcec.PublicKey
	ClaimClosure                           *script.ConditionMultisigClosure
	RefundClosure                          *script.MultisigClosure
	RefundWithoutReceiverClosure           *script.CLTVMultisigClosure
	UnilateralClaimClosure                 *script.ConditionCSVMultisigClosure
	UnilateralRefundClosure                *script.CSVMultisigClosure
	UnilateralRefundWithoutReceiverClosure *script.CSVMultisigClosure
	// contains filtered or unexported fields
}

func NewVHTLCScriptFromOpts

func NewVHTLCScriptFromOpts(opts Opts) (*VHTLCScript, error)

NewVHTLCScriptFromOpts creates a VHTLC VtxoScript from the given options.

func NewVhtlcScript

func NewVhtlcScript(
	preimageHash, claimLeaf, refundLeaf, refundWithoutReceiverLeaf, unilateralClaimLeaf,
	unilateralRefundLeaf, unilateralRefundWithoutReceiverLeaf string,
) (*VHTLCScript, error)

func (*VHTLCScript) Address

func (v *VHTLCScript) Address(hrp string) (string, error)

func (*VHTLCScript) ClaimTapscript

func (v *VHTLCScript) ClaimTapscript() (*waddrmgr.Tapscript, error)

ClaimTapscript computes the necessary script and control block to spend the claim closure

func (*VHTLCScript) GetRevealedTapscripts

func (v *VHTLCScript) GetRevealedTapscripts() []string

GetRevealedTapscripts returns all available scripts as hex-encoded strings

func (*VHTLCScript) Opts

func (v *VHTLCScript) Opts() Opts

func (*VHTLCScript) RefundTapscript

func (v *VHTLCScript) RefundTapscript(withReceiver bool) (*waddrmgr.Tapscript, error)

RefundTapscript computes the necessary script and control block to spend the refund closure, it does not return any checkpoint output script.

Jump to

Keyboard shortcuts

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