Re-exportsΒ§
pub use crate::error::ClaimIncomingContractError;pub use crate::error::CreateBolt11InvoiceError;pub use crate::error::GatewaySelectionError;pub use crate::error::LnSubscribeError;pub use crate::error::PayBolt11InvoiceError;pub use crate::error::PaymentInfoError;pub use crate::error::ReclaimLnReceiveError;pub use crate::error::SpendableAmountError;pub use fedimint_ln_common as common;
ModulesΒ§
- api
- cli
- db
- deprecated_
variant_ πhack - This is a hack to allow us to use the deprecated variant in the database without the serde derived implementation throwing warnings.
- error
- Error types of the lightning client.
- events
- incoming
- Incoming State Machine
- pay
- receive
- recurring
- Implements recurring payment codes (e.g. LNURL, BOLT12)
StructsΒ§
- Create
Bolt11 πInvoice ForUser Tweaked Request - Create
Bolt11 πInvoice Request - GetGateway
Request π - Lightning
Client Context - Lightning
Client Init - Lightning
Client Module - Client side lightning module
- Lightning
Operation Meta - Lightning
Operation Meta Pay - Mock
Gateway Connection - Outgoing
Lightning Payment - PayBolt11
Invoice πRequest - PayInvoice
Response - PayLightning
Address πRequest - Real
Gateway Connection - Reclaim
LnReceive πRequest - Scan
Receive πForUser Tweaked Request - Select
Available Gateway Request - Subscribe
Internal πPayRequest - Subscribe
LnClaim πRequest - Subscribe
LnPay πRequest - Subscribe
LnReceive πRequest
EnumsΒ§
- Gateway
Status - Internal
PayState - The high-level state of an pay operation internal to the federation,
started with
LightningClientModule::pay_bolt11_invoice. - Lightning
Child Keys - Lightning
Client State Machines - Lightning
Operation Meta Variant - Lightning
Payment Outcome - LnPay
State - The high-level state of a pay operation over lightning,
started with
LightningClientModule::pay_bolt11_invoice. - LnReceive
State - The high-level state of a reissue operation started with
LightningClientModule::create_bolt11_invoice. - PayType
- Payment
Info - A payment target parsed from user input: either a bolt11 invoice or the pay parameters resolved from an LNURL/lightning address.
- Receiving
Key - Where to receive the payment to, either to ourselves or to another user
- RpcError π
- A failure of an
lnmodule RPC request.
ConstantsΒ§
- DEFAULT_
INVOICE_ πEXPIRY_ TIME - MAX_
OUTGOING_ πCONTRACT_ TIMELOCK_ DELTA - Largest number of blocks an outgoing contractβs timelock may lie ahead of
the current block count, matching the
EXPIRATION_DELTA_LIMITof thefedimint-lnv2-client. The payee picks part of the delta through the invoiceβsmin_final_cltv_expiry_delta, so without a bound they could push the payerβs refund out arbitrarily far or overflow the timelock. - OUTGOING_
LN_ πCONTRACT_ TIMELOCK - Number of blocks until outgoing lightning contracts times out and user client can get refund
TraitsΒ§
FunctionsΒ§
- create_
incoming_ contract_ output - fetch_
and_ πvalidate_ offer - get_
invoice - Get LN invoice with given settings
- invoice_
has_ πinternal_ payment_ markers - invoice_
routes_ πback_ to_ federation - set_
payment_ πresult - tweak_
user_ key - Tweak a user key with an index, this is used to generate a new key for each invoice. This is done to not be able to link invoices to the same user.
- tweak_
user_ πsecret_ key - Tweak a secret key with an index, this is used to claim an unspent incoming contract.