Skip to main content
alter Sign in

Install the JavaScript / TypeScript SDK (npm)

First written 11 May 2026, revised 1 November 2026. Read as text

The @truealter/sdk package is the JavaScript / TypeScript client for ~alter’s public MCP server and REST API. Install it into a Node.js, Bun, or Deno project to wrap signed identity queries, x402 payment negotiation, and provenance verification with a typed client.

SDK page

This page covers the JavaScript / TypeScript SDK only. Install the alter CLI with npm install -g @truealter/cli. The install page lists every route.

What you get

  • •Typed client for the public MCP identity server (streamable-http transport).
  • •x402 payment negotiation helper for the paid tools and credential queries.
  • •Provenance verification (verifyProvenance), including issuer-binding checks (Identity-as-Inference clause #2).
  • •ESM and CJS builds, no node:* shim regressions.

Install

 npm install @truealter/sdk

Verify

Confirm the package is resolvable from your project:

 import { verifyProvenance } from "@truealter/sdk";

console.log(typeof verifyProvenance); // "function"

Cross-platform unity

The SDK speaks the same federation protocol as every other install path. Whether the CLI came from the one-line installer or npm, the SDK’s MCP and REST calls resolve ~handle identities and verify provenance identically.