The Cryptalk SDK is a powerful tool designed for building decentralized messaging applications, with a strong focus on enabling communication and data exchange for Real World Asset (RWA) tokenization and related use cases. While built upon a fork of XMTP, Cryptalk enhances and tailors the technology to meet the specific needs of RWA ecosystems.
- Decentralized Messaging: Cryptalk enables secure, peer-to-peer messaging without reliance on centralized servers, ensuring greater resilience and user control.
- RWA-Focused Enhancements: Cryptalk is specifically designed to support the unique requirements of RWA tokenization, including secure exchange of sensitive information, transaction details, and asset-related data.
- Secure and Private: Messages are end-to-end encrypted, ensuring that only the intended recipients can access the content.
- Flexible and Extensible: The SDK is designed to be highly flexible, allowing developers to customize and extend it to fit a wide range of RWA applications.
- Cross-Platform Compatibility: Supports both browser and Node.js environments.
You can install the Cryptalk SDK using your preferred package manager:
NPM
npm install @cryptalk/browser
PNPM
pnpm install @cryptalk/browser
Yarn
yarn add @cryptalk/browser
*Usage
import { WalletClient } from "@reown/appkit";
import { RWAMarketplaceSDK } from "@cryptalk/browser";
// Connect a Reown WalletClient
const wc = new WalletClient();
await wc.connect();
// Initialize the RWAMarketplaceSDK
const rwaMarketplace = await RWAMarketplaceSDK.connect(wc);
// Example: Listing a new RWA
const metadata = {
title: "Example Asset",
description: "Description of the asset",
image: "https://example.com/image.jpg",
tags: ["tag1", "tag2"],
category: "Category",
};
const listTx = await rwaMarketplace.listRWA(metadata);
console.log("RWA Listed:", listTx.hash);
// Example: Getting an RWA by ID
const rwa = await rwaMarketplace.getRWA(0);
console.log("RWA Details:", rwa);
// Example: Making an offer
const amount = BigInt(100); // in TALK
const offerTx = await rwaMarketplace.makeOffer(0, amount);
console.log("Offer Made:", offerTx.hash);
Cryptalk revolves around the following core concepts:
- Clients: Represent a user's identity and are used to send and receive messages.
- Conversations: Represent a communication channel between two or more clients.
- Messages: The data that is exchanged between clients within a conversation.
- RWA Context: Cryptalk introduces the concept of "RWA Context" to messages. This allows developers to attach specific metadata or references to Real World Assets, transactions, or other relevant information. This is crucial for building RWA-centric applications.
(Comprehensive documentation is in development.)
We welcome contributions to the Cryptalk SDK! Please see our contribution guide to learn more about how you can get involved.
Disclaimer The Cryptalk SDK is based on a fork of the XMTP protocol.