pub fn new_with_idkg_dealing_encryption_key_generation(
        registry_client: Arc<dyn RegistryClient>,
        node_id: NodeId,
    ) -> (Self, PublicKeyProto) {
        let (config, temp_dir) = CryptoConfig::new_in_temp_dir();
        let crypto_root = temp_dir.path().to_path_buf();
        let idkg_dealing_encryption_pubkey = generate_idkg_dealing_encryption_keys(&crypto_root);
        let temp_crypto =
            TempCryptoComponent::new_with(registry_client, node_id, &config, temp_dir);
        (temp_crypto, idkg_dealing_encryption_pubkey)
    }
// Note that in this method we cannot simply use Self::new and then
// pass the path of the returned crypto component to the key generation
// method. This is because the key generation method will create
// its own CSP, which will lead to synchronization/consistency issues
// in the secret key store.
Note that in this method we cannot simply use Self::new and then
pass the path of the returned crypto component to the key generation
method. This is because the key generation method will create
its own CSP, which will lead to synchronization/consistency issues
in the secret key store.
Note that in this method we cannot simply use Self :: new and then pass the path of the returned crypto component to the key generation method . This is because the key generation method will create its own CSP which will lead to synchronization / consistency issues in the secret key store .
pub fn new_with_idkg_dealing_encryption_key_generation(
        registry_client: Arc<dyn RegistryClient>,
        node_id: NodeId,
    ) -> (Self, PublicKeyProto) {
        let (config, temp_dir) = CryptoConfig::new_in_temp_dir();
        let crypto_root = temp_dir.path().to_path_buf();
        let idkg_dealing_encryption_pubkey = generate_idkg_dealing_encryption_keys(&crypto_root);
        let temp_crypto =
            TempCryptoComponent::new_with(registry_client, node_id, &config, temp_dir);
        (temp_crypto, idkg_dealing_encryption_pubkey)
    }
pub fn new_with_idkg_dealing_encryption_key_generation ( registry_client : Arc < dyn RegistryClient > , node_id : NodeId , ) -> ( Self , PublicKeyProto ) { let ( config , temp_dir ) = CryptoConfig :: new_in_temp_dir ( ) ; let crypto_root = temp_dir . path ( ) . to_path_buf ( ) ; let idkg_dealing_encryption_pubkey = generate_idkg_dealing_encryption_keys ( & crypto_root ) ; let temp_crypto = TempCryptoComponent :: new_with ( registry_client , node_id , & config , temp_dir ) ; ( temp_crypto , idkg_dealing_encryption_pubkey ) }
Note that in this method we cannot simply use Self::new and then
pass the path of the returned crypto component to the key generation
method.
Note that in this method we cannot simply use Self :: new and then pass the path of the returned crypto component to the key generation method .
registry_client
Arc<dyn RegistryClient>
node_id
NodeId
registry_client
Arc<dyn RegistryClient>
node_id
NodeId