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

@aezakmiproject/telemt-sdk

v1.2.0

Published

Zero-dependency TypeScript client for the Telemt MTProto proxy Control API — typed services, no-throw responses, Node 18+

Readme

@aezakmiproject/telemt-sdk

npm License: ISC Node.js

TypeScript client for the Telemt Control API (/v1).

Typed services over HTTP/1.1 REST: users, config, reload, stats, runtime diagnostics, health, security, and limits. Zero runtime dependencies. Methods never throw — every call returns a flat ISdkResponse<T>.

Requires Node.js 18+ (uses global fetch and AbortSignal.timeout).

This project is an independent open-source client. It is not affiliated with Telegram or the Telemt authors.

Install

npm install @aezakmiproject/telemt-sdk
# or
pnpm add @aezakmiproject/telemt-sdk

Quick start

import { TelemtAPI } from '@aezakmiproject/telemt-sdk';

const api = new TelemtAPI({
  apiUrl: 'http://127.0.0.1:9091',
  auth: 'telemt-sdk-dev-token', // exact value of [server.api].auth_header
});

const res = await api.users.getAll();
if (!res.isOk) {
  console.error(res.code, res.message);
  return;
}

for (const user of res.data) {
  console.log(user.username, user.in_runtime, user.links.secure);
}

auth is sent verbatim as Authorization. Telemt does constant-time string comparison, not Bearer/OAuth parsing — do not prefix Bearer unless that prefix is literally part of auth_header.

Services

| Property | What it covers | | --- | --- | | api.users | CRUD, enable/disable, rotate secret, reset quota | | api.config | Read / merge-patch config.toml | | api.system | Build info, reload, waitForReload | | api.health | Liveness and readiness | | api.stats | Counters, upstreams, DCs, ME writers | | api.runtime | Gates, ME pool/quality, events, TLS fingerprints | | api.security | API posture and IP whitelist | | api.limits | Effective timeouts / pool / per-user limits |

Full method list, request/response types, and feature gates: docs/api.md.

WEB-proxy session control (api.web) is not implemented yet.

Responses

Every method returns the same shape. Success and transport failure both land here — there is no try/catch around SDK calls.

interface ISdkResponse<T> {
  isOk: boolean;
  data?: T;
  code?: TelemtErrorCode;
  message?: string;
  revision?: string;   // success only — SHA-256 of config.toml
  requestId?: number;  // Telemt-side errors only
}

A 202 from a user mutation is still isOk: true. The write is on disk; check UserInfo.in_runtime (or call api.system.reload()) before treating the user as live.

Optimistic locking: pass { ifMatch: true } on mutations to send the last seen revision as If-Match.

Details: Client & responses · Error codes

Documentation

| Doc | Contents | | --- | --- | | Getting started | Install, first call, local stand | | Client & responses | Envelope, If-Match, 202 vs 200 | | API reference | Every service method | | Errors | Server and sdk_* codes | | Development | Docker stand, tests, examples | | Integration contract | Wire format, gates, server constraints | | Decisions | Why the types look the way they do |

Runnable scripts live in examples/.

Local Telemt stand

cd docker && docker compose up -d

| | | | --- | --- | | API | http://127.0.0.1:9091 | | Authorization | telemt-sdk-dev-token | | Seeded users | alice, bob, web-user |

Ports bind to 127.0.0.1 only. The API token and user secrets in docker/ are lab fixtures — do not reuse them in production. See Development.

Contributing

See CONTRIBUTING.md. Please follow the Code of Conduct.

Security

See SECURITY.md. Do not file public issues for vulnerabilities.

License

ISC