#![doc = include_str!("../../dkg.md")]
use super::*;
pub mod round1 {
use super::*;
pub type SecretPackage = frost::keys::dkg::round1::SecretPackage<E>;
pub type Package = frost::keys::dkg::round1::Package<E>;
}
pub mod round2 {
use super::*;
pub type SecretPackage = frost::keys::dkg::round2::SecretPackage<E>;
pub type Package = frost::keys::dkg::round2::Package<E>;
}
pub fn part1<R: RngCore + CryptoRng>(
identifier: Identifier,
max_signers: u16,
min_signers: u16,
mut rng: R,
) -> Result<(round1::SecretPackage, round1::Package), Error> {
frost::keys::dkg::part1(identifier, max_signers, min_signers, &mut rng)
}
pub fn part2(
secret_package: round1::SecretPackage,
round1_packages: &[round1::Package],
) -> Result<(round2::SecretPackage, Vec<round2::Package>), Error> {
frost::keys::dkg::part2(secret_package, round1_packages)
}
pub fn part3(
round2_secret_package: &round2::SecretPackage,
round1_packages: &[round1::Package],
round2_packages: &[round2::Package],
) -> Result<(KeyPackage, PublicKeyPackage), Error> {
frost::keys::dkg::part3(round2_secret_package, round1_packages, round2_packages)
}