Quick Start
Installation
npm install @cryptalk/browser
pnpm install @cryptalk/browser
yarn add @cryptalk/browserUsage
import { Client } from "@cryptalk/browser";
// Create a new Cryptalk client
const client = await Client.create(signer, {
env: "production",
});
// Start a new conversation
const conversation = await client.conversations.newConversation(peerAddress);
// Send a message
await conversation.send("Hello, !");
// Listen for new messages
for await (const message of conversation.streamMessages()) {
console.log("New message:", message.content);
}Last updated