![banner](https://github.com/bosonprotocol/chat-sdk/raw/HEAD/docs/assets/banner.png)
Chat SDK for Boson Protocol v2
JS lib which extends @xmtp/xmtp-js, adding support for chat threads and further message types.
Install
npm i @bosonprotocol/chat-sdk
Usage
- Initialise SDK
- Get Chat Threads
- Send Message
-
const messageObj = {
threadId: {
exchangeId: "1",
buyerId: "2",
sellerId: "3"
},
contentType: MessageType.String,
version: "0.0.1",
content: {
value: "Example message"
}
};
const recipient = "0xabc123...";
await client.encodeAndSendMessage(messageObj, recipient);
- Monitor Chat Thread (i.e. for incoming messages)
Local Development