/// Contextual data needed for the creation of a dealing.
///
/// Returns a byte vector consisting of:
/// - IDkgTranscriptId::SubnetId, as a byte-string (prefixed with its
///   64-bit-big-endian-integer length)
/// - IDkgTranscriptId::id, as a big-endian 64-bit integer
/// - RegistryVersion, as a big-endian 64-bit integer
/// - AlgorithmId, as an 8-bit integer value
Contextual data needed for the creation of a dealing.
Contextual data needed for the creation of a dealing .
fn context_data(
    transcript_id: &IDkgTranscriptId,
    registry_version: RegistryVersion,
    algorithm_id: AlgorithmId,
) -> Vec<u8> {
    let mut ret = Vec::with_capacity(8 + transcript_id.subnet().get().as_slice().len() + 8 + 8 + 1);
    ret.extend_from_slice(&(transcript_id.subnet().get().as_slice().len() as u64).to_be_bytes());
    ret.extend_from_slice(transcript_id.subnet().get().as_slice());
    ret.extend_from_slice(&(transcript_id.id() as u64).to_be_bytes());
    ret.extend_from_slice(&(registry_version.get() as u64).to_be_bytes());
    ret.push(algorithm_id as u8);
    ret
}
fn context_data ( transcript_id : & IDkgTranscriptId , registry_version : RegistryVersion , algorithm_id : AlgorithmId , ) -> Vec < u8 > { let mut ret = Vec :: with_capacity ( 8 + transcript_id . subnet ( ) . get ( ) . as_slice ( ) . len ( ) + 8 + 8 + 1 ) ; ret . extend_from_slice ( & ( transcript_id . subnet ( ) . get ( ) . as_slice ( ) . len ( ) as u64 ) . to_be_bytes ( ) ) ; ret . extend_from_slice ( transcript_id . subnet ( ) . get ( ) . as_slice ( ) ) ; ret . extend_from_slice ( & ( transcript_id . id ( ) as u64 ) . to_be_bytes ( ) ) ; ret . extend_from_slice ( & ( registry_version . get ( ) as u64 ) . to_be_bytes ( ) ) ; ret . push ( algorithm_id as u8 ) ; ret }
Contextual data needed for the creation of a dealing.
Contextual data needed for the creation of a dealing .
transcript_id
&IDkgTranscriptId
registry_version
RegistryVersion
algorithm_id
AlgorithmId