Skip to main content

XMTP-JS

The xmtp-js client implementation is written in TypeScript for use with JavaScript applications.

Getting started

xmtp-js can be installed from NPM using npm install @xmtp/xmtp-js or cloned directly from its GitHub repository. Detailed documentation of the package can be found here.

Functionality overview

FunctionDescription
Wallet-based authenticationConnecting to a user's wallet in order to get the wallet address, to sign keys used for message signing and encryption, and to authenticate incoming messages
Wallet connection managementManaging changes in wallet addresses or chain ids; managing connection issues
Key pair generationCreating keys used for message signing and encryption, and advertising them to the network
Key storageStoring keys securely
Key signingSigning keys with a connected wallet
Relationship initiationCreating a secure messaging relationship between two wallets
Conversation initiationCreating a container of messages between two wallets
Message sendingCapturing plaintext and submitting it to the network
Message history retrievalRetrieving the history of messages between two wallets. Filterable by date range.
Message streamingReceiving new messages in real-time
Message content validationMiddleware for ensuring security of messages
Message format validationMiddleware for ensuring messages are properly formatted for the network