Developer FAQ for XMTP
Answers to frequently asked questions about developing with XMTP.
What works with XMTP?
In the spirit of web3 composability, here are just a few of the building blocks that work well with XMTP. Building your app with these tools can help you deliver and distribute an app—faster and with quality.
This list is not exhaustive and is just a starting point. A highly extensible protocol like XMTP can work with more tools than those listed in each section.
Wallet connection
To connect web3 wallets to your app:
- Thirdweb
- Example implementation in the XMTP React Native example app
- Example implementation in the XMTP React JS example app
- RainbowKit
- Example implementation in the XMTP Inbox Web app
- Support for WalletConnect v2 is now standard in RainbowKit. To learn how to upgrade, see Migrating to WalletConnect v2.
- WalletConnect
- wagmi
XMTP client SDKs require you to use ethers or another web3 library capable of supplying an ethers Signer. These wallet connection tools, as well as others, provide this capability.
Storage
To store encrypted and encoded message payload content:
- Example implementation in
xmtp-js
remote content types - Tutorial: Introducing remote media attachments
- Example implementation in
Decentralized social
- Lens
- Example implementation in Lenster
- Tutorial: Integrating Multiple Profiles with Lens
- CyberConnect
- Example implementation in the CyberConnect & XMTP Integration Demo App
- Tutorial: Build messaging for CyberConnect profiles
Decentralized app store
To launch your own dApp stores and list any dApp, including your own:
- Polygon dApp Store Kit
Wallet apps
XMTP can be used with EVM-compatible wallet apps that support ECDSA signing on the secp256k1 elliptic curve. These include common wallet apps such as:
- Coinbase Wallet
- MetaMask
- Rainbow Wallet
- Most wallets in the WalletConnect network
The XMTP SDK does not include a wallet app abstraction, as XMTP assumes that developers have a way to obtain a wallet app connection.
XMTP uses a signature from the blockchain account to create and enable the XMTP identity. Specifically, XMTP identities must be generated from and associated with an Ethereum account's public address and private key. As such, a connected wallet app must be present to generate the signature and initialize the API client in the client app.
A user can generate multiple XMTP identities from the same wallet app by changing to a different blockchain account.
Chains
XMTP works with externally owned accounts (EOAs) on Ethereum and Ethereum side-chains and L2s.
Because all Ethereum Virtual Machine (EVM) chains share the same Ethereum wallet and address format and XMTP messages are stored off-chain, XMTP is interoperable across EVM chains, including testnets. (XMTP itself does not use EVMs.)
For example, whether a user has their wallet app connected to Ethereum or an Ethereum side-chain or L2, their private key can generate and retrieve their XMTP key pair to give them access to XMTP.
XMTP is also chain-agnostic, so multi-chain support is possible.
Here are just a few of the chains supported by XMTP:
Want to propose a path to compatibility for other popular chains such as Aptos, Bitcoin, Cosmos, Flow, Hedera Hashgraph, Polkadot, Solana, Starkware, Stellar, Sui, and Tezos? Do it via an XMTP grant!
Have you built with a tool that works well with XMTP? Let's add it to this page. Share your experience with prxshant.eth
on xmtp.chat or using the feedback widget at the bottom of this page.
Which languages and environments does the XMTP SDK support?
The XMTP SDK is available for multiple languages, including JavaScript, Kotlin, Swift, and Dart.
Have other questions or ideas for future language or environment support? Post to the XMTP discussion forum.
Which web3 libraries does the XMTP SDK require?
The XMTP SDK currently requires you to use ethers or another web3 library capable of supplying an ethers Signer, such as wagmi.
Where can I get official XMTP brand assets?
See the XMTP brand guidelines GitHub repo.
How should I handle the XMTP onboarding flow in my app?
In your app onboarding flow, enable your users to activate XMTP DMs. User access to DMs can help with app engagement and re-engagement. For example, here is a prompt to activate XMTP DMs in the onboarding flow to claim a Lens handle:
In your app onboarding flow, request user permission to display app-specific push notifications to reach users outside of an app session.