OutgoingPaymentsDb

interface OutgoingPaymentsDb

Functions

addOutgoingParts
Link copied to clipboard
common
abstract suspend fun addOutgoingParts(parentId: UUID, parts: List<OutgoingPayment.Part>)

Add new partial payments to a pending outgoing payment.

addOutgoingPayment
Link copied to clipboard
common
abstract suspend fun addOutgoingPayment(outgoingPayment: OutgoingPayment)

Add a new pending outgoing payment (not yet settled).

completeOutgoingPayment
Link copied to clipboard
common
abstract suspend fun completeOutgoingPayment(id: UUID, completed: OutgoingPayment.Status.Completed)

Mark an outgoing payment as completed (failed, succeeded, mined).

open suspend fun completeOutgoingPayment(id: UUID, preimage: ByteVector32, completedAt: Long = currentTimestampMillis())
open suspend fun completeOutgoingPayment(id: UUID, finalFailure: FinalFailure, completedAt: Long = currentTimestampMillis())
getOutgoingPart
Link copied to clipboard
common
abstract suspend fun getOutgoingPart(partId: UUID): OutgoingPayment?

Get information about an outgoing payment from the id of one of its parts.

getOutgoingPayment
Link copied to clipboard
common
abstract suspend fun getOutgoingPayment(id: UUID): OutgoingPayment?

Get information about an outgoing payment (settled or not).

listOutgoingPayments
Link copied to clipboard
common
abstract suspend fun listOutgoingPayments(paymentHash: ByteVector32): List<OutgoingPayment>

List all the outgoing payment attempts that tried to pay the given payment hash.

abstract suspend fun listOutgoingPayments(count: Int, skip: Int, filters: Set<PaymentTypeFilter> = setOf()): List<OutgoingPayment>

List outgoing payments (with most recent payments first).

updateOutgoingPart
Link copied to clipboard
common
abstract suspend fun updateOutgoingPart(partId: UUID, preimage: ByteVector32, completedAt: Long = currentTimestampMillis())

Mark an outgoing payment part as succeeded. This should not update the parent payment, since some parts may still be pending.

abstract suspend fun updateOutgoingPart(partId: UUID, failure: Either<ChannelException, FailureMessage>, completedAt: Long = currentTimestampMillis())

Mark an outgoing payment part as failed.

Inheritors

PaymentsDb
Link copied to clipboard