Skip to main content

Introduction to XMTP

We’re excited you’re here!

What is XMTP?

XMTP (Extensible Message Transport Protocol) is an open protocol and network for secure, private messaging between blockchain accounts (also known as crypto accounts).

XMTP's extensible design enables a diverse set of use cases for sending message data between web3 identities. Building with the XMTP client SDK, developers can enhance their apps with wallet-to-wallet direct messages, app-to-wallet notifications, and creator-to-community announcements. Because the XMTP network persists messages, and those messages are tied to web3 identities as opposed to a specific client, each web3 identity has a portable inbox of that it can access using any client app built with XMTP.

Developers can also build tools for decentralized apps (dapps), decentralized autonomous organizations (DAOs), creators, and protocols to re-engage users with web3 messaging.

XMTP is chain-agnostic but currently works only with Ethereum accounts, as well as other web3 identities that client apps built with XMTP can derive from Ethereum accounts, such as ENS names and Lens profiles.

note

In web3, "wallet" is commonly used shorthand that refers to a blockchain "wallet address" or "crypto account." When this documentation needs to refer to a tool for managing blockchain accounts, we use "wallet apps."

XMTP’s primary contributor, XMTP Labs, is funded by some of the industry’s top venture capital funds, including a16z Crypto and Coinbase Ventures.

XMTP at a glance

Here are some key considerations as you explore building with XMTP for secure web3 messaging:

ConsiderationDescription
Message directionBidirectional
Participant identitiesAny EVM blockchain EOA (externally owned account) can send a message to any other EVM blockchain EOA that has advertised its XMTP identity on the network.
Chain focusChain-agnostic, but currently requires an EVM blockchain account.
Wallet app compatibilityEVM-compatible wallets capable of signing with private keys, such as MetaMask, Coinbase Wallet, and Rainbow Wallet.
AuthenticationAn XMTP-specific key bundle derived from a wallet address signature is used to authenticate participant identities. To learn more about authentication, see Participant authentication and message encryption.
Message encryptionAES-256-GCM and modified Diffie-Hellman key agreement. Messages are encrypted individually by default and are readable by message participants only. To learn more about message encryption, see Participant authentication and message encryption.
Message deliveryMessages are immediately relayed by XMTP nodes, using the Waku protocol.
Message storageMessages are stored off-chain in the XMTP network, with all nodes currently hosted by XMTP Labs. We will publish a phased decentralization roadmap in Fall 2022.
Supported content typesPlaintext messages as a standard content type, but custom content types are supported as well. To learn more, see Content types.
Adoption of standard content typesOpen, extensible, and community-governed via XIP-5 (XMTP Improvement Proposal-5). To learn more, see XIP-5 Message Content Types.
ImplementationAny app built with the XMTP client SDK can send or receive messages. To learn more, see Client SDK.
Receiving messagesAny frontend built with the XMTP client SDK can receive messages. To learn more, see Client SDK.
EnvironmentsJavaScript. Swift and React Native are on the roadmap.
Message costMost messaging incurs no fee. As XMTP decentralizes, messaging between participants that opt-in will remain free, while unsolicited messages will often incur fees or see token staking requirements.
DecentralizationXMTP network nodes are run by XMTP Labs at this time. In the future, network node software will be open sourced and anyone will be welcome to operate a node. Client implementation is permissionless, nor is permission required to access and develop with the SDK. Permission isn't required to connect to the XMTP network to send/receive messages on behalf of users. We will publish a phased decentralization roadmap in Fall 2022.

Protocol overview

A user can send and receive encrypted XMTP messages using an app with an embedded XMTP client, authenticating using a wallet signature. XMTP network nodes persist the user's messages

Clients and nodes are implemented as Waku2 peers but with XMTP-specific functions and capabilities.

Clients

XMTP clients have the following responsibilities:

  • Encode and decode message formats using a standard interface
  • Encrypt and decrypt encoded message content
  • Submit and retrieve encrypted messages to and from the XMTP Network
  • Generate secure wallet-based identities capable of encrypting and decrypting messages
  • Persist wallet-based identities locally or on the XMTP Network

Nodes

XMTP nodes have the following responsibilities:

  • Relay encrypted messages into replicated storage
  • Retrieve encrypted messages from storage and deliver them to clients
  • Persist and advertise wallet-based identities

XMTP client SDK

The XMTP JavaScript SDK is a TypeScript implementation of an XMTP client for use with JavaScript and React apps.

Explore the XMTP JavaScript SDK on GitHub.

Have questions? Get help from the XMTP Discord community.

To learn more about how you can contribute to XMTP, see Contribute.