Skip to main content

xmtp_id/utils/
mod.rs

1#[cfg(any(test, feature = "test-utils"))]
2pub mod test;
3
4#[cfg(any(test, feature = "test-utils"))]
5pub mod passkey;
6#[cfg(any(test, feature = "test-utils"))]
7pub fn generate_inbox_id_credential() -> (String, xmtp_cryptography::XmtpInstallationCredential) {
8    use crate::InboxOwner;
9    let signing_key = xmtp_cryptography::XmtpInstallationCredential::new();
10    let wallet = xmtp_cryptography::utils::generate_local_wallet();
11    let inbox_id = wallet
12        .get_identifier()
13        .expect("generated wallet has an identifier")
14        .inbox_id(0)
15        .expect("generated identifier has an inbox");
16    (inbox_id, signing_key)
17}