Outgoing Payments Db
interface OutgoingPaymentsDb
Content copied to clipboard
Functions
add Outgoing Parts
Link copied to clipboard
abstract suspend fun addOutgoingParts(parentId: UUID, parts: List<OutgoingPayment.Part>)
Content copied to clipboard
Add new partial payments to a pending outgoing payment.
add Outgoing Payment
Link copied to clipboard
abstract suspend fun addOutgoingPayment(outgoingPayment: OutgoingPayment)
Content copied to clipboard
Add a new pending outgoing payment (not yet settled).
complete Outgoing Payment
Link copied to clipboard
abstract suspend fun completeOutgoingPayment(id: UUID, completed: OutgoingPayment.Status.Completed)
Content copied to clipboard
Mark an outgoing payment as completed (failed, succeeded, mined).
open suspend fun completeOutgoingPayment(id: UUID, preimage: ByteVector32, completedAt: Long = currentTimestampMillis())
Content copied to clipboard
open suspend fun completeOutgoingPayment(id: UUID, finalFailure: FinalFailure, completedAt: Long = currentTimestampMillis())
Content copied to clipboard
get Outgoing Part
Link copied to clipboard
Get information about an outgoing payment from the id of one of its parts.
get Outgoing Payment
Link copied to clipboard
Get information about an outgoing payment (settled or not).
list Outgoing Payments
Link copied to clipboard
abstract suspend fun listOutgoingPayments(paymentHash: ByteVector32): List<OutgoingPayment>
Content copied to clipboard
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>
Content copied to clipboard
List outgoing payments (with most recent payments first).
update Outgoing Part
Link copied to clipboard
abstract suspend fun updateOutgoingPart(partId: UUID, preimage: ByteVector32, completedAt: Long = currentTimestampMillis())
Content copied to clipboard
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())
Content copied to clipboard
Mark an outgoing payment part as failed.
Inheritors
PaymentsDb
Link copied to clipboard