Skip to main content
The TypeScript SDK is WIP. Today, integrate against the Relayer HTTP API directly. The shapes documented in the SDK pages mirror that API and will be the SDK surface when it ships.
The Tachyon SDK is published for Node.js and modern browsers. Key operations run in WASM so the same package works in both environments.

Install (when published)

npm install @tachyon/sdk
Package name is TBD; @tachyon/sdk is a placeholder. The package will ship from the tachyonpe GitHub organization.

Initialize

import { Tachyon } from "@tachyon/sdk";

const tachyon = new Tachyon({
  network: "testnet", // or "mainnet"
});
OptionRequiredDescription
network"testnet" or "mainnet"
endpointOverride the default relayer base URL (https://relayer.tachyon.pe). Useful for self-hosted or local development.
No API key is required. Rate limits apply at the platform level, see rate limits.

Verify your setup

const ok = await tachyon.health();
console.log(ok); // { status: "healthy", networks: [...], chainInfo: {...} }
This calls GET /health on the relayer (API ref).

Browser usage

import { Tachyon } from "@tachyon/sdk/browser";

const tachyon = new Tachyon({ network: "testnet" });
The browser bundle handles WASM loading automatically. No additional bundler config is required for Vite/Webpack 5 with default settings.

Environments

EnvironmentNotes
Node.js 18+Native fetch, WASM, ESM and CJS supported
Browsers (modern evergreen)Chrome, Edge, Firefox, Safari
React NativePlanned. Use the Relayer HTTP API directly from RN today, standard fetch works.
Edge runtimes (Cloudflare Workers, Vercel Edge)Planned. Use the Relayer HTTP API directly, standard fetch works.

Testnet vs mainnet

Configuration switches by changing network. Endpoints, supported chains, and rate limits differ between the two. See supported chains and rate limits.

Using the API directly today

If you want to integrate before the SDK ships, hit the relayer endpoints directly. Example: list a recipient’s stealth addresses.
const sig = await wallet.signMessage(`REGISTER_STEALTH:${userAddress}`);
const res = await fetch(`${RELAYER_URL}/recipient/addresses?address=${userAddress}&signature=${sig}`);
const { stealthAddresses } = await res.json();
Every SDK call documented in this section maps to one or more endpoints in the Relayer HTTP API.

Authenticate users

Register users and manage stealth identities.