xmtp
Safe, ergonomic Rust SDK for the XMTP messaging protocol.
Wraps the xmtp-sys FFI bindings with idiomatic Rust types, providing a high-level Client → Conversation → Message API for E2E encrypted DMs, groups, content types, identity management, ENS resolution, and real-time streaming.
Quick Start
use ;
// Create a client and register identity.
let signer = random?;
let client = builder
.env
.db_path
.build?;
// Send a DM.
let conv = client.dm?;
conv.send_text?;
// Stream messages in real time.
let _handle = stream_all_messages?;
Feature Flags
| Feature | Default | Description |
|---|---|---|
content |
✅ | Content type codecs (text, reactions, replies, attachments, read receipts) |
alloy |
Local private key signer via alloy-signer-local |
|
ledger |
Ledger hardware wallet signer via alloy-signer-ledger |
|
ens |
ENS name resolution via alloy-ens + alloy-provider |
License
Licensed under either of Apache License, Version 2.0 or MIT License at your option.