Skip to main content
API Preview
Developers

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 L3 sovereign daemon (alter-runtime) ships as native package-manager builds (AUR, apt, dnf, apk, Nix, Homebrew).

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 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.