
Security News
Re-Enabled GitHub Actions Expose Thousands of Repositories to Mini Shai-Hulud
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.
chatterbox-core
Advanced tools
The core API for Chatterbox, a messaging application built on IPFS and libp2p.
The core API for Chatterbox, a messaging application built on IPFS and libp2p.
npm install chatterbox-core
const Chatterbox = require('chatterbox-core')
To create a new chatterbox core instance, await on a call to the factory function that is the default export for the module. Note a "ready" IPFS instance is required with pubsub enabled.
const Chatterbox = require('chatterbox-core')
const cbox = await Chatterbox(ipfs, [options])
ipfs: IPFSoptions: Object
repoDir: String (default /.chatterbox)topics: Object
broadcast: String (default /chatterbox/broadcast)beacon: String (default /chatterbox/beacon)friendsMessageHistorySize: Number (default 1000)beaconInterval: Number (default 5 * 60 * 1000)cbox.destroy()Destroy the chatterbox instance.
Promise
cbox.friendsManage friends.
cbox.friends.add(peerId, [details])peerId: Stringdetails: Object
name: Stringavatar: StringPromise
cbox.friends.feed([options])Live updating friend list. Same output as cbox.peers.feed except all peers are friends.
options: Object
signal: AbortSignalfilter: FunctionAsyncIterable<Object[]>
for await (const friends of cbox.friends.feed())
friends.forEach(peerInfo => console.log(peerInfo))
cbox.friends.remove(peerId)peerId: StringPromise
cbox.messagesManage messages received from peers.
cbox.messages.broadcast(text)Send a message to all peers connected to the chatterbox network. Note: this is a temporary PoC API call!
text: StringPromise
cbox.messages.feed(peerId, [options])Live updating list of messages for a given peer.
peerId: Stringoptions: Object
signal: AbortSignalAsyncIterable<Object[]>
for await (const list of cbox.messages.feed('Qm...'))
list.forEach(msg => console.log(msg))
Each message:
id: Stringtext: StringreceivedAt: NumberreadAt: Numbercbox.messages.list(peerId)Get the messages stored for a given peer.
peerId: StringPromise<Object[]>
Each message:
id: Stringtext: StringreceivedAt: NumberreadAt: Numbercbox.messages.read(peerId, messageId)Set the readAt field for a given message to the current time (if not already set).
peerId: StringmessageId: StringPromise
cbox.peercbox.peer.get()Get the local peer's info.
Promise<Object>
id: Stringname: Stringavatar: StringlastSeenAt: NumberlastMessage: Object
text: StringreceivedAt: NumberreadAt: Numbercbox.peer.set(details)Set the peer's info.
details: Object
name: Stringavatar: StringPromise
cbox.peersInformation about peers in the chatterbox network.
cbox.peers.feed([options])Live updating list of known peers in the chatterbox network.
options: Object
filter: Functionsignal: AbortSignalAsyncIterable<Object[]>
for await (const list of cbox.peers.feed())
list.forEach(peerInfo => console.log(peerInfo))
Each peer info:
id: Stringname: Stringavatar: StringlastSeenAt: NumberlastMessage: Object
id: Stringtext: StringreceivedAt: NumberreadAt: NumberisFriend: Booleancbox.peers.gc([options])Clean up peers. Pass an optional filter function.
options: Object
filter: Function (default: collect peers last seen more than an hour ago that are not friends and are not the local peer)Promise
cbox.peers.get(peerId)Get details stored for the passed Peer ID.
peerId: StringPromise<Object>
Peer details:
id: Stringname: Stringavatar: StringlastSeenAt: NumberlastMessage: Object
id: Stringtext: StringreceivedAt: NumberreadAt: NumberisFriend: Booleancbox.peers.set(peerId, details)Set properties for a peer.
peerId: Stringdetails: Object
name: Stringavatar: StringlastSeenAt: NumberlastMessage: Object
id: Stringtext: StringreceivedAt: NumberreadAt: NumberisFriend: Boolean/.chatterbox
├── peers
| ├── QmPeer0
| | ├── info.json # Peer info object
| | └── messages.json # Array of received messages
| ├── QmPeer1
| └── QmPeer2
└── version.json # Data store layout version
peers/Qm.../info.jsonPeer data.
{
"id": "QmPeerId",
"name": "Dave",
"avatar": "http://ipfs.io/ipfs/QmAvatar",
"lastSeenAt": 1568883407737,
"lastMessage": {
"id": "HexMessageId",
"text": "Hello World!",
"receivedAt": 1568883407737,
"readAt": 1568883407737
},
"isFriend": false
}
peers/Qm.../messages.jsonLength limited messages received by a peer. Stored by receivedAt in ascending order.
[
{
"id": "HexMessageId",
"text": "Hello World!",
"receivedAt": 1568883407737,
"readAt": 1568883407737
}
]
messages/index.json and then per message file as id (messages/[id].json) or receivedAt time (messages/1568883407737.json).messages.ndjson for streamingFeel free to dive in! Open an issue or submit PRs.
MIT © Alan Shaw
FAQs
The core API for Chatterbox, a messaging application built on IPFS and libp2p.
We found that chatterbox-core demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Two compromised GitHub Actions were re-enabled with malicious tags intact, exposing thousands of downstream repositories to Mini Shai-Hulud.

Research
/Security News
A malicious Firefox extension fetches its payload after installation to evade detection, steal Google session cookies, and automate account takeover.

Research
/Security News
The compromise affects MemTensor's MemOS, an open source memory framework for large language models (LLMs) and AI agents. Both npm package @memtensor/memos-cloud-openclaw-plugin and the PyPI package MemoryOS are compromised. They drop cross-platform Go binaries that exfiltrate developer secrets.