Skip to main content
The LibXMTP Identity API provides a robust identity and association management system for XMTP messaging. It implements XIP-46 to manage associations between wallets and installations within an inbox.

Core Concepts

Inbox Identity

An inbox in XMTP is identified by a unique InboxId and can have multiple associated members:
  • Wallet addresses (Ethereum, Passkey)
  • Installation keys (device/application identifiers)
  • Recovery identifier (primary wallet with special privileges)
The InboxId is generated deterministically from a wallet address and nonce:

Association State

The AssociationState 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)
See 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 inbox
  • AddAssociation - Associate a new member
  • RevokeAssociation - Remove a member
  • ChangeRecoveryIdentity - Change the recovery address
Updates are signed, verified, and applied sequentially to maintain consistency.

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):
See member.rs:28-36 for the distinction.

Authentication Flow

InboxOwner Trait

The InboxOwner trait defines the interface for entities that can own and sign for an inbox:
See 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 an IdentityStrategy to determine how the identity is initialized:
See 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:
See identity.rs:403-410 for the check.

References