Expand description
Payment-related types.
Structs§
- Attempt
- A payment attempt.
- Basic
MppPayment Data - Bolt04 basic MPP payment data record
- Current
Payment HopData - The decrypted hop data for the current hop, without the
next_hopfield. - HopHint
- A hop hint is a hint for a node to use a specific channel, usually used for the last hop to the target node.
- Payment
Custom Records - The custom records to be included in the payment.
The key is hex encoded of
u32, and the value is hex encoded ofVec<u8>with0xas prefix. - Payment
HopData - The data for a single hop in a payment route.
- Payment
Session - A payment session tracking the state of a payment attempt.
- Router
Hop - A router hop information for a payment, a paymenter router is an array of RouterHop,
a router hop generally implies hop
targetwill receiveamount_receivedwithchannel_outpointof channel. Improper hop hint may make payment fail, for example the specified channel do not have enough capacity. - Send
Payment Data - Data for sending a payment.
- Session
Route - The router is a list of nodes that the payment will go through.
We store in the payment session and then will use it to track the payment history.
The router is a list of nodes that the payment will go through.
For example:
A(amount, channel) -> B -> C -> Dmeans A will sendamountwithchannelto B. - Session
Route Node - The node and channel information in a payment route hop
- Timed
Result - A timed payment result for a channel direction, used to track success/failure history for probability-based routing.
- TlcErr
- Structured TLC error with error code and optional extra data.
- Trampoline
Context - Context for trampoline routing payments.
Enums§
- Attempt
Status - The status of a payment attempt.
- Direction
- The direction of a channel payment. Forward means from node_a to node_b; Backward means from node_b to node_a.
- Payment
Status - The status of a payment, will update as the payment progresses.
The transfer path for payment status is
Created -> Inflight -> Success | Failed. - TlcErr
Data - Extra data attached to a TLC error.
- TlcError
Code - Error codes for TLC (Time-Locked Contract) failures.
Constants§
- DEFAULT_
MAX_ PARTS - Default maximum number of parts for a multi-part payment.
- DEFAULT_
PAYMENT_ MPP_ ATTEMPT_ TRY_ LIMIT - Default retry limit per attempt in MPP mode.
- USER_
CUSTOM_ RECORDS_ MAX_ INDEX - 0 ~ 65535 is reserved for endpoint usage, index above 65535 is reserved for internal usage