# Install the JavaScript / TypeScript SDK (npm)

First written 11 May 2026, revised 1 November 2026.

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](https://truealter.com/docs/install) 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.

## Next steps

[

### Getting started

Register, authenticate, and make your first authenticated request.

](https://truealter.com/docs/getting-started)[

### MCP Identity Server

Tool catalogue and resource surface that the SDK wraps.

](https://truealter.com/docs/mcp)[

### x402 Payment Protocol

Payment negotiation flow for paid identity queries.

](https://truealter.com/docs/x402)[

### ~handle protocol

How `~handle` resolution underpins SDK calls.

](https://truealter.com/docs/handle-protocol)

https://truealter.com/docs/install/npm
