Documentation
¶
Index ¶
- func NewClient(key, url string) lightning.Client
- func NewInvoice() lightning.Invoicer
- type Client
- func (c *Client) CreateInvoice(amount int64, memo string) (lightning.Invoicer, error)
- func (c Client) GetPaymentStatus(payment_hash string) (payment lightning.Payment, err error)
- func (c Client) InvoiceStatus(paymentHash string) (lightning.Payment, error)
- func (c *Client) Pay(paymentRequest string) (wtx lightning.Invoicer, err error)
- func (c Client) Status() (wtx Wallet, err error)
- type Error
- type InvoiceParams
- type LNbitsPayment
- type PayParams
- type PaymentDetails
- type PaymentParams
- type Payments
- type TransferParams
- type Wallet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInvoice ¶
Types ¶
type Client ¶
func (*Client) CreateInvoice ¶
Invoice creates an invoice associated with this wallet.
func (Client) GetPaymentStatus ¶
Payment state of a payment
func (Client) InvoiceStatus ¶
Payment state of a payment
type InvoiceParams ¶
type InvoiceParams struct { Out bool `json:"out"` // must be True if invoice is paid, False if invoice is received Amount int64 `json:"amount"` // amount in Satoshi Memo string `json:"memo,omitempty"` // the invoice memo. Webhook string `json:"webhook,omitempty"` // the webhook to fire back to when payment is received. DescriptionHash string `json:"description_hash,omitempty"` // the invoice description hash. UnhashedDescription string `json:"unhashed_description,omitempty"` // the unhashed invoice description. }
type LNbitsPayment ¶
type LNbitsPayment struct { Paid bool `json:"paid"` Preimage string `json:"preimage"` Details PaymentDetails `json:"details,omitempty"` }
func (LNbitsPayment) GetPreimage ¶
func (p LNbitsPayment) GetPreimage() string
func (LNbitsPayment) IsPaid ¶
func (p LNbitsPayment) IsPaid() bool
type PaymentDetails ¶
type PaymentDetails struct { CheckingID string `json:"checking_id"` Pending bool `json:"pending"` Amount int64 `json:"amount"` Fee uint64 `json:"fee"` Memo string `json:"memo"` Time int `json:"time"` Bolt11 string `json:"bolt11"` Preimage string `json:"preimage"` PaymentHash string `json:"payment_hash"` Extra struct{} `json:"extra"` WalletID string `json:"wallet_id"` Webhook interface{} `json:"webhook"` WebhookStatus interface{} `json:"webhook_status"` }
type PaymentParams ¶
type Payments ¶
type Payments []PaymentDetails
type TransferParams ¶
Click to show internal directories.
Click to hide internal directories.