breez_sdk_liquid::lightning_125::ln::channelmanager

Enum PendingHTLCRouting

pub enum PendingHTLCRouting {
    Forward {
        onion_packet: OnionPacket,
        short_channel_id: u64,
        blinded: Option<BlindedForward>,
    },
    Receive {
        payment_data: FinalOnionHopData,
        payment_metadata: Option<Vec<u8>>,
        payment_context: Option<PaymentContext>,
        incoming_cltv_expiry: u32,
        phantom_shared_secret: Option<[u8; 32]>,
        custom_tlvs: Vec<(u64, Vec<u8>)>,
        requires_blinded_error: bool,
    },
    ReceiveKeysend {
        payment_data: Option<FinalOnionHopData>,
        payment_preimage: PaymentPreimage,
        payment_metadata: Option<Vec<u8>>,
        incoming_cltv_expiry: u32,
        custom_tlvs: Vec<(u64, Vec<u8>)>,
        requires_blinded_error: bool,
    },
}
Expand description

Information about where a received HTLC(’s onion) has indicated the HTLC should go.

Variants§

§

Forward

An HTLC which should be forwarded on to another node.

Fields

§onion_packet: OnionPacket

The onion which should be included in the forwarded HTLC, telling the next hop what to do with the HTLC.

§short_channel_id: u64

The short channel ID of the channel which we were instructed to forward this HTLC to.

This could be a real on-chain SCID, an SCID alias, or some other SCID which has meaning to the receiving node, such as one returned from ChannelManager::get_intercept_scid or ChannelManager::get_phantom_scid.

§blinded: Option<BlindedForward>

Set if this HTLC is being forwarded within a blinded path.

§

Receive

The onion indicates that this is a payment for an invoice (supposedly) generated by us.

Note that at this point, we have not checked that the invoice being paid was actually generated by us, but rather it’s claiming to pay an invoice of ours.

Fields

§payment_data: FinalOnionHopData

Information about the amount the sender intended to pay and (potential) proof that this is a payment for an invoice we generated. This proof of payment is is also used for linking MPP parts of a larger payment.

§payment_metadata: Option<Vec<u8>>

Additional data which we (allegedly) instructed the sender to include in the onion.

For HTLCs received by LDK, this will ultimately be exposed in Event::PaymentClaimable::onion_fields as RecipientOnionFields::payment_metadata.

§payment_context: Option<PaymentContext>

The context of the payment included by the recipient in a blinded path, or None if a blinded path was not used.

Used in part to determine the events::PaymentPurpose.

§incoming_cltv_expiry: u32

CLTV expiry of the received HTLC.

Used to track when we should expire pending HTLCs that go unclaimed.

§phantom_shared_secret: Option<[u8; 32]>

If the onion had forwarding instructions to one of our phantom node SCIDs, this will provide the onion shared secret used to decrypt the next level of forwarding instructions.

§custom_tlvs: Vec<(u64, Vec<u8>)>

Custom TLVs which were set by the sender.

For HTLCs received by LDK, this will ultimately be exposed in Event::PaymentClaimable::onion_fields as RecipientOnionFields::custom_tlvs.

§requires_blinded_error: bool

Set if this HTLC is the final hop in a multi-hop blinded path.

§

ReceiveKeysend

The onion indicates that this is for payment to us but which contains the preimage for claiming included, and is unrelated to any invoice we’d previously generated (aka a “keysend” or “spontaneous” payment).

Fields

§payment_data: Option<FinalOnionHopData>

Information about the amount the sender intended to pay and possibly a token to associate MPP parts of a larger payment.

This will only be filled in if receiving MPP keysend payments is enabled, and it being present will cause deserialization to fail on versions of LDK prior to 0.0.116.

§payment_preimage: PaymentPreimage

Preimage for this onion payment. This preimage is provided by the sender and will be used to settle the spontaneous payment.

§payment_metadata: Option<Vec<u8>>

Additional data which we (allegedly) instructed the sender to include in the onion.

For HTLCs received by LDK, this will ultimately bubble back up as RecipientOnionFields::payment_metadata.

§incoming_cltv_expiry: u32

CLTV expiry of the received HTLC.

Used to track when we should expire pending HTLCs that go unclaimed.

§custom_tlvs: Vec<(u64, Vec<u8>)>

Custom TLVs which were set by the sender.

For HTLCs received by LDK, these will ultimately bubble back up as RecipientOnionFields::custom_tlvs.

§requires_blinded_error: bool

Set if this HTLC is the final hop in a multi-hop blinded path.

Trait Implementations§

§

impl Clone for PendingHTLCRouting

§

fn clone(&self) -> PendingHTLCRouting

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Readable for PendingHTLCRouting

§

fn read<R>(reader: &mut R) -> Result<PendingHTLCRouting, DecodeError>
where R: Read,

Reads a Self in from the given Read.
§

impl Writeable for PendingHTLCRouting

§

fn write<W>(&self, writer: &mut W) -> Result<(), Error>
where W: Writer,

Writes self out to the given Writer.
§

fn encode(&self) -> Vec<u8>

Writes self out to a Vec<u8>.
§

fn serialized_length(&self) -> usize

Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<T> MaybeReadable for T
where T: Readable,

§

fn read<R>(reader: &mut R) -> Result<Option<T>, DecodeError>
where R: Read,

Reads a Self in from the given Read.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> DartSafe for T

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T

§

impl<T> TaskRetFutTrait for T
where T: Send,