Skip to main content

QuorumDispatcher

Trait QuorumDispatcher 

Source
pub trait QuorumDispatcher: Send + Sync {
    // Required methods
    fn sign(&self, slot: SlotId, data: &[u8]) -> Result<Vec<u8>, String>;
    fn decrypt(
        &self,
        slot: SlotId,
        ciphertext: &[u8],
    ) -> Result<Vec<u8>, String>;
    fn generate_keypair(&self, slot: SlotId) -> Result<Vec<u8>, String>;
}
Expand description

Signer trait — caller provides the actual coordinator dispatch.

Required Methods§

Source

fn sign(&self, slot: SlotId, data: &[u8]) -> Result<Vec<u8>, String>

Sign data using the threshold quorum at slot. Returns signature bytes.

Source

fn decrypt(&self, slot: SlotId, ciphertext: &[u8]) -> Result<Vec<u8>, String>

Decrypt ciphertext using the threshold quorum at slot. Returns plaintext.

Source

fn generate_keypair(&self, slot: SlotId) -> Result<Vec<u8>, String>

Trigger a DKG for a new threshold keypair.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§