pub struct NonceKps(/* private fields */);Expand description
A nonce key pair per batch-tree transaction output that we are a part of in the batch.
The musig::SecretNonce element of the tuple is an Option because it cannot be cloned or
copied. When we are ready to sign a batch-tree transaction, we call the method take_sk to move
out of the Option.
Implementations§
Source§impl NonceKps
impl NonceKps
Sourcepub fn take_sk(&mut self, txid: &Txid) -> Option<SecretNonce>
pub fn take_sk(&mut self, txid: &Txid) -> Option<SecretNonce>
Take ownership of the musig::SecretNonce for the transaction identified by txid.
The caller must take ownership because the musig::SecretNonce ensures that it can only
be used once, to avoid nonce reuse.
Sourcepub fn to_nonce_pks(&self) -> NoncePks
pub fn to_nonce_pks(&self) -> NoncePks
Convert into NoncePks.
Auto Trait Implementations§
impl Freeze for NonceKps
impl RefUnwindSafe for NonceKps
impl Send for NonceKps
impl Sync for NonceKps
impl Unpin for NonceKps
impl UnsafeUnpin for NonceKps
impl UnwindSafe for NonceKps
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