pub enum PaymentKind {
Onchain {
txid: Txid,
status: ConfirmationStatus,
},
Bolt11 {
hash: PaymentHash,
preimage: Option<PaymentPreimage>,
secret: Option<PaymentSecret>,
},
Bolt11Jit {
hash: PaymentHash,
preimage: Option<PaymentPreimage>,
secret: Option<PaymentSecret>,
counterparty_skimmed_fee_msat: Option<u64>,
lsp_fee_limits: LSPFeeLimits,
},
Bolt12Offer {
hash: Option<PaymentHash>,
preimage: Option<PaymentPreimage>,
secret: Option<PaymentSecret>,
offer_id: OfferId,
payer_note: Option<UntrustedString>,
quantity: Option<u64>,
},
Bolt12Refund {
hash: Option<PaymentHash>,
preimage: Option<PaymentPreimage>,
secret: Option<PaymentSecret>,
payer_note: Option<UntrustedString>,
quantity: Option<u64>,
},
Spontaneous {
hash: PaymentHash,
preimage: Option<PaymentPreimage>,
},
}Expand description
Represents the kind of a payment.
Variants§
Onchain
An on-chain payment.
Payments of this kind will be considered pending until the respective transaction has
reached ANTI_REORG_DELAY confirmations on-chain.
Fields
status: ConfirmationStatusThe confirmation status of this payment.
Bolt11
A BOLT 11 payment.
Fields
hash: PaymentHashThe payment hash, i.e., the hash of the preimage.
preimage: Option<PaymentPreimage>The pre-image used by the payment.
secret: Option<PaymentSecret>The secret used by the payment.
Bolt11Jit
A BOLT 11 payment intended to open an [bLIP-52 / LSPS 2] just-in-time channel.
Fields
hash: PaymentHashThe payment hash, i.e., the hash of the preimage.
preimage: Option<PaymentPreimage>The pre-image used by the payment.
secret: Option<PaymentSecret>The secret used by the payment.
counterparty_skimmed_fee_msat: Option<u64>The value, in thousands of a satoshi, that was deducted from this payment as an extra fee taken by our channel counterparty.
Will only be Some once we received the payment. Will always be None for LDK Node
v0.4 and prior.
lsp_fee_limits: LSPFeeLimitsLimits applying to how much fee we allow an LSP to deduct from the payment amount.
Allowing them to deduct this fee from the first inbound payment will pay for the LSP’s channel opening fees.
See LdkChannelConfig::accept_underpaying_htlcs for more information.
Bolt12Offer
Fields
hash: Option<PaymentHash>The payment hash, i.e., the hash of the preimage.
preimage: Option<PaymentPreimage>The pre-image used by the payment.
secret: Option<PaymentSecret>The secret used by the payment.
payer_note: Option<UntrustedString>The payer note for the payment.
Truncated to PAYER_NOTE_LIMIT characters.
This will always be None for payments serialized with version v0.3.0.
Bolt12Refund
Fields
hash: Option<PaymentHash>The payment hash, i.e., the hash of the preimage.
preimage: Option<PaymentPreimage>The pre-image used by the payment.
secret: Option<PaymentSecret>The secret used by the payment.
payer_note: Option<UntrustedString>The payer note for the refund payment.
This will always be None for payments serialized with version v0.3.0.
Spontaneous
A spontaneous (“keysend”) payment.
Fields
hash: PaymentHashThe payment hash, i.e., the hash of the preimage.
preimage: Option<PaymentPreimage>The pre-image used by the payment.
Trait Implementations§
Source§impl Clone for PaymentKind
impl Clone for PaymentKind
Source§fn clone(&self) -> PaymentKind
fn clone(&self) -> PaymentKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PaymentKind
impl Debug for PaymentKind
Source§impl PartialEq for PaymentKind
impl PartialEq for PaymentKind
Source§impl Readable for PaymentKind
impl Readable for PaymentKind
Source§impl Writeable for PaymentKind
impl Writeable for PaymentKind
impl Eq for PaymentKind
impl StructuralPartialEq for PaymentKind
Auto Trait Implementations§
impl Freeze for PaymentKind
impl RefUnwindSafe for PaymentKind
impl Send for PaymentKind
impl Sync for PaymentKind
impl Unpin for PaymentKind
impl UnwindSafe for PaymentKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more