pub fn create_transcript(
    threshold: NumberOfNodes,
    verified_dealings: &BTreeMap<EphemeralPublicKeyBytes, CLibDealingBytes>,
    verified_responses: &[Option<CLibVerifiedResponseBytes>],
) -> Result<CLibTranscriptBytes, DkgCreateTranscriptError> {
    let dealings =
        transcript_util::get_valid_dealings(threshold, verified_dealings, verified_responses)?;
    let receiver_data =
        transcript_util::simple::combine_receiver_shares(&dealings, verified_responses)?;
    let public_coefficients = transcript_util::simple::combine_public_coefficients(&dealings)?;
    let dealer_public_keys: Vec<EphemeralPublicKeyBytes> = dealings.keys().cloned().collect();

    Ok(CLibTranscriptBytes {
        dealer_public_keys,
        public_coefficients,
        receiver_data,
        dealer_reshare_indices: None,
    })
}
/// Combines all valid dealings into a short transcript.
///
/// Note:  Responses containing at least one invalid
/// complaint are excluded, even if other complaints are valid.
///
/// # Arguments
/// * `threshold` - the minimum number of signatures needed for a valid
///   threshold signature.
/// * `verified_dealings` - the dealings that passed initial verification. Note:
///   This takes the standard form for per-dealer data:  A map from the dealer's
///   public key to the dealing.
/// * `verified_responses` - the responses that passed initial verification.
///   Note: this takes the standard form for per-receiver data:  A vector of
///   options which are `Some` for valid receivers and `None` for disqualified
///   or non-participating receivers.
/// # Prerequisites
/// * We assume that all dealings are consistent with the threshold.  This
///   SHOULD have been confirmed when validating the dealings.
/// # Panics
/// This method is not expected to panic.
/// # Errors
/// This method MUST return an error if:
/// * Any arguments are malformed.
/// * The number of dealings is not at least `threshold`.
/// * The number of responses is not at least `2 * threshold - 1`.
/// * The number of valid dealings is not at least `1`.
Combines all valid dealings into a short transcript.
Note:  Responses containing at least one invalid
complaint are excluded, even if other complaints are valid.
Combines all valid dealings into a short transcript . Note : Responses containing at least one invalid complaint are excluded even if other complaints are valid .
pub fn create_transcript(
    threshold: NumberOfNodes,
    verified_dealings: &BTreeMap<EphemeralPublicKeyBytes, CLibDealingBytes>,
    verified_responses: &[Option<CLibVerifiedResponseBytes>],
) -> Result<CLibTranscriptBytes, DkgCreateTranscriptError> {
    let dealings =
        transcript_util::get_valid_dealings(threshold, verified_dealings, verified_responses)?;
    let receiver_data =
        transcript_util::simple::combine_receiver_shares(&dealings, verified_responses)?;
    let public_coefficients = transcript_util::simple::combine_public_coefficients(&dealings)?;
    let dealer_public_keys: Vec<EphemeralPublicKeyBytes> = dealings.keys().cloned().collect();
    Ok(CLibTranscriptBytes {
        dealer_public_keys,
        public_coefficients,
        receiver_data,
        dealer_reshare_indices: None,
    })
}
pub fn create_transcript ( threshold : NumberOfNodes , verified_dealings : & BTreeMap < EphemeralPublicKeyBytes , CLibDealingBytes > , verified_responses : & [ Option < CLibVerifiedResponseBytes > ] , ) -> Result < CLibTranscriptBytes , DkgCreateTranscriptError > { let dealings = transcript_util :: get_valid_dealings ( threshold , verified_dealings , verified_responses ) ? ; let receiver_data = transcript_util :: simple :: combine_receiver_shares ( & dealings , verified_responses ) ? ; let public_coefficients = transcript_util :: simple :: combine_public_coefficients ( & dealings ) ? ; let dealer_public_keys : Vec < EphemeralPublicKeyBytes > = dealings . keys ( ) . cloned ( ) . collect ( ) ; Ok ( CLibTranscriptBytes { dealer_public_keys , public_coefficients , receiver_data , dealer_reshare_indices : None , } ) }
Combines all valid dealings into a short transcript.
Combines all valid dealings into a short transcript .
threshold
NumberOfNodes
verified_dealings
&BTreeMap<EphemeralPublicKeyBytes, CLibDealingBytes>
verified_responses
&[Option<CLibVerifiedResponseBytes>]
threshold
NumberOfNodes
verified_dealings
&BTreeMap<EphemeralPublicKeyBytes, CLibDealingBytes>
verified_responses
&[Option<CLibVerifiedResponseBytes>]
prerequisites
We assume that all dealings are consistent with the threshold.  This
SHOULD have been confirmed when validating the dealings.
We assume that all dealings are consistent with the threshold . This SHOULD have been confirmed when validating the dealings .
panics
This method is not expected to panic.
This method is not expected to panic .
errors
This method MUST return an error if:
Any arguments are malformed.
The number of dealings is not at least `threshold`.
The number of responses is not at least `2 * threshold - 1`.
The number of valid dealings is not at least `1`.
This method MUST return an error if : Any arguments are malformed . The number of dealings is not at least ` threshold ` . The number of responses is not at least ` 2 * threshold - 1 ` . The number of valid dealings is not at least ` 1 ` .