Struct bip351::Recipient

source ·
pub struct Recipient { /* private fields */ }
Expand description

A struct that a recipient uses to generate a payment code and process notifications. This is invariant with regard to sender and needs to be constructed only once (unique per BIP32 seed).

Implementations§

Create a recipient side from a BIP32 seed.

Create a recipient side from a master extended private key. Not supplying a master key here produces an error.

Processes a scriptpubkey and tries to find a notification in it. If the notification isn’t meant for this recipient, None is returned. Otherwise, the sender’s public key, along with the sender’s chosen address type, is returned. Note that this has a 1 in ~4.3 billion chance of detecting a spurious notification.

Processes a byte slice and tries to find a notification in it. If the notification isn’t meant for this recipient, None is returned. Otherwise, the sender’s public key, along with the sender’s chosen address type, is returned. Note that this has a 1 in ~4.3 billion chance of detecting a spurious notification.

Returns the payment code for this recipient.

Returns the private key for a sender-recipient connection at index c.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.