Core Concepts
Inbox Identity
An inbox in XMTP is identified by a uniqueInboxId and can have multiple associated members:
- Wallet addresses (Ethereum, Passkey)
- Installation keys (device/application identifiers)
- Recovery identifier (primary wallet with special privileges)
InboxId is generated deterministically from a wallet address and nonce:
Association State
TheAssociationState represents the current state of an inbox at a specific point in time. It tracks:
- All associated members (wallets and installations)
- The recovery identifier (primary wallet)
- Seen signatures (for replay protection)
- Member relationships (who added whom)
associations.mdx:45-140 for implementation details.
Identity Updates
Identity updates are the mechanism for modifying an inbox’s association state. Each update contains one or more actions:CreateInbox- Initialize a new inboxAddAssociation- Associate a new memberRevokeAssociation- Remove a memberChangeRecoveryIdentity- Change the recovery address
Member Types
MemberIdentifier
Represents any member that can be associated with an inbox:Identifier
Identifier is a subset of MemberIdentifier that excludes installations (only account-level identifiers):
member.rs:28-36 for the distinction.
Authentication Flow
InboxOwner Trait
TheInboxOwner trait defines the interface for entities that can own and sign for an inbox:
lib.rs:90-96 for the trait definition.
Signature Types
LibXMTP supports multiple signature schemes:- ERC-191 - Standard Ethereum signed message
- ERC-1271 - Smart contract wallet signatures
- InstallationKey - Ed25519 signatures from installation keys
- P256 - Passkey signatures
- LegacyDelegated - V2 legacy key signatures (deprecated)
Identity Strategy
When building a client, you specify anIdentityStrategy to determine how the identity is initialized:
identity.rs:77-91 for strategy options.
Key Features
Multi-Device Support
A single inbox can have multiple installation keys, allowing users to access their messages from different devices:Wallet Flexibility
Users can associate multiple wallet addresses with a single inbox:Secure Revocation
The recovery identifier can revoke associations, including cascading revocation of child installations:Replay Protection
All signatures are tracked to prevent replay attacks:Installation Limits
To prevent abuse, inboxes have a maximum number of installations:identity.rs:403-410 for the check.
Related Pages
- Inbox Management - Working with inboxes and identities
- Associations - Managing wallet and installation associations
References
- XIP-46: Identity Association State
- Source:
crates/xmtp_id/src/ - Source:
crates/xmtp_mls/src/identity.rs - Source:
crates/xmtp_mls/src/identity_updates.rs
