OutgoingPaymentsDb

interface OutgoingPaymentsDb

Functions

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

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).

completeOutgoingLightningPart
Link copied to clipboard
common
abstract suspend fun completeOutgoingLightningPart(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 completeOutgoingLightningPart(partId: UUID, failure: Either<ChannelException, FailureMessage>, completedAt: Long = currentTimestampMillis())

Mark an outgoing payment part as failed.

completeOutgoingPaymentForClosing
Link copied to clipboard
common
abstract suspend fun completeOutgoingPaymentForClosing(id: UUID, parts: List<OutgoingPayment.ClosingTxPart>, completedAt: Long = currentTimestampMillis())

Mark an outgoing payment as completed for closing a Lightning channel on-chain with a list of on-chain txs.

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

Mark an outgoing payment as completed over Lightning.

abstract suspend fun completeOutgoingPaymentOffchain(id: UUID, finalFailure: FinalFailure, completedAt: Long = currentTimestampMillis())

Mark an outgoing payment as failed.

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

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

getOutgoingPaymentFromPartId
Link copied to clipboard
common
abstract suspend fun getOutgoingPaymentFromPartId(partId: UUID): OutgoingPayment?

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

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).

Inheritors

PaymentsDb
Link copied to clipboard