Struct UnauthenticatedReceiveTlvs
pub struct UnauthenticatedReceiveTlvs {
pub payment_secret: PaymentSecret,
pub payment_constraints: PaymentConstraints,
pub payment_context: PaymentContext,
}Expand description
An unauthenticated ReceiveTlvs.
Fields§
§payment_secret: PaymentSecretUsed to authenticate the sender of a payment to the receiver and tie MPP HTLCs together.
payment_constraints: PaymentConstraintsConstraints for the receiver of this payment.
payment_context: PaymentContextContext for the receiver of this payment.
Implementations§
§impl UnauthenticatedReceiveTlvs
impl UnauthenticatedReceiveTlvs
pub fn authenticate(
self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> ReceiveTlvs
pub fn authenticate( self, nonce: Nonce, expanded_key: &ExpandedKey, ) -> ReceiveTlvs
Creates an authenticated ReceiveTlvs, which includes an HMAC and the provide Nonce
that can be use later to verify it authenticity.
Trait Implementations§
§impl Clone for UnauthenticatedReceiveTlvs
impl Clone for UnauthenticatedReceiveTlvs
§fn clone(&self) -> UnauthenticatedReceiveTlvs
fn clone(&self) -> UnauthenticatedReceiveTlvs
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for UnauthenticatedReceiveTlvs
impl Debug for UnauthenticatedReceiveTlvs
§impl Verification for UnauthenticatedReceiveTlvs
impl Verification for UnauthenticatedReceiveTlvs
§fn hmac_for_offer_payment(
&self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Hmac<Hash>
fn hmac_for_offer_payment( &self, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Hmac<Hash>
Constructs an HMAC to include in
OffersContext for the data along with the given
Nonce.§fn verify_for_offer_payment(
&self,
hmac: Hmac<Hash>,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Result<(), ()>
fn verify_for_offer_payment( &self, hmac: Hmac<Hash>, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Result<(), ()>
Authenticates the data using an HMAC and a
Nonce taken from an OffersContext.§impl Writeable for UnauthenticatedReceiveTlvs
impl Writeable for UnauthenticatedReceiveTlvs
Auto Trait Implementations§
impl Freeze for UnauthenticatedReceiveTlvs
impl RefUnwindSafe for UnauthenticatedReceiveTlvs
impl Send for UnauthenticatedReceiveTlvs
impl Sync for UnauthenticatedReceiveTlvs
impl Unpin for UnauthenticatedReceiveTlvs
impl UnwindSafe for UnauthenticatedReceiveTlvs
Blanket Implementations§
§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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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> ⓘ
Converts
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> ⓘ
Converts
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>
Wrap the input message
T in a tonic::Request