> ## Documentation Index
> Fetch the complete documentation index at: https://unevenlabs-ted-add-sdk-methods.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> Setup the Relay SDK in your application

## Installation

Install the [Relay SDK](https://github.com/reservoirprotocol/relay-sdk) and its peer dependency [viem](https://viem.sh/)

<CodeGroup>
  ```shell yarn
  yarn add @reservoir0x/relay-sdk viem 
  ```

  ```shell npm
  npm install --save @reservoir0x/relay-sdk viem 
  ```

  ```shell pnpm
  pnpm add @reservoir0x/relay-sdk viem 
  ```

  ```shell bun
  bun add @reservoir0x/relay-sdk viem 
  ```
</CodeGroup>

#### Environment Requirements:

node 18+
typescript ^5.0.4 (if using typescript)

## Configuration

To configure the SDK we first need to create a global instance of it:

```typescript
import { createClient, convertViemChainToRelayChain, MAINNET_RELAY_API, TESTNET_RELAY_API } from '@reservoir0x/relay-sdk'
import { mainnet } from 'viem/chains'

createClient({
  baseApiUrl: MAINNET_RELAY_API,
  source: "YOUR.SOURCE",
  chains: [convertViemChainToRelayChain(mainnet)]
});
```

You can replace the `baseApiUrl` with `TESTNET_RELAY_API` when testing with testnets. In the example above we also pass in an array of RelayChains converted from a viem chain, the sdk exports a function (`convertViemChainToRelayChain`) to easily do this. [Learn more](/references/sdk/createClient) about the `createClient` options.
