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§
Source§impl UnauthenticatedReceiveTlvs
impl UnauthenticatedReceiveTlvs
Sourcepub 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§
Source§impl Clone for UnauthenticatedReceiveTlvs
impl Clone for UnauthenticatedReceiveTlvs
Source§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 moreSource§impl Debug for UnauthenticatedReceiveTlvs
impl Debug for UnauthenticatedReceiveTlvs
Source§impl Verification for UnauthenticatedReceiveTlvs
impl Verification for UnauthenticatedReceiveTlvs
Source§fn hmac_for_offer_payment(
&self,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Hmac<Sha256>
fn hmac_for_offer_payment( &self, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Hmac<Sha256>
Constructs an HMAC to include in
OffersContext for the data along with the given
Nonce.Source§fn verify_for_offer_payment(
&self,
hmac: Hmac<Sha256>,
nonce: Nonce,
expanded_key: &ExpandedKey,
) -> Result<(), ()>
fn verify_for_offer_payment( &self, hmac: Hmac<Sha256>, nonce: Nonce, expanded_key: &ExpandedKey, ) -> Result<(), ()>
Authenticates the data using an HMAC and a
Nonce taken from an OffersContext.Source§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§
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