Skip to main content

LibXMTP

LibXMTP is a shared library encapsulating the core functionality of the XMTP messaging protocol. It provides cryptographic operations, networking capabilities, and language bindings for multiple platforms.
LibXMTP uses MLS (Messaging Layer Security) to provide end-to-end encrypted group messaging with forward secrecy and post-compromise security.

Project Status

LibXMTP is currently in Alpha status. Expect breaking changes as the protocol and library evolve.

Key Features

  • Cross-platform support: Node.js, React Native, iOS, Android, and WebAssembly
  • MLS protocol: Industry-standard Messaging Layer Security for group messaging
  • End-to-end encryption: All messages are encrypted by default
  • Decentralized: No central server controls your conversations
  • Multi-device sync: Use XMTP across multiple installations
  • Group messaging: Create and manage group conversations with permissions
  • Direct messaging: 1:1 encrypted conversations

Architecture

LibXMTP is built as a Rust workspace with bindings for multiple platforms:
libxmtp/
├── crates/              # Core Rust implementation
│   ├── xmtp_mls         # MLS protocol implementation
│   ├── xmtp_api_grpc    # gRPC API client
│   ├── xmtp_db          # Database layer
│   └── xmtp_proto       # Protocol buffers
├── bindings/
│   ├── node             # Node.js bindings (NAPI)
│   ├── mobile           # iOS/Android bindings (UniFFI)
│   └── wasm             # WebAssembly bindings
└── sdks/
    ├── android          # Kotlin SDK
    └── ios              # Swift SDK

Supported Platforms

Node.js

Native Node.js bindings via NAPI-RS for server and desktop applications

iOS

Swift SDK with native performance using UniFFI bindings

Android

Kotlin SDK for Android apps with AAR distribution via Maven Central

WebAssembly

Browser-based applications with WASM bindings

Use Cases

  • Decentralized messaging apps: Build secure chat applications
  • Web3 notifications: Send notifications to blockchain addresses
  • DAO communication: Enable secure group discussions for DAOs
  • DeFi messaging: Add messaging to DeFi protocols
  • NFT community chat: Create token-gated communities

Why LibXMTP?

Security First

LibXMTP uses MLS, the IETF standard for secure group messaging, providing:
  • Forward secrecy
  • Post-compromise security
  • Authentication
  • Confidentiality

True Decentralization

No central authority controls your messages or conversations. The protocol is designed to work with decentralized infrastructure.

Developer Friendly

LibXMTP provides idiomatic bindings for each platform:
  • JavaScript/TypeScript for Node.js
  • Swift for iOS
  • Kotlin for Android
  • WASM for browsers

Production Ready

Built with Rust for memory safety and performance, LibXMTP is designed for production use with:
  • Encrypted local storage
  • Efficient sync protocols
  • Battle-tested cryptography

Next Steps

Installation

Install LibXMTP for your platform

Quickstart

Build your first XMTP app

Resources

Build docs developers (and LLMs) love