Struct bip47::BasicTransaction
source · [−]pub struct BasicTransaction<'a>(_);
Expand description
Represents the on-chain notification mode and provides functionality for constructing an on-chain notification message.
Implementations
sourceimpl<'a> BasicTransaction<'a>
impl<'a> BasicTransaction<'a>
sourcepub fn notification_pubkey(&self) -> Result<PublicKey, Error>
pub fn notification_pubkey(&self) -> Result<PublicKey, Error>
Derives the notification pubkey belonging to this payment code. This is exposed in case the
consumer needs the notification pubkey for any reason, such as for manual blinding operations.
Under normal circumstances, it is sufficient to use notification_address
.
sourcepub fn notification_address(&self, segwit: bool) -> Result<Address, Error>
pub fn notification_address(&self, segwit: bool) -> Result<Address, Error>
Derives the notification address belonging to this payment code.
sourcepub fn make_notification_scripts(
&self,
sender_code: &PublicCode,
notification_sk: &PrivateKey,
notification_utxo: &OutPoint
) -> Result<(Script, Script), Error>
pub fn make_notification_scripts(
&self,
sender_code: &PublicCode,
notification_sk: &PrivateKey,
notification_utxo: &OutPoint
) -> Result<(Script, Script), Error>
Generates output scripts (scriptpubkeys) for a v1 notification transaction. Both outputs must be included and the notification input and key must not be easily associated with the sender.
sourcepub fn notification_privkey(
private_code: &PrivateCode
) -> Result<PrivateKey, Error>
pub fn notification_privkey(
private_code: &PrivateCode
) -> Result<PrivateKey, Error>
Derives the notification private key belonging to a private payment code. Needed if spending from a notification address etc.
Auto Trait Implementations
impl<'a> RefUnwindSafe for BasicTransaction<'a>
impl<'a> Send for BasicTransaction<'a>
impl<'a> Sync for BasicTransaction<'a>
impl<'a> Unpin for BasicTransaction<'a>
impl<'a> UnwindSafe for BasicTransaction<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more