pub struct RoundSecretNonces { /* private fields */ }Expand description
In-memory store for MuSig2 secret cosign nonces used during round
signing. Entries are keyed by the first cosign pubkey of each round
attempt — that pubkey is freshly generated in [start_attempt],
uniquely identifies the attempt within a process, and is reachable
from the persisted AttemptState::AwaitingUnsignedVtxoTree.
Nonces never touch disk: persisting them risks signing twice with the same nonce, which is unsafe with MuSig2.
Implementations§
Source§impl RoundSecretNonces
impl RoundSecretNonces
pub fn new() -> Self
Sourcepub fn stash(
&self,
first_cosign_pubkey: PublicKey,
nonces: Vec<Vec<SecretNonce>>,
)
pub fn stash( &self, first_cosign_pubkey: PublicKey, nonces: Vec<Vec<SecretNonce>>, )
Insert nonces under the given key, replacing any previous entry.
Trait Implementations§
Source§impl Default for RoundSecretNonces
impl Default for RoundSecretNonces
Source§fn default() -> RoundSecretNonces
fn default() -> RoundSecretNonces
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for RoundSecretNonces
impl !RefUnwindSafe for RoundSecretNonces
impl Send for RoundSecretNonces
impl Sync for RoundSecretNonces
impl Unpin for RoundSecretNonces
impl UnsafeUnpin for RoundSecretNonces
impl UnwindSafe for RoundSecretNonces
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request