pub struct KeyReg { /* 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 KeyReg
impl KeyReg
sourcepub fn register(
&mut self,
stake: Stake,
pk: VerificationKeyPoP,
) -> Result<(), RegisterError>
pub fn register( &mut self, stake: Stake, pk: VerificationKeyPoP, ) -> 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) -> ClosedKeyReg<D>where
D: Digest + FixedOutput,
pub fn close<D>(self) -> ClosedKeyReg<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§
impl Eq for KeyReg
impl StructuralPartialEq for KeyReg
Auto Trait Implementations§
impl Freeze for KeyReg
impl RefUnwindSafe for KeyReg
impl Send for KeyReg
impl Sync for KeyReg
impl Unpin for KeyReg
impl UnwindSafe for KeyReg
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)