PaymentAttempt

sealed class PaymentAttempt

Types

PaymentAborted
Link copied to clipboard
common

When we exhaust our retry attempts without success or encounter a non-recoverable error, we abort the payment. Once we're in that state, we wait for all the pending child payments to settle.

PaymentInProgress
Link copied to clipboard
common
data class PaymentInProgress(request: SendPayment, attemptNumber: Int, trampolinePayload: OutgoingPaymentHandler.PaymentAttempt.TrampolinePayload, pending: Map<UUID, Pair<OutgoingPayment.Part, SharedSecrets>>, ignore: Set<ByteVector32>, failures: List<Either<ChannelException, FailureMessage>>) : OutgoingPaymentHandler.PaymentAttempt

While a payment is in progress, we listen to child payments failures. When we receive failures, we retry the failed amount with different routes/fees.

PaymentSucceeded
Link copied to clipboard
common
data class PaymentSucceeded(request: SendPayment, preimage: ByteVector32, parts: List<OutgoingPayment.Part>, pending: Map<UUID, Pair<OutgoingPayment.Part, SharedSecrets>>) : OutgoingPaymentHandler.PaymentAttempt

Once we receive a first fulfill for a child payment, we can consider that the whole payment succeeded (because we received the payment preimage that we can use as a proof of payment). Once we're in that state, we wait for all the pending child payments to fulfill.

TrampolinePayload
Link copied to clipboard
common
data class TrampolinePayload(totalAmount: MilliSatoshi, expiry: CltvExpiry, paymentSecret: ByteVector32, packet: OnionRoutingPacket)

Functions

isComplete
Link copied to clipboard
common
fun isComplete(): Boolean

Properties

fees
Link copied to clipboard
common
abstract val fees: MilliSatoshi
pending
Link copied to clipboard
common
abstract val pending: Map<UUID, Pair<OutgoingPayment.Part, SharedSecrets>>
request
Link copied to clipboard
common
abstract val request: SendPayment

Inheritors

OutgoingPaymentHandler.PaymentAttempt
Link copied to clipboard
OutgoingPaymentHandler.PaymentAttempt
Link copied to clipboard
OutgoingPaymentHandler.PaymentAttempt
Link copied to clipboard