Documentation
¶
Index ¶
- type Opts
- type VHTLCScript
- func (v *VHTLCScript) Address(hrp string) (string, error)
- func (v *VHTLCScript) ClaimTapscript() (*waddrmgr.Tapscript, error)
- func (v *VHTLCScript) GetRevealedTapscripts() []string
- func (v *VHTLCScript) Opts() Opts
- func (v *VHTLCScript) RefundTapscript(withReceiver bool) (*waddrmgr.Tapscript, error)
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) 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.
Click to show internal directories.
Click to hide internal directories.