Struct bip47::PublicCode [−][src]
pub struct PublicCode {
pub network: Network,
// some fields omitted
}
Expand description
Represents the public side of a payment code. This is what the party that wishes to receive funds shares with sending parties.
Fields
network: Network
Implementations
Returns the notification mode to be used with this payment code.
Derives a send address at the given index. If the index is invalid, it should be incremented.
pub fn from_notification(
receiver_code: &PrivateCode,
designated: Option<(PublicKey, OutPoint)>,
tx: &Transaction
) -> Result<Self, Error>
pub fn from_notification(
receiver_code: &PrivateCode,
designated: Option<(PublicKey, OutPoint)>,
tx: &Transaction
) -> Result<Self, Error>
Attempts to extract a public payment code from a notification transaction. If the designated pubkey
and input are unknown and set to None
, automatic extraction will be attempted. They can also be
supplied if they are known (for example if acquired through a side channel).