Documentation ¶
Index ¶
- Constants
- func AddWrappedInvoice(p *WrappedPaymentRequest) (string, error)
- func CancelWrappedInvoice(hash []byte, wrapped_invoice string)
- func Init(macaroonHex string, lndHostStr string, tlsCertPath string, invCh chan Status, ...) error
- func SettleWrappedInvoice(p *WrappedPaymentRequest, paid_msat uint64, wrapped_invoice string, ...)
- func WatchWrappedInvoice(p *WrappedPaymentRequest, wrapped_invoice string, original_invoice string, ...)
- func Wrap(invoice string, max_fee_msat uint64) (string, error)
- type PaymentRequest
- type Status
- type WrappedPaymentRequest
Constants ¶
View Source
const ( EXPIRY_BUFFER = 300 FEE_BASE_MSAT = 4000 FEE_PPM = 9000 MIN_AMOUNT_MSAT = 100000 CLTV_DELTA_ALPHA = 3 CLTV_DELTA_BETA = 6 // Should be set to the same as the node's `--max-cltv-expiry` setting (default: 2016) MAX_CLTV_DELTA = 2016 )
Variables ¶
This section is empty.
Functions ¶
func AddWrappedInvoice ¶
func AddWrappedInvoice(p *WrappedPaymentRequest) (string, error)
func CancelWrappedInvoice ¶
func SettleWrappedInvoice ¶
func SettleWrappedInvoice(p *WrappedPaymentRequest, paid_msat uint64, wrapped_invoice string, original_invoice string, max_fee_msat uint64)
func WatchWrappedInvoice ¶
func WatchWrappedInvoice(p *WrappedPaymentRequest, wrapped_invoice string, original_invoice string, max_fee_msat uint64)
Types ¶
type PaymentRequest ¶
type PaymentRequest struct { PaymentHash string `json:"payment_hash"` Timestamp int64 `json:"timestamp,string"` Expiry int64 `json:"expiry,string"` Description string `json:"description"` DescriptionHash string `json:"description_hash"` NumMsat uint64 `json:"num_msat,string"` CltvExpiry int64 `json:"cltv_expiry,string"` Features map[string]struct { Name string `json:"name"` IsRequired bool `json:"is_required"` IsKnown bool `json:"is_known"` } `json:"features"` }
func DecodePaymentRequest ¶
func DecodePaymentRequest(invoice string) (*PaymentRequest, error)
type WrappedPaymentRequest ¶
type WrappedPaymentRequest struct { Memo string `json:"memo,omitempty"` Hash []byte `json:"hash"` ValueMsat uint64 `json:"value_msat,string"` DescriptionHash []byte `json:"description_hash,omitempty"` Expiry int64 `json:"expiry,string"` CltvExpiry int64 `json:"cltv_expiry,string"` }
func WrapPaymentRequest ¶
func WrapPaymentRequest(p *PaymentRequest, max_fee_msat uint64) (*WrappedPaymentRequest, error)
Click to show internal directories.
Click to hide internal directories.