Skip to content

Latest commit

 

History

History

xmtp-e2ee

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

XMTP

See XMTP AI plugin

Installation

Install the xmtp-e2ee package for using in the users devices.

bun install xmtp-e2ee

Usage

This is how you can use the xmtp-e2ee package to create a client and handle messages.

It will always create an anonimous identity by default.

import { XMTP } from "xmtp-e2ee";

const xmtp = new XMTP(onMessage);

await xmtp.init();

const onMessage = async (message, user) => {
  console.log(`Decoded message: ${message.content.text} by ${user.address}`);
  // Your AI model response
  await xmtp.send({ message: response, originalMessage: message });
};