npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

qxchat.ts

v1.2.0

Published

High-performance optimized selfbot SDK for QXChat client written natively for Bun

Readme


Why is QXChat.ts built only for Bun?

qxchat.ts is optimized for high-performance selfbot applications. To achieve maximum throughput with near-zero latency, it runs exclusively on the Bun runtime.

[!WARNING] Strict Runtime Restriction: This SDK contains a hard runtime environment lock. Any attempt to import or execute it outside of Bun (e.g. under Node.js or in a standard browser environment) will immediately throw a fatal initialization error.


Key Benefits for Developers

  • Zero Dependency Footprint: Light lockfile, zero third-party packages. We run entirely on Bun's built-in APIs.
  • Compile-Time Constraints: Username character constraints, message length bounds, and file sizes are enforced while you type via TypeScript branding.
  • Direct E2EE Integration: Fully integrated AES-GCM encryption with room ID as additional authenticated data (AAD). Message payloads are automatically encrypted/decrypted transparently.

Get Started in 30 Seconds

Install

bun add qxchat.ts

Requirements: Bun ≥ 1.1.0 and TypeScript 5.x


Benchmarks

This library is designed for low overhead and near-zero latency. Below are the execution benchmarks conducted natively under Bun (tested using a real connection to the QXChat production server):

Last Benchmarked: July 11, 2026

| Benchmark | Type | Metric / Operations | Duration (ms) | | :--- | :---: | :---: | :---: | | REST Auth Token Fetch | HTTP REST | Get session token | ~315.7 ms | | Gateway WS Connect & Identify | WebSocket | Established and ready | ~533.1 ms | | REST Profile Self-Fetch | HTTP REST | Refresh user session /me | ~205.6 ms | | Gateway Room Join | WebSocket | Join room by token | ~0.33 ms | | RTT E2EE Message (Send & Echo) | WebSocket / Crypto | local encrypt ➔ send ➔ server echo ➔ receive ➔ local decrypt | ~263.6 ms | | AES-GCM Encryption (CPU Local) | Cryptography | 10,000 local encryptions | ~1002.3 ms (0.100 ms/op) |

[!TIP] Key Caching & Native DNS Pre-warming: Thanks to Web Crypto key caching and native Bun DNS prefetching, the room joining takes under 0.4 ms and the E2EE messaging RTT is under 200 ms.


Quick Example

import { SelfbotClient, MessageBuilder, Events } from 'qxchat.ts';

const client = new SelfbotClient();

client.on(Events.Ready, async () => {
  console.log(`Connected as ${client.username}!`);

  const roomToken = '3f9ade207e2c5dbf58f1c91533ecac7b1dc5ba6066cc07951f9c5fcc5d9fa98c';
  await client.joinRoom(roomToken);

  const roomId = roomToken.slice(0, 32);

  const msg = new MessageBuilder('Hello from Snayz!')
    .setAttachment('qxchat.txt', 'Hello from QXChat.ts team!', 'text/plain');

  await client.sendMessage(roomId, msg);
});

client.on(Events.MessageCreate, (msg) => {
  if (msg.username !== client.username) {
    console.log(`[${msg.username}]: ${msg.text}`);
    
    msg.reply('ALLO?');
  }
});

const token = await SelfbotClient.fetchToken('user', 'pass');
await client.login(token);

Development

bun install          # install dependencies
bun test             # run tests
bun run typecheck    # run TypeScript type checks

Note: The tests, JSDocs, and code comments in this repository were generated by an AI and subsequently reviewed and reworked by a human.