Registry / messaging / pump-chat-client

pump-chat-client

JSON →
library1.0.1jsnpmunverified

A WebSocket client library (v1.0.1) for connecting to pump.fun token chat rooms using the Socket.IO protocol. It provides real-time chat message streaming with automatic reconnection (exponential backoff), message history management, and an event-driven API via EventEmitter. Fully typed with TypeScript definitions. Key differentiator: abstracts pump.fun's proprietary socket.io protocol into a simple client interface for reading and sending chat messages. Suitable for integration into Solana-based trading bots and analytics dashboards.

npm install pump-chat-client
INSTALL
IMPORT
SIG · PUMP-CHAT-CLIENT
P
pump-chat-client
messagingjavascriptv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PumpChatClient
✓ import { PumpChatClient } from 'pump-chat-client'
✗ const PumpChatClient = require('pump-chat-client')
ESM-only; named export, not default export.
IMessage
✓ import { IMessage } from 'pump-chat-client'
TypeScript type, not a runtime value. Use for type annotations.
PumpChatClientOptions
✓ import { PumpChatClientOptions } from 'pump-chat-client'
TypeScript type for constructor options.

Connects to a pump.fun token chat room, listens for new messages, retrieves recent messages, and disconnects.

import { PumpChatClient } from 'pump-chat-client'; const client = new PumpChatClient({ roomId: 'YOUR_TOKEN_ADDRESS', username: 'my-bot', messageHistoryLimit: 50 }); client.on('connected', () => { console.log('Connected!'); }); client.on('message', (msg) => { console.log(`${msg.username}: ${msg.message}`); }); client.on('error', (err) => { console.error(err); }); client.connect(); // after some time const msgs = client.getMessages(5); console.log('Last messages:', msgs); client.disconnect();
Debug
Known issues
gotchasendMessage() requires authentication (valid pump.fun session cookies). Without auth, the call may fail silently or be ignored.
fix
Ensure the client is running in a browser context with active pump.fun session, or pass session tokens via headers (not yet supported).
affects: >=1.0.0
breakingThe library uses ESM imports. Using require() will cause a runtime error.
fix
Use import syntax or set type: module in package.json.
affects: >=1.0.0
deprecatedSocket.IO client v4 may change reconnection behavior; verify compatibility.
fix
Pin socket.io-client to the version compatible with the server (currently v4.x).
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'pump-chat-client' or its corresponding type declarations.
Package not installed or missing tsconfig.json configuration.
fix
npm install pump-chat-client && ensure tsconfig.json has moduleResolution: 'node'.
Uncaught TypeError: PumpChatClient is not a constructor
Using default import instead of named import.
fix
Correct to: import { PumpChatClient } from 'pump-chat-client'
Error: connect ECONNREFUSED <host>:<port>
pump.fun server not reachable or incorrect URL.
fix
Verify network connectivity and that the WebSocket URL is correct (handled internally).
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
socket.io-clientrequiredWebSocket transport and event-based communication
eventemitter3requiredEvent emitter pattern for client events
Agent activity
17 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
pump-chat-client — npm install pump-chat-client · libregistry