
Security News
AGENTS.md Gains Traction as an Open Format for AI Coding Agents
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
@unstoppabledomains/chat
Advanced tools
A library for decentralized chat with blockchain domains and gundb
You can use UnstoppableChat in a <script>
tag from a
CDN
Unstoppable Chat combines the technologies of blockchain domains and GunDB.
Gundb credentials are made from signing a blockchain domain using the domain owner's private key.
const domainName = 'example.crypto';
const username = sign(domainName, privateKey);
const password = sign(username, privateKey);
A gundb user is identified by their username and publicKey
The gundb username and publicKey are found in the blockchain domain's text record gundb.username.value and gundb.public_key.value. We recommend using the unstoppabledomains resolution library to help resolve blockchain domains.
const GUNDB_SUPER_PEER = 'https://unstoppable-superpeer.herokuapp.com/';
const chat = new UnstoppableChat(GUNDB_SUPER_PEER);
chat.join(username, password, domainName);
const contactsListener = await chat.loadContacts();
const contactInvitesListener = await chat.loadContactInvites();
contactsListener.on((contacts) => {
for (const contact of contacts) {
const contactMessagesListener = await chat.loadMessagesOfContact(
contact.pubKey,
contact.name,
);
contactMessagesListener.on((messages) => {});
}
});
// Auto accept contact invites
contactInvitesListener.on((contactInvites) => {
for (const contactInvite of contactInvites) {
chat.acceptContactInvite(
contactInvite.alias,
contactInvite.pubKey,
contactInvite.name,
);
}
});
chat.addContact(username, publicKey, domainName);
chat.sendMessageToContact(publicKey, message);
const channelsListener = await chat.loadChannels();
const channelInvitesListener = await chat.loadChannelInvites();
channelsListener.on((channels) => {});
channelInvitesListener.on((channelInvites) => {
for (const channelInvite of channelInvites) {
chat.acceptChannelInvite(channelInvite) ||
chat.denyChannelInvite(channelInvite);
}
});
const channel = await chat.createChannel(channelName);
chat.inviteToChannel(channel, username, publicKey, domainName);
chat.leaveChannel(channel);
const announcementsListener = await chat.loadAnnouncements();
const announcementInvitesListener = await chat.loadAnnouncementInvites();
announcementsListener.on((announcements) => {});
announcementInvitesListener.on((announcementInvites) => {
for (const announcementInvite of announcementInvites) {
chat.acceptAnnouncementInvite(announcementInvite) ||
chat.denyAnnouncementInvite(announcementInvite);
}
});
const announcement = await chat.createAnnouncement(announcementName);
chat.inviteToAnnouncement(announcement, username, publicKey, domainName);
chat.leaveAnnouncement(announcement);
FAQs
Decentralized chat library
The npm package @unstoppabledomains/chat receives a total of 1 weekly downloads. As such, @unstoppabledomains/chat popularity was classified as not popular.
We found that @unstoppabledomains/chat demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.