Struct bip351::Sender

source ·
pub struct Sender(_);
Expand description

A struct that a sender of funds uses in combination with a recipient’s PaymentCode in order to send notifications and calculate payment addresses. This is invariant with regard to recipient and needs to be constructed only once per account (unique per BIP32 seed + account).

Implementations§

Construct a sender side from a BIP32 seed.

Construct a sender side from a master extended private key. Not supplying a master key here produces an error.

Construct a notification for a payment code. The txout is an OP_RETURN consuming 0 sats. The returned SenderCommitment is used for subsequent interaction with the payment code.

recipient_index must be unique for each recipient as it uniquely defines the relationship between a sender and a recipient.

Generate an address for a recipient that has already been notified.

Get the network used by this sender.

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.