xmtp 0.9.3

Safe, ergonomic Rust client SDK for the XMTP messaging protocol
Documentation
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, doc(auto_cfg))]
#![doc = include_str!("../README.md")]
#![allow(
    unsafe_code,
    reason = "FFI wrapper crate requires unsafe for C interop"
)]
// FFI wrapper crate: i32 ↔ usize casts at the C boundary are systematic and
// bounds-checked. Every public function follows the same error pattern (FFI
// call failure), so per-function `# Errors` docs would be pure boilerplate.
#![allow(
    clippy::cast_sign_loss,
    clippy::cast_possible_truncation,
    clippy::cast_possible_wrap,
    clippy::missing_errors_doc,
    reason = "FFI boundary casts are systematic and bounds-checked; every public function follows the same error pattern"
)]

pub mod client;
pub mod conversation;
pub mod error;
pub mod stream;
pub mod types;

mod ffi;

#[cfg(feature = "content")]
pub mod content;

pub mod resolve;

#[cfg(feature = "alloy")]
mod signer;

#[cfg(feature = "ledger")]
mod ledger;

#[cfg(feature = "ens")]
mod ens;

// Re-export core public API at crate root.
pub use client::{Client, ClientBuilder};
// Re-export standalone functions.
pub use client::{
    generate_inbox_id, get_inbox_id_for_identifier, init_logger, is_address_authorized,
    is_installation_authorized, libxmtp_version, verify_signed_with_public_key,
};
pub use conversation::{Conversation, GroupMember, Message};
#[cfg(feature = "ens")]
pub use ens::{DEFAULT_RPC, EnsResolver};
pub use error::{Result, XmtpError};
#[cfg(feature = "ledger")]
pub use ledger::LedgerSigner;
pub use resolve::{Recipient, Resolver};
#[cfg(feature = "alloy")]
pub use signer::AlloySigner;
pub use stream::{ConsentUpdate, MessageEvent, PreferenceUpdate, Subscription};
pub use types::{
    AccountIdentifier, ApiStats, ConsentEntityType, ConsentState, ConversationDebugInfo,
    ConversationMetadata, ConversationOrderBy, ConversationType, CreateDmOptions,
    CreateGroupOptions, Cursor, DeliveryStatus, DisappearingSettings, Env, GroupPermissionsPreset,
    HmacKey, HmacKeyEntry, IdentifierKind, IdentityStats, InboxState, KeyPackageStatus,
    LastReadTime, ListConversationsOptions, ListMessagesOptions, MembershipState, MessageKind,
    MetadataField, PermissionLevel, PermissionPolicy, PermissionPolicySet, PermissionUpdateType,
    Permissions, PreferenceKind, SendOptions, Signer, SortDirection, SyncResult,
};