pub struct KeyRegistration { /* private fields */ }
Expand description
Struct that collects public keys and stakes of parties. Each participant (both the signers and the clerks) need to run their own instance of the key registration.
Implementations§
Source§impl KeyRegistration
impl KeyRegistration
Sourcepub fn register(
&mut self,
stake: Stake,
pk: BlsVerificationKeyProofOfPossession,
) -> Result<(), RegisterError>
pub fn register( &mut self, stake: Stake, pk: BlsVerificationKeyProofOfPossession, ) -> Result<(), RegisterError>
Verify and register a public key and stake for a particular party.
§Error
The function fails when the proof of possession is invalid or when the key is already registered.
Sourcepub fn close<D>(self) -> ClosedKeyRegistration<D>where
D: Digest + FixedOutput,
pub fn close<D>(self) -> ClosedKeyRegistration<D>where
D: Digest + FixedOutput,
Finalize the key registration.
This function disables KeyReg::register
, consumes the instance of self
, and returns a ClosedKeyReg
.
Trait Implementations§
Source§impl Clone for KeyRegistration
impl Clone for KeyRegistration
Source§fn clone(&self) -> KeyRegistration
fn clone(&self) -> KeyRegistration
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for KeyRegistration
impl Debug for KeyRegistration
Source§impl Default for KeyRegistration
impl Default for KeyRegistration
Source§fn default() -> KeyRegistration
fn default() -> KeyRegistration
Returns the “default value” for a type. Read more
Source§impl PartialEq for KeyRegistration
impl PartialEq for KeyRegistration
impl Eq for KeyRegistration
impl StructuralPartialEq for KeyRegistration
Auto Trait Implementations§
impl Freeze for KeyRegistration
impl RefUnwindSafe for KeyRegistration
impl Send for KeyRegistration
impl Sync for KeyRegistration
impl Unpin for KeyRegistration
impl UnwindSafe for KeyRegistration
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