pub fn initial_dkg_transcript(
    initial_dkg_config: InitialDkgConfig,
    receiver_keys: &BTreeMap<NodeId, EncryptionPublicKeyWithPop>,
) -> dkg::Transcript {
    let dkg_config = initial_dkg_config.get();
    ensure_matching_node_ids(&dkg_config.receivers, receiver_keys);

    let registry_client = FakeRegistryClient::new(Arc::new(ProtoRegistryDataProvider::new()));
    let crypto_comps =
        TempCryptoComponent::multiple_new(&dkg_config.dealers, Arc::new(registry_client));

    let dealer_keys = encryption_public_keys(&dkg_config.dealers, &dkg_config, &crypto_comps);
    let dealer_and_receiver_keys = dealer_and_receiver_keys(&dealer_keys, receiver_keys);
    let dealings = dealings(
        &dkg_config.dealers,
        &dkg_config,
        &dealer_and_receiver_keys,
        &crypto_comps,
    );
    let fake_responses = fake_non_complaining_responses(&dkg_config.receivers);

    let transcript_generator = first_dealer(&dkg_config);
    crypto_for(transcript_generator, &crypto_comps)
        .create_transcript(
            &dkg_config,
            &dealer_and_receiver_keys,
            &dealings,
            &fake_responses,
        )
        .unwrap_or_else(|error| panic!("failed to create transcript: {:?}", error))
}
/// Creates an initial DKG transcript.
///
/// The transcript is created by performing the DKG protocol in a _centralized_
/// manner. This method must only be used for testing purposes since the
/// transcript is generated in a centralized manner.
///
/// # Panics
/// * If the `receiver_keys` don't match the receivers in the
///   `initial_dkg_config`.
Creates an initial DKG transcript.
The transcript is created by performing the DKG protocol in a _centralized_
manner. This method must only be used for testing purposes since the
transcript is generated in a centralized manner.
Creates an initial DKG transcript . The transcript is created by performing the DKG protocol in a _centralized_ manner . This method must only be used for testing purposes since the transcript is generated in a centralized manner .
pub fn initial_dkg_transcript(
    initial_dkg_config: InitialDkgConfig,
    receiver_keys: &BTreeMap<NodeId, EncryptionPublicKeyWithPop>,
) -> dkg::Transcript {
    let dkg_config = initial_dkg_config.get();
    ensure_matching_node_ids(&dkg_config.receivers, receiver_keys);
    let registry_client = FakeRegistryClient::new(Arc::new(ProtoRegistryDataProvider::new()));
    let crypto_comps =
        TempCryptoComponent::multiple_new(&dkg_config.dealers, Arc::new(registry_client));
    let dealer_keys = encryption_public_keys(&dkg_config.dealers, &dkg_config, &crypto_comps);
    let dealer_and_receiver_keys = dealer_and_receiver_keys(&dealer_keys, receiver_keys);
    let dealings = dealings(
        &dkg_config.dealers,
        &dkg_config,
        &dealer_and_receiver_keys,
        &crypto_comps,
    );
    let fake_responses = fake_non_complaining_responses(&dkg_config.receivers);
    let transcript_generator = first_dealer(&dkg_config);
    crypto_for(transcript_generator, &crypto_comps)
        .create_transcript(
            &dkg_config,
            &dealer_and_receiver_keys,
            &dealings,
            &fake_responses,
        )
        .unwrap_or_else(|error| panic!("failed to create transcript: {:?}", error))
}
pub fn initial_dkg_transcript ( initial_dkg_config : InitialDkgConfig , receiver_keys : & BTreeMap < NodeId , EncryptionPublicKeyWithPop > , ) -> dkg :: Transcript { let dkg_config = initial_dkg_config . get ( ) ; ensure_matching_node_ids ( & dkg_config . receivers , receiver_keys ) ; let registry_client = FakeRegistryClient :: new ( Arc :: new ( ProtoRegistryDataProvider :: new ( ) ) ) ; let crypto_comps = TempCryptoComponent :: multiple_new ( & dkg_config . dealers , Arc :: new ( registry_client ) ) ; let dealer_keys = encryption_public_keys ( & dkg_config . dealers , & dkg_config , & crypto_comps ) ; let dealer_and_receiver_keys = dealer_and_receiver_keys ( & dealer_keys , receiver_keys ) ; let dealings = dealings ( & dkg_config . dealers , & dkg_config , & dealer_and_receiver_keys , & crypto_comps , ) ; let fake_responses = fake_non_complaining_responses ( & dkg_config . receivers ) ; let transcript_generator = first_dealer ( & dkg_config ) ; crypto_for ( transcript_generator , & crypto_comps ) . create_transcript ( & dkg_config , & dealer_and_receiver_keys , & dealings , & fake_responses , ) . unwrap_or_else ( | error | panic ! ( " " error ) ) }
Creates an initial DKG transcript.
Creates an initial DKG transcript .
initial_dkg_config
InitialDkgConfig
receiver_keys
&BTreeMap<NodeId, EncryptionPublicKeyWithPop>
initial_dkg_config
InitialDkgConfig
receiver_keys
&BTreeMap<NodeId, EncryptionPublicKeyWithPop>
panics
If the `receiver_keys` don't match the receivers in the
`initial_dkg_config`.
If the ` receiver_keys ` don ' t match the receivers in the ` initial_dkg_config ` .