pub fn receiver_keys(
            receiver_keys: &BTreeMap<NodeIndex, CspFsEncryptionPublicKey>,
        ) -> Result<
            BTreeMap<NodeIndex, g20_internal_types::FsEncryptionPublicKey>,
            (NodeIndex, ni_dkg_errors::MalformedPublicKeyError),
        > {
            receiver_keys
                .iter()
                .map(|(node_index, public_key)| {
                    fs_public_key(*public_key)
                        .map(|public_key| (*node_index, public_key))
                        .map_err(|error| (*node_index, error))
                })
                .collect()
        }
/// Converts a map of generic public keys to the variant used by
/// NiDkg_Groth20.
///
/// # Errors
/// This returns an error if at least one of the public keys is
/// not of the type expected by NiDkg_Groth20.
Converts a map of generic public keys to the variant used by
NiDkg_Groth20.
Converts a map of generic public keys to the variant used by NiDkg_Groth20 .
pub fn receiver_keys(
            receiver_keys: &BTreeMap<NodeIndex, CspFsEncryptionPublicKey>,
        ) -> Result<
            BTreeMap<NodeIndex, g20_internal_types::FsEncryptionPublicKey>,
            (NodeIndex, ni_dkg_errors::MalformedPublicKeyError),
        > {
            receiver_keys
                .iter()
                .map(|(node_index, public_key)| {
                    fs_public_key(*public_key)
                        .map(|public_key| (*node_index, public_key))
                        .map_err(|error| (*node_index, error))
                })
                .collect()
        }
pub fn receiver_keys ( receiver_keys : & BTreeMap < NodeIndex , CspFsEncryptionPublicKey > , ) -> Result < BTreeMap < NodeIndex , g20_internal_types :: FsEncryptionPublicKey > , ( NodeIndex , ni_dkg_errors :: MalformedPublicKeyError ) , > { receiver_keys . iter ( ) . map ( | ( node_index , public_key ) | { fs_public_key ( * public_key ) . map ( | public_key | ( * node_index , public_key ) ) . map_err ( | error | ( * node_index , error ) ) } ) . collect ( ) }
Converts a map of generic public keys to the variant used by
NiDkg_Groth20.
Converts a map of generic public keys to the variant used by NiDkg_Groth20 .
receiver_keys
&BTreeMap<NodeIndex, CspFsEncryptionPublicKey>
receiver_keys
&BTreeMap<NodeIndex, CspFsEncryptionPublicKey>
errors
This returns an error if at least one of the public keys is
not of the type expected by NiDkg_Groth20.
This returns an error if at least one of the public keys is not of the type expected by NiDkg_Groth20 .