OutgoingPaymentHandler

class OutgoingPaymentHandler(nodeId: PublicKey, walletParams: WalletParams, db: OutgoingPaymentsDb)

Types

Failure
Link copied to clipboard
common

The payment could not be sent.

PaymentAttempt
Link copied to clipboard
common
sealed class PaymentAttempt
PreimageReceived
Link copied to clipboard
common
data class PreimageReceived(request: SendPayment, preimage: ByteVector32) : OutgoingPaymentHandler.ProcessFulfillResult

The recipient released the preimage, but we are still waiting for some partial payments to settle.

ProcessFailureResult
Link copied to clipboard
common
interface ProcessFailureResult
ProcessFulfillResult
Link copied to clipboard
common
interface ProcessFulfillResult
Progress
Link copied to clipboard
common

A payment attempt has been made: we provide information about the fees we're paying, which may increase as we re-try our payment.

SendPaymentResult
Link copied to clipboard
common
interface SendPaymentResult
Success
Link copied to clipboard
common
data class Success(request: SendPayment, payment: OutgoingPayment, preimage: ByteVector32) : OutgoingPaymentHandler.ProcessFailureResult, OutgoingPaymentHandler.ProcessFulfillResult

The payment was successfully made.

Functions

getPendingPayment
Link copied to clipboard
common
fun getPendingPayment(parentId: UUID): OutgoingPaymentHandler.PaymentAttempt?
processAddFailed
Link copied to clipboard
common
suspend fun processAddFailed(channelId: ByteVector32, event: ChannelAction.ProcessCmdRes.AddFailed, channels: Map<ByteVector32, ChannelState>): OutgoingPaymentHandler.ProcessFailureResult?
processAddSettled
Link copied to clipboard
common
suspend fun processAddSettled(channelId: ByteVector32, event: ChannelAction.ProcessCmdRes.AddSettledFail, channels: Map<ByteVector32, ChannelState>, currentBlockHeight: Int): OutgoingPaymentHandler.ProcessFailureResult?
sendPayment
Link copied to clipboard
common
suspend fun sendPayment(request: SendPayment, channels: Map<ByteVector32, ChannelState>, currentBlockHeight: Int): OutgoingPaymentHandler.SendPaymentResult

Properties

db
Link copied to clipboard
common
val db: OutgoingPaymentsDb
nodeId
Link copied to clipboard
common
val nodeId: PublicKey
walletParams
Link copied to clipboard
common
val walletParams: WalletParams