{"id":49000,"library":"pump-chat-client","title":"pump-chat-client","description":"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.","status":"active","version":"1.0.1","language":"javascript","source_language":"en","source_url":"https://github.com/codingbutter/pump-chat-client","tags":["javascript","pump.fun","chat","websocket","solana","crypto","socket.io","typescript"],"install":[{"cmd":"npm install pump-chat-client","lang":"bash","label":"npm"},{"cmd":"yarn add pump-chat-client","lang":"bash","label":"yarn"},{"cmd":"pnpm add pump-chat-client","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"WebSocket transport and event-based communication","package":"socket.io-client","optional":false},{"reason":"Event emitter pattern for client events","package":"eventemitter3","optional":false}],"imports":[{"note":"ESM-only; named export, not default export.","wrong":"const PumpChatClient = require('pump-chat-client')","symbol":"PumpChatClient","correct":"import { PumpChatClient } from 'pump-chat-client'"},{"note":"TypeScript type, not a runtime value. Use for type annotations.","wrong":"","symbol":"IMessage","correct":"import { IMessage } from 'pump-chat-client'"},{"note":"TypeScript type for constructor options.","wrong":"","symbol":"PumpChatClientOptions","correct":"import { PumpChatClientOptions } from 'pump-chat-client'"}],"quickstart":{"code":"import { PumpChatClient } from 'pump-chat-client';\n\nconst client = new PumpChatClient({\n  roomId: 'YOUR_TOKEN_ADDRESS',\n  username: 'my-bot',\n  messageHistoryLimit: 50\n});\n\nclient.on('connected', () => {\n  console.log('Connected!');\n});\nclient.on('message', (msg) => {\n  console.log(`${msg.username}: ${msg.message}`);\n});\nclient.on('error', (err) => {\n  console.error(err);\n});\n\nclient.connect();\n\n// after some time\nconst msgs = client.getMessages(5);\nconsole.log('Last messages:', msgs);\nclient.disconnect();","lang":"typescript","description":"Connects to a pump.fun token chat room, listens for new messages, retrieves recent messages, and disconnects."},"warnings":[{"fix":"Ensure the client is running in a browser context with active pump.fun session, or pass session tokens via headers (not yet supported).","message":"sendMessage() requires authentication (valid pump.fun session cookies). Without auth, the call may fail silently or be ignored.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use import syntax or set type: module in package.json.","message":"The library uses ESM imports. Using require() will cause a runtime error.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Pin socket.io-client to the version compatible with the server (currently v4.x).","message":"Socket.IO client v4 may change reconnection behavior; verify compatibility.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'abstract':52 'analyt':79 'api':42 'automat':30 'backoff':33 'base':75 'bot':77 'chat':3,15,26,67,83 'client':4,7,61 'connect':11 'crypto':86 'dashboard':80 'definit':49 'differenti':51 'driven':41 'event':40 'event-driven':39 'eventemitt':44 'exponenti':32 'fulli':45 'histori':35 'integr':71 'interfac':62 'javascript':81 'key':50 'librari':8 'manag':36 'messag':27,34,68 'proprietari':55 'protocol':20,57 'provid':22 'pump':2 'pump-chat-cli':1 'pump.fun':13,53,82 'read':64 'real':24 'real-tim':23 'reconnect':31 'room':16 'send':66 'simpl':60 'socket.io':19,56,87 'solana':74,85 'solana-bas':73 'stream':28 'suitabl':69 'time':25 'token':14 'trade':76 'type':46 'typescript':48,88 'use':17 'v1.0.1':9 'via':43 'websocket':6,84","created_at":"2026-06-07T16:59:32.267603+00:00","updated_at":"2026-06-07T16:59:32.267603+00:00","problems":[{"fix":"npm install pump-chat-client && ensure tsconfig.json has moduleResolution: 'node'.","cause":"Package not installed or missing tsconfig.json configuration.","error":"Cannot find module 'pump-chat-client' or its corresponding type declarations."},{"fix":"Correct to: import { PumpChatClient } from 'pump-chat-client'","cause":"Using default import instead of named import.","error":"Uncaught TypeError: PumpChatClient is not a constructor"},{"fix":"Verify network connectivity and that the WebSocket URL is correct (handled internally).","cause":"pump.fun server not reachable or incorrect URL.","error":"Error: connect ECONNREFUSED <host>:<port>"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/codingbutter/pump-chat-client#readme","github":"https://github.com/codingbutter/pump-chat-client","docs":null,"changelog":null,"pypi":null,"npm":"pump-chat-client","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging","ai-ml"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}