breez_sdk_liquid::lightning_with_bolt12::ln::channelmanager

Trait Verification

pub trait Verification {
    // Required methods
    fn hmac_for_offer_payment(
        &self,
        nonce: Nonce,
        expanded_key: &ExpandedKey,
    ) -> Hmac<Hash>;
    fn verify_for_offer_payment(
        &self,
        hmac: Hmac<Hash>,
        nonce: Nonce,
        expanded_key: &ExpandedKey,
    ) -> Result<(), ()>;
}
Expand description

A trait defining behavior for creating and verifing the HMAC for authenticating a given data.

Required Methods§

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<(), ()>

Authenticates the data using an HMAC and a Nonce taken from an OffersContext.

Implementors§