core_crypto_ffi/core_crypto/
client.rs

1#[cfg(target_family = "wasm")]
2use wasm_bindgen::prelude::*;
3
4use crate::{Ciphersuite, CoreCrypto, CoreCryptoResult, CredentialType};
5
6#[cfg_attr(not(target_family = "wasm"), uniffi::export)]
7#[cfg_attr(target_family = "wasm", wasm_bindgen)]
8impl CoreCrypto {
9    /// See [core_crypto::mls::MlsCentral::client_public_key]
10    pub async fn client_public_key(
11        &self,
12        ciphersuite: Ciphersuite,
13        credential_type: CredentialType,
14    ) -> CoreCryptoResult<Vec<u8>> {
15        self.inner
16            .public_key(ciphersuite.into(), credential_type.into())
17            .await
18            .map_err(Into::into)
19    }
20}