pub fn assemble_vc_key_package_upload<Storage: StorageProvider>(
storage: &Storage,
epoch_id: EpochId,
generation: u32,
key_package_info: Vec<KeyPackageInfo>,
) -> Result<KeyPackageUpload, VirtualClientsError>Available on crate feature
extensions-draft and crate feature virtual-clients-draft and (32-bit or 64-bit) only.Expand description
Build a KeyPackageUpload for epoch_id from a batch’s generation and
its KeyPackageInfo entries, filling leaf_index from the
EmulationEpochState stored for that epoch.
The virtual client calls this after building a batch of KeyPackages with
KeyPackageBuilder::build_vc_batch to assemble the message it hands to
its sibling. generation is the single key_package operation generation
the batch consumed.
Returns VirtualClientsError::MissingEmulationEpochState if no state is
registered for epoch_id.