Comment on page
Identity Messaging SDK
DecentKit's Identity Messaging SDK provides developers with a versatile toolkit for creating secure, private, and interactive messaging features between parties in both web2 and web3 environments.
Example use cases include adding group chats to games, enriching an existing wallet or marketplace with messaging features, fostering creative communities by connecting chats to NFT collectibles, or simply connecting users in traditional web2 apps to identities in web3.
This SDK addresses the problem of 'how do I message another identity securely.'
Privacy and security are core to the Identity Messaging SDK. End-to-end encryption (e2ee) ensures that all direct messages between parties remain confidential, visible only to the sender and receiver, protecting communication from any potential eavesdroppers or leaks.
By using wallet address endpoints, the SDK enables direct peer-to-peer interactions and eliminates the need for intermediaries, thereby enhancing privacy and control over personal data. Any supporting app or wallet can reach any other supporting app or wallet.
The SDK extends its e2ee capabilities to group chats, allowing users to communicate securely within groups. Facilitating secure discussions among multiple users enables community discussions and transactions.
The SDK includes support for push notifications from both Apps and Dapps to ensure that users stay up-to-date with messages and interactions while enhancing user engagement and participation in discussions.
Bridging the gap between "web2" and "web3" environments, the SDK supports communication between multiple forms of identifiers. This interoperability facilitates seamless interactions between users in the traditional web and blockchain realms.
To increase the quality and security of group interactions, the SDK provides functionality to create token-gated, credential-gated, and trust-score-gated communities. By requiring token ownership for access, communities can curate a member base and enhance the quality of interactions while protecting against spam and malicious activity.
Effective moderation is crucial to communities for maintaining healthy and respectful environments. The SDK includes tools that help moderate behavior within communities to prevent abuse and ensure positive experiences.
💡 This SDK is in pre-alpha. The APIs and methods are likely to change significantly before the alpha release. This SDK is not yet publicly available on NPM.
Here's a simple guide to getting started with the SDK:
Step 1: Installation
Start by installing the SDK in your project. If you're using npm, the command will be:
npm install @decentkit/identity-messaging-sdk
Step 2: Initialization
Next, import and initialize the SDK in your application:
import DecentKit from '@decentkit/identity-messaging-sdk';
// Initialize with your app config
const decentKit = new DecentKit({
// ... config
});
Step 3: Wallet-to-Wallet Communication
To establish wallet-to-wallet communication:
// Establish a connection
const connection = decentKit.connect(<USER_WALLET_PROVIDER>);
// Send a message
connection.send(RECIPIENT, 'Hello, World!');
Step 4: Create a Token-Gated Community
Here's how to create a token-gated community:
// Create a community
const community = decentKit.createCommunity('COMMUNITY_NAME', 'TOKEN_ID');
// Add a member
community.addMember('USER_WALLET_ADDRESS');
Step 5: Using Moderation Tools
Moderation tools can help manage group activities:
// Kick a member out of the community
community.kickMember('USER_WALLET_ADDRESS');
// Mute a member
community.muteMember('USER_WALLET_ADDRESS');
Step 6: E2EE Group Chat
Creating an e2ee group chat:
// Create a group chat
const groupChat = decentKit.createGroupChat('CHAT_NAME');
// Add members
groupChat.addMember('USER_WALLET_ADDRESS');
// Send a message
groupChat.sendMessage('Hello, Group!');
Last modified 6mo ago