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

@ait-kit/api-client

v0.5.1

Published

Typed HTTP client helpers for Apps in Toss mTLS proxy services.

Readme

@ait-kit/api-client

Typed HTTP client helpers for calling an AIT Kit mTLS proxy.

npm install @ait-kit/api-client

Two entry points, two jobs

| Entry | Use it for | |---|---| | @ait-kit/api-client (root) | Calling the authenticated proxy routes (/internal/...) of a deployed AIT Kit Worker over plain HTTPS with a bearer token. Browser/edge safe: no Node APIs. | | @ait-kit/api-client/node | Building an mTLS transport (MtlsClient) you inject into @ait-kit/api-core so api-core itself talks to the Toss partner API over TLS with your client certificate. Node/Bun only. |

Root: proxy HTTP client

import { createTossMtlsHttpClient } from "@ait-kit/api-client";

const tossApi = createTossMtlsHttpClient({
  baseUrl: "https://internal-api.example.com",
  token: process.env.TOSS_HTTP_BEARER_TOKEN
});

/node: mTLS transport for api-core

import { createNodeMtlsTransport } from "@ait-kit/api-client/node";
import { createAppsInTossApiRpcFromOptions } from "@ait-kit/api-core";

const tossApi = createAppsInTossApiRpcFromOptions({
  mode: "forward",
  mtlsClient: createNodeMtlsTransport({
    cert: process.env.TOSS_CERT_PEM!, // PEM contents, not file paths
    key: process.env.TOSS_KEY_PEM!,
    ca: process.env.TOSS_CA_PEM, // optional extra CA bundle
    timeoutMs: 10_000,           // one budget: DNS + connect + TLS + headers + full body
    maxResponseBytes: 4 * 1024 * 1024
  })
});

Certificate and key materials are injected as PEM strings (or bytes); file discovery, environment parsing, and TLS server setup stay in your application. Server certificate verification is always on — there is no opt-out. The transport performs exactly one attempt per request: it never retries grants or message sends, and a transport failure never implies the upstream did not apply the request — recover with the promotion status flow.

Failure behavior: the whole request (through the last body byte) shares one deadline; caller AbortSignals cancel immediately and tear down the request; response bodies are buffered up to maxResponseBytes and responses that break, exceed the limit, or never complete reject with a typed NodeMtlsTransportError (code: TIMEOUT, ABORTED, RESPONSE_TOO_LARGE, REQUEST_FAILED, INVALID_URL, UNSUPPORTED_BODY, ALREADY_ABORTED). REQUEST_FAILED also covers failures to convert a fully received response into a fetch Response — for example a raw status outside the Fetch status range (600), which the Response constructor rejects: the request rejects with the original conversion exception preserved as cause, valid 4xx/5xx responses still resolve as HTTP responses, and an already-settled timeout or abort outcome is never overwritten by a late conversion error.

Supported runtimes for /node: verified with Bun 1.4.0 (test suite) and Node.js 26.4.0 (test-suite child processes plus tarball consumer checks); CI pins Bun 1.4.2 and Node.js 24 for the same checks.

Verifying a published release (repository tooling)

From the AIT Kit repository, the mTLS contract of an npm-published release can be re-verified end to end. The command accepts an exact version only (ranges and dist-tags are rejected), installs that release from the npm registry into an isolated throwaway consumer project, resolves @ait-kit/api-client/node from that project's own node_modules, and runs the same five-scenario mTLS contract used for repository builds and tarball checks (normal 200 with client-certificate verification, overall deadline, broken body, status-600 conversion failure with cause preserved, reuse after failure):

bun run verify:published:node -- --version 0.4.1 --report ./verify-report.json

--report <path> (optional) writes a JSON report that survives cleanup: requested and actually-installed api-client/api-core versions, the resolved module path with proof it lives inside the installed package, runtime versions, per-scenario outcomes, child exit code/signal, and the verification tooling's own commit (kept separate from the release commit, which npm metadata cannot confirm — it is reported as unknown when not independently established). Registry propagation delay right after a publish is retried within a finite budget; the command only installs and verifies — it never publishes or modifies repository build output.

Interpretation: a passing run proves the mTLS transport contract of that exact published version against a local loopback test server. It is not a check against the real Toss production API, and it says nothing about server-side ledgers or SDK integrations consuming this package.

See the AIT Kit repository for proxy configuration and API examples.