pub struct Coordinator { /* private fields */ }Expand description
Coordinates a FROST signing session between multiple participants.
Implementations§
Source§impl Coordinator
impl Coordinator
Sourcepub fn new(message: Vec<u8>, threshold: u16) -> Result<Self>
pub fn new(message: Vec<u8>, threshold: u16) -> Result<Self>
Create a new signing coordinator. Returns Err (rather than panicking) if
the CSPRNG health check fails.
Sourcepub fn session_id(&self) -> &[u8; 32]
pub fn session_id(&self) -> &[u8; 32]
The session ID.
Add a local share and generate its commitment.
Sourcepub fn add_remote_commitment(&mut self, msg: &FrostMessage) -> Result<()>
pub fn add_remote_commitment(&mut self, msg: &FrostMessage) -> Result<()>
Add a remote participant’s commitment.
Sourcepub fn has_enough_commitments(&self) -> bool
pub fn has_enough_commitments(&self) -> bool
Returns true if threshold commitments collected.
Generate our signature share (round 2).
Add a remote participant’s signature share.
Returns true if threshold shares collected.
Sourcepub fn aggregate(&self, share: &SharePackage) -> Result<Signature>
pub fn aggregate(&self, share: &SharePackage) -> Result<Signature>
Aggregate shares into a complete Schnorr signature.
Sourcepub fn aggregate_to_bytes(&self, share: &SharePackage) -> Result<[u8; 64]>
pub fn aggregate_to_bytes(&self, share: &SharePackage) -> Result<[u8; 64]>
Aggregate shares and return the 64-byte signature.
Trait Implementations§
Source§impl Drop for Coordinator
impl Drop for Coordinator
Auto Trait Implementations§
impl Forget for Coordinator
impl Freeze for Coordinator
impl Move for Coordinator
impl RefUnwindSafe for Coordinator
impl Send for Coordinator
impl Sync for Coordinator
impl Unpin for Coordinator
impl UnsafeUnpin for Coordinator
impl UnwindSafe for Coordinator
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