> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tachyon.pe/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the SDK

> Install @tachyon/sdk, configure network, and verify your setup. The SDK is a thin wrapper over the Relayer HTTP API.

<Warning>
  **The TypeScript SDK is WIP.** Today, integrate against the [Relayer HTTP API](/api/relayer) directly. The shapes documented in the SDK pages mirror that API and will be the SDK surface when it ships.
</Warning>

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)

<CodeGroup>
  ```bash npm theme={null}
  npm install @tachyon/sdk
  ```

  ```bash pnpm theme={null}
  pnpm add @tachyon/sdk
  ```

  ```bash yarn theme={null}
  yarn add @tachyon/sdk
  ```
</CodeGroup>

<Note>
  Package name is TBD; `@tachyon/sdk` is a placeholder. The package will ship from the `tachyonpe` GitHub organization.
</Note>

## Initialize

```ts theme={null}
import { Tachyon } from "@tachyon/sdk";

const tachyon = new Tachyon({
  network: "testnet", // or "mainnet"
});
```

| Option     | Required | Description                                                                                                        |
| ---------- | -------- | ------------------------------------------------------------------------------------------------------------------ |
| `network`  | ✓        | `"testnet"` or `"mainnet"`                                                                                         |
| `endpoint` |          | Override 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](/reference/rate-limits).

## Verify your setup

```ts theme={null}
const ok = await tachyon.health();
console.log(ok); // { status: "healthy", networks: [...], chainInfo: {...} }
```

This calls `GET /health` on the relayer ([API ref](/api/relayer#get-health)).

## Browser usage

```ts theme={null}
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

| Environment                                     | Notes                                                                                             |
| ----------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| Node.js 18+                                     | Native fetch, WASM, ESM and CJS supported                                                         |
| Browsers (modern evergreen)                     | Chrome, Edge, Firefox, Safari                                                                     |
| React Native                                    | Planned. Use the [Relayer HTTP API](/api/relayer) directly from RN today, standard `fetch` works. |
| Edge runtimes (Cloudflare Workers, Vercel Edge) | Planned. Use the [Relayer HTTP API](/api/relayer) 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](/concepts/supported-chains) and [rate limits](/reference/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.

```ts theme={null}
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](/api/relayer).

<Card title="Authenticate users" icon="key" href="/sdk/authentication">
  Register users and manage stealth identities.
</Card>
