pub enum OffersContext {
InvoiceRequest {
nonce: Nonce,
},
OutboundPayment {
payment_id: PaymentId,
nonce: Nonce,
hmac: Option<Hmac<Hash>>,
},
InboundPayment {
payment_hash: PaymentHash,
nonce: Nonce,
hmac: Hmac<Hash>,
},
}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.
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.
nonce: NonceA nonce used for authenticating that a received InvoiceError is for a valid
sent Bolt12Invoice.
hmac: Hmac<Hash>Authentication code for the PaymentHash, which should be checked when the context is
used to log the received InvoiceError.
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 more