pub enum OffersContext {
InvoiceRequest {
nonce: Nonce,
},
StaticInvoiceRequested {
recipient_id: Vec<u8>,
invoice_slot: u16,
path_absolute_expiry: Duration,
},
OutboundPayment {
payment_id: PaymentId,
nonce: Nonce,
},
InboundPayment {
payment_hash: PaymentHash,
},
}Expand description
Contains data specific to an OffersMessage.
Variants§
InvoiceRequest
Context used by a BlindedMessagePath within an Offer.
This variant is intended to be received when handling an InvoiceRequest.
Fields
nonce: NonceA nonce used for authenticating that an InvoiceRequest is for a valid Offer and
for deriving the offer’s signing keys.
StaticInvoiceRequested
Context used by a BlindedMessagePath within the Offer of an async recipient.
This variant is received by the static invoice server when handling an InvoiceRequest on
behalf of said async recipient.
Fields
recipient_id: Vec<u8>An identifier for the async recipient for whom we as a static invoice server are serving
StaticInvoices. Used paired with the
OffersContext::StaticInvoiceRequested::invoice_slot when looking up a corresponding
StaticInvoice to return to the payer if the recipient is offline. This id was previously
provided via AsyncPaymentsContext::ServeStaticInvoice::recipient_id.
Also useful for rate limiting the number of InvoiceRequests we will respond to on
recipient’s behalf.
invoice_slot: u16The slot number for a specific StaticInvoice that the recipient previously
requested be served on their behalf. Useful when paired with the
OffersContext::StaticInvoiceRequested::recipient_id to pull that specific invoice from
the database when payers send an InvoiceRequest. This id was previously
provided via AsyncPaymentsContext::ServeStaticInvoice::invoice_slot.
OutboundPayment
Context used by a BlindedMessagePath within a Refund or as a reply path for an
InvoiceRequest.
This variant is intended to be received when handling a Bolt12Invoice or an
InvoiceError.
Fields
payment_id: PaymentIdPayment ID used when creating a Refund or InvoiceRequest.
nonce: NonceA nonce used for authenticating that a Bolt12Invoice is for a valid Refund or
InvoiceRequest and for deriving their signing keys.
InboundPayment
Context used by a BlindedMessagePath as a reply path for a Bolt12Invoice.
This variant is intended to be received when handling an InvoiceError.
Fields
payment_hash: PaymentHashThe same payment hash as Bolt12Invoice::payment_hash.
Trait Implementations§
Source§impl Clone for OffersContext
impl Clone for OffersContext
Source§fn clone(&self) -> OffersContext
fn clone(&self) -> OffersContext
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OffersContext
impl Debug for OffersContext
Source§impl PartialEq for OffersContext
impl PartialEq for OffersContext
Source§impl Readable for OffersContext
impl Readable for OffersContext
Source§impl Writeable for OffersContext
impl Writeable for OffersContext
impl Eq for OffersContext
impl StructuralPartialEq for OffersContext
Auto Trait Implementations§
impl Freeze for OffersContext
impl RefUnwindSafe for OffersContext
impl Send for OffersContext
impl Sync for OffersContext
impl Unpin for OffersContext
impl UnwindSafe for OffersContext
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<T> LengthReadable for Twhere
T: Readable,
impl<T> LengthReadable for Twhere
T: Readable,
Source§fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
fn read_from_fixed_length_buffer<R>(reader: &mut R) -> Result<T, DecodeError>where
R: LengthLimitedRead,
Self in from the given LengthLimitedRead.