Outgoing Payment Handler
class OutgoingPaymentHandler(nodeId: PublicKey, walletParams: WalletParams, db: OutgoingPaymentsDb)
Content copied to clipboard
Types
Failure
Link copied to clipboard
data class Failure(request: SendPayment, failure: OutgoingPaymentFailure) : OutgoingPaymentHandler.SendPaymentResult, OutgoingPaymentHandler.ProcessFailureResult
Content copied to clipboard
The payment could not be sent.
Payment Attempt
Link copied to clipboard
sealed class PaymentAttempt
Content copied to clipboard
Preimage Received
Link copied to clipboard
data class PreimageReceived(request: SendPayment, preimage: ByteVector32) : OutgoingPaymentHandler.ProcessFulfillResult
Content copied to clipboard
The recipient released the preimage, but we are still waiting for some partial payments to settle.
Process Failure Result
Link copied to clipboard
interface ProcessFailureResult
Content copied to clipboard
Process Fulfill Result
Link copied to clipboard
interface ProcessFulfillResult
Content copied to clipboard
Progress
Link copied to clipboard
data class Progress(request: SendPayment, fees: MilliSatoshi, actions: List<WrappedChannelEvent>) : OutgoingPaymentHandler.SendPaymentResult, OutgoingPaymentHandler.ProcessFailureResult
Content copied to clipboard
A payment attempt has been made: we provide information about the fees we're paying, which may increase as we re-try our payment.
Send Payment Result
Link copied to clipboard
interface SendPaymentResult
Content copied to clipboard
Success
Link copied to clipboard
data class Success(request: SendPayment, payment: OutgoingPayment, preimage: ByteVector32) : OutgoingPaymentHandler.ProcessFailureResult, OutgoingPaymentHandler.ProcessFulfillResult
Content copied to clipboard
The payment was successfully made.
Functions
get Pending Payment
Link copied to clipboard
fun getPendingPayment(parentId: UUID): OutgoingPaymentHandler.PaymentAttempt?
Content copied to clipboard
process Add Failed
Link copied to clipboard
suspend fun processAddFailed(channelId: ByteVector32, event: ChannelAction.ProcessCmdRes.AddFailed, channels: Map<ByteVector32, ChannelState>): OutgoingPaymentHandler.ProcessFailureResult?
Content copied to clipboard
process Add Settled
Link copied to clipboard
suspend fun processAddSettled(event: ChannelAction.ProcessCmdRes.AddSettledFulfill): OutgoingPaymentHandler.ProcessFulfillResult?
Content copied to clipboard
suspend fun processAddSettled(channelId: ByteVector32, event: ChannelAction.ProcessCmdRes.AddSettledFail, channels: Map<ByteVector32, ChannelState>, currentBlockHeight: Int): OutgoingPaymentHandler.ProcessFailureResult?
Content copied to clipboard
send Payment
Link copied to clipboard
suspend fun sendPayment(request: SendPayment, channels: Map<ByteVector32, ChannelState>, currentBlockHeight: Int): OutgoingPaymentHandler.SendPaymentResult
Content copied to clipboard