Enum OffersContext
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§
§impl Clone for OffersContext
impl Clone for OffersContext
§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§impl Debug for OffersContext
impl Debug for OffersContext
§impl PartialEq for OffersContext
impl PartialEq for OffersContext
§impl Readable for OffersContext
impl Readable for OffersContext
§fn read<R>(reader: &mut R) -> Result<OffersContext, DecodeError>where
R: Read,
fn read<R>(reader: &mut R) -> Result<OffersContext, DecodeError>where
R: Read,
Self in from the given Read.§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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request