Documentation
¶
Index ¶
- Constants
- Variables
- func AddEmergencyKitMetadata(metadataText string, srcFile string, dstFile string) error
- func CreateInvoice(net *Network, userKey *HDPrivateKey, routeHints *RouteHints, ...) (string, error)
- func ErrorCode(err error) int64
- func ExposePreimage(paymentHash []byte) ([]byte, error)
- func GenerateRecoveryCode() string
- func GetRecoveryCodeVersion(code string) (int, error)
- func Init(c *Config)
- func IsInvoiceFulfillable(paymentHash, onionBlob []byte, amount int64, userKey *HDPrivateKey, ...) error
- func KeyEncrypt(privKey *HDPrivateKey, passphrase string) (string, error)
- func PersistInvoiceSecrets(list *InvoiceSecretsList) error
- func Scrypt256(data, salt []byte) []byte
- func ValidateRecoveryCode(code string) error
- func ValidateSubmarineSwap(rawInvoice string, userPublicKey *HDPublicKey, muunPublicKey *HDPublicKey, ...) error
- type BestRouteFees
- type BestRouteFeesList
- type ChallengePrivateKey
- func (k *ChallengePrivateKey) DecryptKey(decodedInfo *EncryptedPrivateKeyInfo, network *Network) (*DecryptedPrivateKey, error)
- func (k *ChallengePrivateKey) DecryptRawKey(encryptedKey string, network *Network) (*DecryptedPrivateKey, error)
- func (k *ChallengePrivateKey) PubKey() *ChallengePublicKey
- func (k *ChallengePrivateKey) PubKeyHex() string
- func (k *ChallengePrivateKey) SignSha(payload []byte) ([]byte, error)
- type ChallengePublicKey
- type Config
- type DecryptedKey
- type DecryptedPrivateKey
- type Decrypter
- type EKInput
- type EKOutput
- type EncryptedPrivateKeyInfo
- type Encrypter
- type FundingOutputPolicies
- type HDPrivateKey
- func (p *HDPrivateKey) Decrypter() Decrypter
- func (p *HDPrivateKey) DecrypterFrom(senderKey *PublicKey) Decrypter
- func (p *HDPrivateKey) DeriveTo(path string) (*HDPrivateKey, error)
- func (p *HDPrivateKey) DerivedAt(index int64, hardened bool) (*HDPrivateKey, error)
- func (p *HDPrivateKey) Encrypter() Encrypter
- func (p *HDPrivateKey) EncrypterTo(receiver *HDPublicKey) Encrypter
- func (p *HDPrivateKey) PublicKey() *HDPublicKey
- func (p *HDPrivateKey) Sign(data []byte) ([]byte, error)
- func (p *HDPrivateKey) String() string
- type HDPublicKey
- type IncomingSwap
- type Input
- type InputIncomingSwap
- type InputList
- type InputSubmarineSwapV1
- type InputSubmarineSwapV2
- type Invoice
- type InvoiceOptions
- type InvoiceSecrets
- type InvoiceSecretsList
- type Listener
- type MuunAddress
- type MuunPaymentURI
- type Network
- type Outpoint
- type Output
- type PartiallySignedTransaction
- func (p *PartiallySignedTransaction) FullySign(userKey, muunKey *HDPrivateKey) (*Transaction, error)
- func (p *PartiallySignedTransaction) Sign(userKey *HDPrivateKey, muunKey *HDPublicKey) (*Transaction, error)
- func (p *PartiallySignedTransaction) Verify(expectations *SigningExpectations, userPublicKey *HDPublicKey, ...) error
- type Payment
- type PaymentACK
- type PaymentDetails
- type PaymentRequest
- type PublicKey
- type RouteHints
- type SigningExpectations
- type SubmarineSwap
- type SubmarineSwapFundingOutput
- type SubmarineSwapReceiver
- type SwapFees
- type Transaction
- type X509Certificates
Constants ¶
const ( AddressVersionSwapsV1 = addresses.SubmarineSwapV1 AddressVersionSwapsV2 = addresses.SubmarineSwapV2 )
These constants are here for clients usage.
const ( // EncodedKeyLength is the size of a modern encoded key, as exported by the clients. EncodedKeyLength = 147 // EncodedKeyLengthLegacy is the size of a legacy key, when salt resided only in the 2nd key. EncodedKeyLengthLegacy = 136 )
const ( ErrUnknown = 1 ErrInvalidURI = 2 ErrNetwork = 3 ErrInvalidPrivateKey = 4 ErrInvalidDerivationPath = 5 ErrInvalidInvoice = 6 )
const MaxUnusedSecrets = 5
const PKEncryptionVersion = 1
const RecoveryCodeAlphabet = recoverycode.Alphabet
RecoveryCodeAlphabet contains all upper-case characters except for numbers/letters that look alike.
Variables ¶
var File_bip70_proto protoreflect.FileDescriptor
Functions ¶
func AddEmergencyKitMetadata ¶
AddEmergencyKitMetadata produces a copy of the PDF file at `srcFile` with embedded metadata, writing it into `dstFile`. The provided metadata must be the same opaque string produced by `GenerateEmergencyKitHTML`.
func CreateInvoice ¶
func CreateInvoice(net *Network, userKey *HDPrivateKey, routeHints *RouteHints, opts *InvoiceOptions) (string, error)
CreateInvoice returns a new lightning invoice string for the given network. Amount and description can be configured optionally.
func ExposePreimage ¶
ExposePreimage gives the preimage matching a payment hash if we have it
func GenerateRecoveryCode ¶
func GenerateRecoveryCode() string
GenerateRecoveryCode generates a new random recovery code using a cryptographically secure random number generator.
func GetRecoveryCodeVersion ¶
GetRecoveryCodeVersion returns the version for the recovery code given. If no version can be recognized, it returns an error.
func IsInvoiceFulfillable ¶
func IsInvoiceFulfillable(paymentHash, onionBlob []byte, amount int64, userKey *HDPrivateKey, net *Network) error
func KeyEncrypt ¶
func KeyEncrypt(privKey *HDPrivateKey, passphrase string) (string, error)
KeyEncrypt encrypts an HD priv key using a user-provided secret into a string We use SCrypt256 for key derivation and AES-CBC-PKCS7 for encryption. The returned string has information about version, derivation path, scrypt and AES parameters.
func PersistInvoiceSecrets ¶
func PersistInvoiceSecrets(list *InvoiceSecretsList) error
PersistInvoiceSecrets stores secrets registered with the remote server in the device local database. These secrets can be used to craft new Lightning invoices.
func ValidateRecoveryCode ¶
ValidateRecoveryCode returns an error if the recovery code is not valid or nil otherwise.
func ValidateSubmarineSwap ¶
func ValidateSubmarineSwap(rawInvoice string, userPublicKey *HDPublicKey, muunPublicKey *HDPublicKey, swap SubmarineSwap, originalExpirationInBlocks int64, network *Network) error
Types ¶
type BestRouteFees ¶
type BestRouteFeesList ¶
type BestRouteFeesList struct {
// contains filtered or unexported fields
}
func (*BestRouteFeesList) Add ¶
func (l *BestRouteFeesList) Add(f *BestRouteFees)
type ChallengePrivateKey ¶
type ChallengePrivateKey struct {
// contains filtered or unexported fields
}
func NewChallengePrivateKey ¶
func NewChallengePrivateKey(input, salt []byte) *ChallengePrivateKey
func RecoveryCodeToKey ¶
func RecoveryCodeToKey(code, salt string) (*ChallengePrivateKey, error)
RecoveryCodeToKey generates a challenge private key using the recovery code as a seed.
The salt parameter is only used for version 1 codes. It will be ignored for version 2+ codes.
func (*ChallengePrivateKey) DecryptKey ¶
func (k *ChallengePrivateKey) DecryptKey(decodedInfo *EncryptedPrivateKeyInfo, network *Network) (*DecryptedPrivateKey, error)
func (*ChallengePrivateKey) DecryptRawKey ¶
func (k *ChallengePrivateKey) DecryptRawKey(encryptedKey string, network *Network) (*DecryptedPrivateKey, error)
func (*ChallengePrivateKey) PubKey ¶
func (k *ChallengePrivateKey) PubKey() *ChallengePublicKey
func (*ChallengePrivateKey) PubKeyHex ¶
func (k *ChallengePrivateKey) PubKeyHex() string
type ChallengePublicKey ¶
type ChallengePublicKey struct {
// contains filtered or unexported fields
}
func NewChallengePublicKeyFromSerialized ¶
func NewChallengePublicKeyFromSerialized(serializedKey []byte) (*ChallengePublicKey, error)
func (*ChallengePublicKey) EncryptKey ¶
func (k *ChallengePublicKey) EncryptKey(privKey *HDPrivateKey, recoveryCodeSalt []byte, birthday int) (string, error)
type DecryptedKey ¶
type DecryptedKey struct {
Key *HDPrivateKey
Path string
}
func KeyDecrypt ¶
func KeyDecrypt(value, passphrase string, network *Network) (*DecryptedKey, error)
KeyDecrypt decrypts a key encrypted with KeyEncrypt
type DecryptedPrivateKey ¶
type DecryptedPrivateKey struct {
Key *HDPrivateKey
Birthday int
}
type EKInput ¶
type EKInput struct {
FirstEncryptedKey string
FirstFingerprint string
SecondEncryptedKey string
SecondFingerprint string
}
EKInput input struct to fill the PDF
type EKOutput ¶
EKOutput with the html as string and the verification code
func GenerateEmergencyKitHTML ¶
GenerateEmergencyKitHTML returns the translated html as a string along with the verification code and the kit metadata, represented in an opaque string. After calling this method, clients should use their Chromium/WebKit implementations to render the HTML into a PDF (better done there), and then come back to call `AddEmergencyKitMetadata` and produce the final PDF (better done here).
type EncryptedPrivateKeyInfo ¶
type EncryptedPrivateKeyInfo struct {
Version int
Birthday int
EphPublicKey string
CipherText string
Salt string
}
EncryptedPrivateKeyInfo is a Gomobile-compatible version of EncryptedPrivateKey using hex-encoding.
func DecodeEncryptedPrivateKey ¶
func DecodeEncryptedPrivateKey(encodedKey string) (*EncryptedPrivateKeyInfo, error)
type FundingOutputPolicies ¶
type HDPrivateKey ¶
HDPrivateKey is an HD capable priv key
func NewHDPrivateKey ¶
func NewHDPrivateKey(seed []byte, network *Network) (*HDPrivateKey, error)
NewHDPrivateKey builds an HD priv key from a seed for a given network
func NewHDPrivateKeyFromBytes ¶
func NewHDPrivateKeyFromBytes(rawKey, chainCode []byte, network *Network) (*HDPrivateKey, error)
NewHDPrivateKeyFromBytes builds an HD priv key from the compress priv and chain code for a given network
func NewHDPrivateKeyFromString ¶
func NewHDPrivateKeyFromString(str, path string, network *Network) (*HDPrivateKey, error)
NewHDPrivateKeyFromString creates an HD priv key from a base58-encoded string If the parsed key is public, it returns an error
func (*HDPrivateKey) Decrypter ¶
func (p *HDPrivateKey) Decrypter() Decrypter
func (*HDPrivateKey) DecrypterFrom ¶
func (p *HDPrivateKey) DecrypterFrom(senderKey *PublicKey) Decrypter
func (*HDPrivateKey) DeriveTo ¶
func (p *HDPrivateKey) DeriveTo(path string) (*HDPrivateKey, error)
func (*HDPrivateKey) DerivedAt ¶
func (p *HDPrivateKey) DerivedAt(index int64, hardened bool) (*HDPrivateKey, error)
DerivedAt derives a new child priv key, which may be hardened index should be uint32 but for java compat we use int64
func (*HDPrivateKey) Encrypter ¶
func (p *HDPrivateKey) Encrypter() Encrypter
func (*HDPrivateKey) EncrypterTo ¶
func (p *HDPrivateKey) EncrypterTo(receiver *HDPublicKey) Encrypter
func (*HDPrivateKey) PublicKey ¶
func (p *HDPrivateKey) PublicKey() *HDPublicKey
PublicKey returns the matching pub key
func (*HDPrivateKey) Sign ¶
func (p *HDPrivateKey) Sign(data []byte) ([]byte, error)
Sign a payload using the backing EC key
func (*HDPrivateKey) String ¶
func (p *HDPrivateKey) String() string
String return the key base58-encoded
type HDPublicKey ¶
HDPublicKey is an HD capable pub key
func NewHDPublicKeyFromString ¶
func NewHDPublicKeyFromString(str, path string, network *Network) (*HDPublicKey, error)
NewHDPublicKeyFromString creates an HD pub key from a base58-encoded string If the parsed key is private, it returns an error
func (*HDPublicKey) DeriveTo ¶
func (p *HDPublicKey) DeriveTo(path string) (*HDPublicKey, error)
func (*HDPublicKey) DerivedAt ¶
func (p *HDPublicKey) DerivedAt(index int64) (*HDPublicKey, error)
DerivedAt derives a new child pub key index should be uint32 but for java compat we use int64
func (*HDPublicKey) Fingerprint ¶
func (p *HDPublicKey) Fingerprint() []byte
Fingerprint returns the 4-byte fingerprint for this pubkey
func (*HDPublicKey) Raw ¶
func (p *HDPublicKey) Raw() []byte
Raw returns the backing EC compressed raw key
func (*HDPublicKey) String ¶
func (p *HDPublicKey) String() string
String return the key base58-encoded
type IncomingSwap ¶
type IncomingSwap struct {
FulfillmentTx []byte
MuunSignature []byte
Sphinx []byte
PaymentHash []byte
BlockHeight int64 // unused
HtlcTx []byte
OutputVersion int // unused
OutputPath string // unused
SwapServerPublicKey string
MerkleTree []byte // unused
HtlcExpiration int64
HtlcBlock []byte // unused
ConfirmationTarget int64 // to validate fee rate, unused for now
CollectInSats int64
}
func (*IncomingSwap) VerifyAndFulfill ¶
func (s *IncomingSwap) VerifyAndFulfill(userKey *HDPrivateKey, muunKey *HDPublicKey, net *Network) ([]byte, error)
type Input ¶
type Input interface {
OutPoint() Outpoint
Address() MuunAddress
UserSignature() []byte
MuunSignature() []byte
SubmarineSwapV1() InputSubmarineSwapV1
SubmarineSwapV2() InputSubmarineSwapV2
IncomingSwap() InputIncomingSwap
}
type InputIncomingSwap ¶
type InputSubmarineSwapV1 ¶
type InputSubmarineSwapV2 ¶
type Invoice ¶
type Invoice struct {
RawInvoice string
FallbackAddress *MuunPaymentURI
Network *Network
MilliSat string
Destination []byte
PaymentHash []byte
Expiry int64
Description string
Sats int64
}
Invoice is muun's invoice struct
type InvoiceOptions ¶
InvoiceOptions defines additional options that can be configured when creating a new invoice.
type InvoiceSecrets ¶
type InvoiceSecrets struct {
PaymentHash []byte
IdentityKey *HDPublicKey
UserHtlcKey *HDPublicKey
MuunHtlcKey *HDPublicKey
ShortChanId int64
// contains filtered or unexported fields
}
InvoiceSecrets represents a bundle of secrets required to generate invoices from the client. These secrets must be registered with the remote server and persisted in the client database before use.
type InvoiceSecretsList ¶
type InvoiceSecretsList struct {
// contains filtered or unexported fields
}
InvoiceSecretsList is a wrapper around an InvoiceSecrets slice to be able to pass through the gomobile bridge.
func GenerateInvoiceSecrets ¶
func GenerateInvoiceSecrets(userKey, muunKey *HDPublicKey) (*InvoiceSecretsList, error)
GenerateInvoiceSecrets returns a slice of new secrets to register with the remote server. Once registered, those invoices should be stored with the PersistInvoiceSecrets method.
func (*InvoiceSecretsList) Get ¶
func (l *InvoiceSecretsList) Get(i int) *InvoiceSecrets
Get returns the secret at the given index.
func (*InvoiceSecretsList) Length ¶
func (l *InvoiceSecretsList) Length() int
Length returns the number of secrets in the list.
type Listener ¶
type Listener interface {
OnDataChanged(tag string)
}
Listener is an interface implemented by the apps to receive notifications of data changes from the libwallet code. Each change is reported with a string tag identifying the type of change.
type MuunAddress ¶
func CreateAddressV1 ¶
func CreateAddressV1(publicKey *HDPublicKey) (MuunAddress, error)
CreateAddressV1 returns a P2PKH MuunAddress from a publicKey for use in TransactionSchemeV1
func CreateAddressV2 ¶
func CreateAddressV2(userKey, muunKey *HDPublicKey) (MuunAddress, error)
func CreateAddressV3 ¶
func CreateAddressV3(userKey, muunKey *HDPublicKey) (MuunAddress, error)
func CreateAddressV4 ¶
func CreateAddressV4(userKey, muunKey *HDPublicKey) (MuunAddress, error)
CreateAddressV4 returns a P2WSH MuunAddress from a user HD-pubkey and a Muun co-signing HD-pubkey.
type MuunPaymentURI ¶
type MuunPaymentURI struct {
Address string
Label string
Message string
Amount string
URI string
BIP70Url string
CreationTime string
ExpiresTime string
Invoice *Invoice
}
MuunPaymentURI is muun's uri struct
func DoPaymentRequestCall ¶
func DoPaymentRequestCall(url string, network *Network) (*MuunPaymentURI, error)
DoPaymentRequestCall builds a MuunPaymentUri from a url and a network. Handling BIP70 to 72
func GetPaymentURI ¶
func GetPaymentURI(rawInput string, network *Network) (*MuunPaymentURI, error)
GetPaymentURI builds a MuunPaymentURI from text (Bitcoin Uri, Muun Uri or address) and a network
type Network ¶
type Network struct {
// contains filtered or unexported fields
}
Network has the parameters for operating in a given Bitcoin network
type Output ¶
type Output struct {
Amount uint64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` // amount is integer-number-of-satoshis
Script []byte `protobuf:"bytes,2,opt,name=script,proto3" json:"script,omitempty"` // usually one of the standard Script forms
// contains filtered or unexported fields
}
Generalized form of "send payment to this/these bitcoin addresses"
func (*Output) Descriptor
deprecated
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type PartiallySignedTransaction ¶
type PartiallySignedTransaction struct {
// contains filtered or unexported fields
}
func NewPartiallySignedTransaction ¶
func NewPartiallySignedTransaction(inputs *InputList, rawTx []byte) (*PartiallySignedTransaction, error)
func (*PartiallySignedTransaction) FullySign ¶
func (p *PartiallySignedTransaction) FullySign(userKey, muunKey *HDPrivateKey) (*Transaction, error)
func (*PartiallySignedTransaction) Sign ¶
func (p *PartiallySignedTransaction) Sign(userKey *HDPrivateKey, muunKey *HDPublicKey) (*Transaction, error)
func (*PartiallySignedTransaction) Verify ¶
func (p *PartiallySignedTransaction) Verify(expectations *SigningExpectations, userPublicKey *HDPublicKey, muunPublickKey *HDPublicKey) error
type Payment ¶
type Payment struct {
MerchantData []byte `protobuf:"bytes,1,opt,name=merchant_data,json=merchantData,proto3" json:"merchant_data,omitempty"` // From PaymentDetails.merchant_data
Transactions [][]byte `protobuf:"bytes,2,rep,name=transactions,proto3" json:"transactions,omitempty"` // Signed transactions that satisfy PaymentDetails.outputs
RefundTo []*Output `protobuf:"bytes,3,rep,name=refund_to,json=refundTo,proto3" json:"refund_to,omitempty"` // Where to send refunds, if a refund is necessary
Memo string `protobuf:"bytes,4,opt,name=memo,proto3" json:"memo,omitempty"` // Human-readable message for the merchant
// contains filtered or unexported fields
}
func (*Payment) Descriptor
deprecated
func (*Payment) ProtoMessage ¶
func (*Payment) ProtoMessage()
func (*Payment) ProtoReflect ¶
func (x *Payment) ProtoReflect() protoreflect.Message
type PaymentACK ¶
type PaymentACK struct {
Payment *Payment `protobuf:"bytes,1,opt,name=payment,proto3" json:"payment,omitempty"` // Payment message that triggered this ACK
Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` // human-readable message for customer
// contains filtered or unexported fields
}
func (*PaymentACK) Descriptor
deprecated
func (*PaymentACK) Descriptor() ([]byte, []int)
Deprecated: Use PaymentACK.ProtoReflect.Descriptor instead.
func (*PaymentACK) ProtoMessage ¶
func (*PaymentACK) ProtoMessage()
func (*PaymentACK) ProtoReflect ¶
func (x *PaymentACK) ProtoReflect() protoreflect.Message
func (*PaymentACK) Reset ¶
func (x *PaymentACK) Reset()
func (*PaymentACK) String ¶
func (x *PaymentACK) String() string
type PaymentDetails ¶
type PaymentDetails struct {
Network string `protobuf:"bytes,1,opt,name=network,proto3" json:"network,omitempty"` // "main" or "test"
Outputs []*Output `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"` // Where payment should be sent
Time uint64 `protobuf:"varint,3,opt,name=time,proto3" json:"time,omitempty"` // Timestamp; when payment request created
Expires uint64 `protobuf:"varint,4,opt,name=expires,proto3" json:"expires,omitempty"` // Timestamp; when this request should be considered invalid
Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` // Human-readable description of request for the customer
PaymentUrl string `protobuf:"bytes,6,opt,name=payment_url,json=paymentUrl,proto3" json:"payment_url,omitempty"` // URL to send Payment and get PaymentACK
MerchantData []byte `protobuf:"bytes,7,opt,name=merchant_data,json=merchantData,proto3" json:"merchant_data,omitempty"` // Arbitrary data to include in the Payment message
// contains filtered or unexported fields
}
func (*PaymentDetails) Descriptor
deprecated
func (*PaymentDetails) Descriptor() ([]byte, []int)
Deprecated: Use PaymentDetails.ProtoReflect.Descriptor instead.
func (*PaymentDetails) ProtoMessage ¶
func (*PaymentDetails) ProtoMessage()
func (*PaymentDetails) ProtoReflect ¶
func (x *PaymentDetails) ProtoReflect() protoreflect.Message
func (*PaymentDetails) Reset ¶
func (x *PaymentDetails) Reset()
func (*PaymentDetails) String ¶
func (x *PaymentDetails) String() string
type PaymentRequest ¶
type PaymentRequest struct {
PaymentDetailsVersion uint32 `` /* 127-byte string literal not displayed */
PkiType string `protobuf:"bytes,2,opt,name=pki_type,json=pkiType,proto3" json:"pki_type,omitempty"` // none / x509+sha256 / x509+sha1
PkiData []byte `protobuf:"bytes,3,opt,name=pki_data,json=pkiData,proto3" json:"pki_data,omitempty"` // depends on pki_type
SerializedPaymentDetails []byte `` // PaymentDetails
/* 135-byte string literal not displayed */
Signature []byte `protobuf:"bytes,5,opt,name=signature,proto3" json:"signature,omitempty"` // pki-dependent signature
// contains filtered or unexported fields
}
func (*PaymentRequest) Descriptor
deprecated
func (*PaymentRequest) Descriptor() ([]byte, []int)
Deprecated: Use PaymentRequest.ProtoReflect.Descriptor instead.
func (*PaymentRequest) ProtoMessage ¶
func (*PaymentRequest) ProtoMessage()
func (*PaymentRequest) ProtoReflect ¶
func (x *PaymentRequest) ProtoReflect() protoreflect.Message
func (*PaymentRequest) Reset ¶
func (x *PaymentRequest) Reset()
func (*PaymentRequest) String ¶
func (x *PaymentRequest) String() string
type PublicKey ¶
type PublicKey struct {
// contains filtered or unexported fields
}
func NewPublicKeyFromBytes ¶
type RouteHints ¶
type RouteHints struct {
Pubkey string
FeeBaseMsat int64
FeeProportionalMillionths int64
CltvExpiryDelta int32
}
RouteHints is a struct returned by the remote server containing the data necessary for constructing an invoice locally.
type SigningExpectations ¶
type SigningExpectations struct {
// contains filtered or unexported fields
}
func NewSigningExpectations ¶
func NewSigningExpectations(destination string, amount int64, change MuunAddress, fee int64) *SigningExpectations
type SubmarineSwap ¶
type SubmarineSwap interface {
Invoice() string
Receiver() SubmarineSwapReceiver
FundingOutput() SubmarineSwapFundingOutput
PreimageInHex() string
}
type SubmarineSwapFundingOutput ¶
type SubmarineSwapFundingOutput interface {
ScriptVersion() int64
OutputAddress() string
OutputAmount() int64
ConfirmationsNeeded() int
ServerPaymentHashInHex() string
ServerPublicKeyInHex() string
UserLockTime() int64
// v1 only
UserRefundAddress() MuunAddress
// v2 only
ExpirationInBlocks() int64
UserPublicKey() *HDPublicKey
MuunPublicKey() *HDPublicKey
}
type SubmarineSwapReceiver ¶
type SwapFees ¶
type SwapFees struct {
RoutingFee int64
SweepFee int64
DebtType string
DebtAmount int64
ConfirmationsNeeded int64
}
func ComputeSwapFees ¶
func ComputeSwapFees(amount int64, bestRouteFees *BestRouteFeesList, policies *FundingOutputPolicies) *SwapFees
type Transaction ¶
type X509Certificates ¶
type X509Certificates struct {
Certificate [][]byte `protobuf:"bytes,1,rep,name=certificate,proto3" json:"certificate,omitempty"` // DER-encoded X.509 certificate chain
// contains filtered or unexported fields
}
func (*X509Certificates) Descriptor
deprecated
func (*X509Certificates) Descriptor() ([]byte, []int)
Deprecated: Use X509Certificates.ProtoReflect.Descriptor instead.
func (*X509Certificates) ProtoMessage ¶
func (*X509Certificates) ProtoMessage()
func (*X509Certificates) ProtoReflect ¶
func (x *X509Certificates) ProtoReflect() protoreflect.Message
func (*X509Certificates) Reset ¶
func (x *X509Certificates) Reset()
func (*X509Certificates) String ¶
func (x *X509Certificates) String() string
Source Files
¶
- V1.go
- V2.go
- V3.go
- V4.go
- address.go
- bip70.pb.go
- challenge_keys.go
- challenge_public_key.go
- emergency_kit.go
- encodings.go
- encrypt.go
- errors.go
- fees.go
- hdprivatekey.go
- hdpublickey.go
- incoming_swap.go
- init.go
- invoice.go
- invoices.go
- keycrypter.go
- network.go
- partiallysignedtransaction.go
- publickey.go
- recoverycode.go
- ripemd160.go
- scrypt.go
- segwit.go
- submarineSwap.go
- submarineSwapV1.go
- submarineSwapV2.go
