/// Query the registry for the MEGa public keys of all receivers.
///
/// The returned map is keyed by the index of the receiver.
Query the registry for the MEGa public keys of all receivers.
The returned map is keyed by the index of the receiver.
Query the registry for the MEGa public keys of all receivers . The returned map is keyed by the index of the receiver .
pub fn idkg_encryption_keys_from_registry(
    receivers: &IDkgReceivers,
    registry: &Arc<dyn RegistryClient>,
    registry_version: RegistryVersion,
) -> Result<BTreeMap<NodeIndex, MEGaPublicKey>, MegaKeyFromRegistryError> {
    receivers
        .iter()
        .map(|(index, receiver)| {
            let enc_pubkey = get_mega_pubkey(&receiver, registry, registry_version)?;
            Ok((index, enc_pubkey))
        })
        .collect()
}
pub fn idkg_encryption_keys_from_registry ( receivers : & IDkgReceivers , registry : & Arc < dyn RegistryClient > , registry_version : RegistryVersion , ) -> Result < BTreeMap < NodeIndex , MEGaPublicKey > , MegaKeyFromRegistryError > { receivers . iter ( ) . map ( | ( index , receiver ) | { let enc_pubkey = get_mega_pubkey ( & receiver , registry , registry_version ) ? ; Ok ( ( index , enc_pubkey ) ) } ) . collect ( ) }
Query the registry for the MEGa public keys of all receivers.
Query the registry for the MEGa public keys of all receivers .
receivers
&IDkgReceivers
registry
&Arc<dyn RegistryClient>
registry_version
RegistryVersion