OutgoingPayment

data class OutgoingPayment(id: UUID, recipientAmount: MilliSatoshi, recipient: PublicKey, details: OutgoingPayment.Details, parts: List<OutgoingPayment.Part>, status: OutgoingPayment.Status, createdAt: Long) : WalletPayment

An outgoing payment sent by this node. The payment may be split in multiple parts, which may fail, be retried, and then either succeed or fail.

Parameters

id

internal payment identifier.

recipientAmount

total amount that will be received by the final recipient. Note that, depending on the type of the payment, it may or may not contain the fees. See the amount and fees fields for details.

recipient

final recipient nodeId.

details

details that depend on the payment type (normal payments, swaps, etc).

parts

list of partial child payments that have actually been sent.

status

current status of the payment.

Constructors

OutgoingPayment
Link copied to clipboard
common
fun OutgoingPayment(id: UUID, amount: MilliSatoshi, recipient: PublicKey, details: OutgoingPayment.Details)

Create an outgoing payment in a pending status, without any parts yet.

OutgoingPayment
Link copied to clipboard
common
fun OutgoingPayment(id: UUID, recipientAmount: MilliSatoshi, recipient: PublicKey, details: OutgoingPayment.Details, parts: List<OutgoingPayment.Part>, status: OutgoingPayment.Status, createdAt: Long = currentTimestampMillis())

Types

ClosingTxPart
Link copied to clipboard
common
data class ClosingTxPart(id: UUID, txId: ByteVector32, claimed: Satoshi, closingType: ChannelClosingType, createdAt: Long) : OutgoingPayment.Part

A child payment for closing a channel through an on-chain transaction.

Details
Link copied to clipboard
common
sealed class Details
LightningPart
Link copied to clipboard
common
data class LightningPart(id: UUID, amount: MilliSatoshi, route: List<HopDesc>, status: OutgoingPayment.LightningPart.Status, createdAt: Long) : OutgoingPayment.Part

A child payment sent by this node (partial payment of the total amount). This payment has a status and can fail.

Part
Link copied to clipboard
common
sealed class Part

An outgoing payment is an abstraction ; it is actually settled through one or several child payments that are done over Lightning, or through on-chain transactions.

Status
Link copied to clipboard
common
sealed class Status

Functions

completedAt
Link copied to clipboard
common
fun completedAt(): Long

Absolute time in milliseconds since UNIX epoch when the payment was completed.

Properties

amount
Link copied to clipboard
common
open override val amount: MilliSatoshi

Amount that actually left the wallet. It does include the fees.

createdAt
Link copied to clipboard
common
val createdAt: Long
details
Link copied to clipboard
common
val details: OutgoingPayment.Details
fees
Link copied to clipboard
common
open override val fees: MilliSatoshi

This is the total fees that have been paid to make the payment work. It includes the LN routing fees, the fee for the swap-out service, the mining fees for closing a channel.

id
Link copied to clipboard
common
val id: UUID
parts
Link copied to clipboard
common
val parts: List<OutgoingPayment.Part>
paymentHash
Link copied to clipboard
common
val paymentHash: ByteVector32
recipient
Link copied to clipboard
common
val recipient: PublicKey
recipientAmount
Link copied to clipboard
common
val recipientAmount: MilliSatoshi
routingFee
Link copied to clipboard
common
val routingFee: MilliSatoshi
status
Link copied to clipboard
common
val status: OutgoingPayment.Status