Documentation
¶
Index ¶
- func CreateWitnessScriptSubmarineSwapV1(refundAddress string, paymentHash []byte, swapServerPubKey []byte, ...) ([]byte, error)
- func CreateWitnessScriptSubmarineSwapV2(paymentHash, userPubKey, muunPubKey, swapServerPubKey []byte, ...) ([]byte, error)
- type KeyDescriptor
- type SubmarineSwap
- type SubmarineSwapFundingOutput
- type SubmarineSwapReceiver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyDescriptor ¶
type KeyDescriptor struct {
Key *hdkeychain.ExtendedKey
Path string
}
func (*KeyDescriptor) DeriveTo ¶
func (d *KeyDescriptor) DeriveTo(path string) (*hdkeychain.ExtendedKey, error)
type SubmarineSwap ¶
type SubmarineSwap struct {
Invoice string
Receiver SubmarineSwapReceiver
FundingOutput SubmarineSwapFundingOutput
PreimageInHex string
}
func (*SubmarineSwap) Validate ¶
func (swap *SubmarineSwap) Validate( rawInvoice string, userPublicKey *KeyDescriptor, muunPublicKey *KeyDescriptor, originalExpirationInBlocks int64, network *chaincfg.Params, ) error
type SubmarineSwapFundingOutput ¶
type SubmarineSwapFundingOutput struct {
ScriptVersion int64
OutputAddress string
OutputAmount int64
ConfirmationsNeeded int
ServerPaymentHashInHex string
ServerPublicKeyInHex string
UserLockTime int64 // TODO: not checked in v2?
// v1 only
UserRefundAddress *addresses.WalletAddress
// v2 only
ExpirationInBlocks int64
UserPublicKey *hdkeychain.ExtendedKey
MuunPublicKey *hdkeychain.ExtendedKey
KeyPath string
}
type SubmarineSwapReceiver ¶
Click to show internal directories.
Click to hide internal directories.