pub struct PaymentProtocolClient;Expand description
BIP70 Payment Protocol client (for making payments via P2P)
Note: Node-specific message creation functions are in blvm-node. This struct provides protocol-level validation only.
Implementations§
Source§impl PaymentProtocolClient
impl PaymentProtocolClient
Sourcepub fn validate_payment_request(
payment_request: &PaymentRequest,
expected_merchant_pubkey: Option<&[u8]>,
) -> Result<(), Bip70Error>
pub fn validate_payment_request( payment_request: &PaymentRequest, expected_merchant_pubkey: Option<&[u8]>, ) -> Result<(), Bip70Error>
Validate a PaymentRequest (protocol-level validation)
Sourcepub fn validate_payment_ack(
payment_ack: &PaymentACK,
merchant_signature: &[u8],
merchant_pubkey: &[u8],
) -> Result<(), Bip70Error>
pub fn validate_payment_ack( payment_ack: &PaymentACK, merchant_signature: &[u8], merchant_pubkey: &[u8], ) -> Result<(), Bip70Error>
Validate PaymentACK from merchant (protocol-level validation)
This is a legacy method for backward compatibility. Prefer using PaymentACK::verify_signature() directly.
Auto Trait Implementations§
impl Freeze for PaymentProtocolClient
impl RefUnwindSafe for PaymentProtocolClient
impl Send for PaymentProtocolClient
impl Sync for PaymentProtocolClient
impl Unpin for PaymentProtocolClient
impl UnsafeUnpin for PaymentProtocolClient
impl UnwindSafe for PaymentProtocolClient
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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 more