Module bitcoin

Source
Expand description

Lightning and Bitcoin primitives.

Structs§

Amount
A non-negative Bitcoin amount in satoshis. Serialized as a string-encoded decimal to avoid floating-point precision loss (e.g. "1234.567").
Invoice
A BOLT 11 Lightning invoice. Serialized as a bech32-encoded string (e.g. "lnbc1...").
LnurlPayRequest
The validated and parsed LNURL-pay request (“payRequest”).
LnurlPayRequestMetadata
The metadata inside a LnurlPayRequest.
LnurlWithdrawRequest
LUD-03 LNURL-withdraw request.
Offer
A Lightning BOLT12 offer.
Txid
A Bitcoin transaction ID. Serialized as a 64-character hex string in conventional (reversed) byte order, e.g. "a1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d".

Enums§

ClaimMethod
A single “claim method” – each kind here should correspond with a single linear (inbound) payment flow for a user, where there are no other alternate methods.
ConfirmationPriority
Transaction confirmation priority for on-chain payments: "high" (~1 block), "normal" (~3 blocks), or "background" (~72 blocks).
PaymentMethod
A single “payment method” – each kind here should correspond with a single linear (outbound) payment flow for a user, where there are no other alternate methods.