Install the JavaScript / TypeScript SDK (npm)
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 only, not the daemon
This page covers the JavaScript / TypeScript SDK only. Install the alter CLI today with npm install -g @truealter/cli. The optional local identity runtime (alter-runtime) installs today with pip install alter-runtime. Native packages for it are built but not published yet; the install page tracks each one.
What you get
- •Typed client for the public MCP identity server (
streamable-httptransport). - •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/sdkVerify
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 your runtime is on a Linux container with alter-runtime installed via apt or a macOS host with the Homebrew Formula, the SDK’s MCP and REST calls resolve ~handle identities and verify provenance identically. The full operative invariants are documented in packaging/README.md.