/// Converts an NI-DKG transcript into the corresponding protobuf
/// representation.
Converts an NI-DKG transcript into the corresponding protobuf
representation.
Converts an NI - DKG transcript into the corresponding protobuf representation .
pub fn initial_ni_dkg_transcript_record_from_transcript(
    transcript: NiDkgTranscript,
) -> InitialNiDkgTranscriptRecord {
    use ic_protobuf::types::v1::NiDkgId as NiDkgIdProto;
    let dkg_id = NiDkgIdProto::from(transcript.dkg_id);
    InitialNiDkgTranscriptRecord {
        id: Some(dkg_id),
        threshold: transcript.threshold.get().get(),
        committee: transcript
            .committee
            .get()
            .iter()
            .map(|node| node.get().into_vec())
            .collect(),
        registry_version: transcript.registry_version.get(),
        internal_csp_transcript: serde_cbor::to_vec(&transcript.internal_csp_transcript)
            .expect("failed to serialize CSP NI-DKG transript to CBOR"),
    }
}
pub fn initial_ni_dkg_transcript_record_from_transcript ( transcript : NiDkgTranscript , ) -> InitialNiDkgTranscriptRecord { use ic_protobuf :: types :: v1 :: NiDkgId as NiDkgIdProto ; let dkg_id = NiDkgIdProto :: from ( transcript . dkg_id ) ; InitialNiDkgTranscriptRecord { id : Some ( dkg_id ) , threshold : transcript . threshold . get ( ) . get ( ) , committee : transcript . committee . get ( ) . iter ( ) . map ( | node | node . get ( ) . into_vec ( ) ) . collect ( ) , registry_version : transcript . registry_version . get ( ) , internal_csp_transcript : serde_cbor :: to_vec ( & transcript . internal_csp_transcript ) . expect ( " " ) , } }
Converts an NI-DKG transcript into the corresponding protobuf
representation.
Converts an NI - DKG transcript into the corresponding protobuf representation .
transcript
NiDkgTranscript