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

# Quickstart

> Learn how to use the bridge SDK to make bridges with only a few lines of code.

The Rhino SDK is a JavaScript/TypeScript client for the Rhino Stablecoin Activation Stack. It handles authentication, config fetching, quote generation, and transaction execution — letting you bridge assets with a few lines of code. For non-JS environments, use the [REST API](/api-integration/introduction) directly.

### Install the package

<CodeGroup>
  ```bash npm theme={null}
  npm install @rhino.fi/sdk
  ```

  ```bash yarn theme={null}
  yarn add @rhino.fi/sdk
  ```

  ```bash pnpm theme={null}
  pnpm install @rhino.fi/sdk
  ```

  ```bash bun theme={null}
  bun install @rhino.fi/sdk
  ```
</CodeGroup>

### Initialize the SDK

```typeScript rhino-sdk.ts theme={null}
import { RhinoSdk } from '@rhino.fi/sdk'

export const rhinoSdk = RhinoSdk({
  apiKey: 'YOUR_API_KEY',
})
```

<Card title="Visit the Rhino.fi Console" icon="key" href="https://console.rhino.fi">
  You can create a project and manage API keys there.
</Card>

### Make a bridge

```typescript bridge.ts theme={null}
import { SupportedChains, SupportedTokens } from '@rhino.fi/sdk'
import { getEvmChainAdapterFromPrivateKey } from '@rhino.fi/sdk/adapters/evm'
import { rhinoSdk } from './rhino-sdk'

const bridgeResult = await rhinoSdk.bridge({
  type: 'bridge',
  amount: '100',
  token: SupportedTokens.USDT,
  chainIn: SupportedChains.ARBITRUM_ONE,
  chainOut: SupportedChains.SOLANA,
  depositor: 'DEPOSITOR_ADDRESS',
  recipient: 'RECIPIENT_ADDRESS',
  mode: 'receive',
  gasBoost: {
    amountNative: '4'
  }
}, {
  getChainAdapter: chainConfig =>
    getEvmChainAdapterFromPrivateKey(
      'YOUR_PRIVATE_KEY',
      chainConfig,
    ),
    hooks: {
      checkQuote: quote => quote.fees.feeUsd < 5,
      onBridgeStatusChange: status => console.log('Bridge status changed', status),
    },
})

if (bridgeResult.data) {
  console.log('Bridge successful', bridgeResult.data.withdrawTxHash)
} else {
  console.log('Bridge error', bridgeResult.error)
}
```

This would bridge **100 USDT** from **Arbitrum to Base** while also receiving **4 SOL** tokens at the recipient address. Through the `checkQuote` hook a bridge that would cost over \$5 in fees would be aborted.

### Create a Smart Deposit Address

Smart Deposit Addresses let users bridge by making a simple token transfer — no contract interaction needed.

```typescript sda.ts theme={null}
import { rhinoSdk } from './rhino-sdk'

const sda = await rhinoSdk.api.depositAddresses.create({
  depositChains: ['ETHEREUM', 'ARBITRUM', 'BASE'],
  destinationChain: 'BASE',
  destinationAddress: '0x123...',
})
// Result:
// {
//   depositAddress: '0x457...',
//   depositChain: 'ETHEREUM',
//   destinationChain: 'BASE',
//   destinationAddress: '0x123...',
//   supportedTokens: [{ symbol: 'USDT', address: '0x789...' }],
//   isActive: true,
// }
```

Once created, anyone can send supported tokens to the deposit address and funds will be automatically bridged to the destination.

```typescript sda-status.ts theme={null}
import { rhinoSdk } from './rhino-sdk'

// Check status of an existing SDA
const status = await rhinoSdk.api.depositAddresses.getStatus({
  depositAddress: '0x457...',
  depositChain: 'ETHEREUM',
})

// Reactivate an inactive SDA
await rhinoSdk.api.depositAddresses.activate({
  depositAddress: '0x457...',
  depositChain: 'ETHEREUM',
})
```

<Tip>We recommend generating SDAs on all available EVM chains at once to ensure funds sent to the wrong chain are still detected automatically.</Tip>

For more details, see the full [SDK SDA reference](/sdk/smart-deposits) or the [API integration guide](/api-integration/smart-deposits).

## Resources

<CardGroup cols={2}>
  <Card title="SDK concepts" icon="book" href="/sdk/concepts">Learn about the core concepts of the SDK</Card>
  <Card title="Rhino architecture" icon="book" href="/get-started/architecture">Learn about the overall architecture of the Rhino bridge</Card>
  <Card title="Bridge functions" icon="code" href="/sdk/bridge-functions/bridge">Learn more on how to use the bridge functions</Card>
  <Card title="Chain adapters" icon="plug" href="/sdk/chain-adapters/overview">Learn how to use chain adapters to connect to all supported chains</Card>
</CardGroup>
