pub(crate) fn new(backend: &impl OpenMlsCryptoProvider, mls_group: &MlsGroup) -> Self {
        let ciphersuite = mls_group.ciphersuite();
        let external_pub = mls_group
            .epoch_secrets()
            .external_secret()
            .derive_external_keypair(backend.crypto(), ciphersuite)
            .public;

        let group_id = mls_group.group_id().clone();
        let epoch = mls_group.context().epoch();
        let tree_hash = mls_group.tree().tree_hash(backend).into();
        let interim_transcript_hash = mls_group.interim_transcript_hash().into();
        let extensions = mls_group.extensions().into();

        PublicGroupStateTbs {
            group_id,
            epoch,
            tree_hash,
            interim_transcript_hash,
            extensions,
            external_pub: external_pub.into(),
            ciphersuite: ciphersuite.name(),
            signer_index: mls_group.tree().own_node_index(),
        }
    }
/// Creates a new `PublicGroupStateTbs` struct from the current internal state
/// of the group.
Creates a new `PublicGroupStateTbs` struct from the current internal state
of the group.
Creates a new ` PublicGroupStateTbs ` struct from the current internal state of the group .
pub(crate) fn new(backend: &impl OpenMlsCryptoProvider, mls_group: &MlsGroup) -> Self {
        let ciphersuite = mls_group.ciphersuite();
        let external_pub = mls_group
            .epoch_secrets()
            .external_secret()
            .derive_external_keypair(backend.crypto(), ciphersuite)
            .public;
        let group_id = mls_group.group_id().clone();
        let epoch = mls_group.context().epoch();
        let tree_hash = mls_group.tree().tree_hash(backend).into();
        let interim_transcript_hash = mls_group.interim_transcript_hash().into();
        let extensions = mls_group.extensions().into();
        PublicGroupStateTbs {
            group_id,
            epoch,
            tree_hash,
            interim_transcript_hash,
            extensions,
            external_pub: external_pub.into(),
            ciphersuite: ciphersuite.name(),
            signer_index: mls_group.tree().own_node_index(),
        }
    }
pub ( crate ) fn new ( backend : & impl OpenMlsCryptoProvider , mls_group : & MlsGroup ) -> Self { let ciphersuite = mls_group . ciphersuite ( ) ; let external_pub = mls_group . epoch_secrets ( ) . external_secret ( ) . derive_external_keypair ( backend . crypto ( ) , ciphersuite ) . public ; let group_id = mls_group . group_id ( ) . clone ( ) ; let epoch = mls_group . context ( ) . epoch ( ) ; let tree_hash = mls_group . tree ( ) . tree_hash ( backend ) . into ( ) ; let interim_transcript_hash = mls_group . interim_transcript_hash ( ) . into ( ) ; let extensions = mls_group . extensions ( ) . into ( ) ; PublicGroupStateTbs { group_id , epoch , tree_hash , interim_transcript_hash , extensions , external_pub : external_pub . into ( ) , ciphersuite : ciphersuite . name ( ) , signer_index : mls_group . tree ( ) . own_node_index ( ) , } }
Creates a new `PublicGroupStateTbs` struct from the current internal state
of the group.
Creates a new ` PublicGroupStateTbs ` struct from the current internal state of the group .
backend
&impl OpenMlsCryptoProvider
mls_group
&MlsGroup
backend
&impl OpenMlsCryptoProvider
mls_group
&MlsGroup