> ## Documentation Index
> Fetch the complete documentation index at: https://trust-link-tsn.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the TSN SDK

> Build the TypeScript SDK, install it in your app, and verify the import.

Install `@trustlink/tsn-sdk` in the app where you collect wallet payments or read a TIN balance. Use the private workspace package from your source checkout or a built copy supplied to your team.

## Build from the workspace

Install the workspace dependencies, then build from the TrustLink workspace root.

```bash theme={null}
npm run tsn:sdk:build
```

The compiled package is in `tsn-protocol/sdks/tsn-sdk/dist`. The build also compiles its local TCAP SDK dependency.

## Add the SDK to your app

Use the workspace dependency if your app is part of the checkout. For a separate app, run this command from the app directory and replace `/absolute/path/to/trust-link` with your checkout path.

```bash theme={null}
npm install /absolute/path/to/trust-link/tsn-protocol/sdks/tsn-sdk
```

Keep the TCAP SDK at its location in the checkout so npm can resolve the dependency. In browser code, import the specific subpath you need, such as `@trustlink/tsn-sdk/client` or `@trustlink/tsn-sdk/tin-owner-balance`. Some root exports require a server runtime. [Configure your app](https://trust-link-tsn.mintlify.site/sdk/configuration.md).

## Check the setup

From the app directory, check that Node.js can load the SDK's ESM client.

```bash theme={null}
node --input-type=module -e "import { TsnHttpClient } from '@trustlink/tsn-sdk/client'; console.log(TsnHttpClient.name)"
```

The command prints `TsnHttpClient`. Next, check your app's TSN endpoints. [Check TSN network status](https://trust-link-tsn.mintlify.site/developers/getting-started.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.