/// Create a dealing for threshold ECDSA
Create a dealing for threshold ECDSA
Create a dealing for threshold ECDSA
pub fn create_dealing(
    algorithm_id: ic_types::crypto::AlgorithmId,
    associated_data: &[u8],
    dealer_index: NodeIndex,
    threshold: NumberOfNodes,
    recipients: &[MEGaPublicKey],
    shares: &SecretShares,
    randomness: Randomness,
) -> Result<IDkgDealingInternal, IdkgCreateDealingInternalError> {
    let curve = match algorithm_id {
        AlgorithmId::ThresholdEcdsaSecp256k1 => Ok(EccCurveType::K256),
        _ => Err(IdkgCreateDealingInternalError::UnsupportedAlgorithm),
    }?;
    let seed = Seed::from_randomness(&randomness);
    IDkgDealingInternal::new(
        shares,
        curve,
        seed,
        threshold.get() as usize,
        recipients,
        dealer_index as usize,
        associated_data,
    )
    .map_err(|e| e.into())
}
pub fn create_dealing ( algorithm_id : ic_types :: crypto :: AlgorithmId , associated_data : & [ u8 ] , dealer_index : NodeIndex , threshold : NumberOfNodes , recipients : & [ MEGaPublicKey ] , shares : & SecretShares , randomness : Randomness , ) -> Result < IDkgDealingInternal , IdkgCreateDealingInternalError > { let curve = match algorithm_id { AlgorithmId :: ThresholdEcdsaSecp256k1 => Ok ( EccCurveType :: K256 ) , _ => Err ( IdkgCreateDealingInternalError :: UnsupportedAlgorithm ) , } ? ; let seed = Seed :: from_randomness ( & randomness ) ; IDkgDealingInternal :: new ( shares , curve , seed , threshold . get ( ) as usize , recipients , dealer_index as usize , associated_data , ) . map_err ( | e | e . into ( ) ) }
Create a dealing for threshold ECDSA
Create a dealing for threshold ECDSA
algorithm_id
ic_types::crypto::AlgorithmId
associated_data
&[u8]
dealer_index
NodeIndex
threshold
NumberOfNodes
recipients
&[MEGaPublicKey]
shares
&SecretShares
randomness
Randomness