use crate::bls::Signature;
use crate::keys::PublicKey;
pub trait ThresholdKey: Sized {
fn split(&self, m: usize, n: usize) -> Vec<Self>;
fn recover(fragments: &[Self]) -> Self;
fn is_fragment(&self) -> bool;
}
pub trait ThresholdSignature: Sized {
fn assemble(fragments: &[Self]) -> Self;
fn is_fragment(&self) -> bool;
}
pub trait PRSKey: Sized {
fn resigning_key(&self, bob_pubkey: &PublicKey) -> Self;
fn designated_key(&self, alice_pubkey: &PublicKey) -> Self;
fn resign(&self, signature: &Signature) -> Signature;
}