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

# Installation

> Install the Amplify SDK and configure your project

Get started with the Amplify SDK in under 5 minutes.

## Requirements

* Node.js 22 or higher
* npm, yarn, pnpm, or bun

## Install the SDK

<Tabs>
  <Tab title="pnpm">`bash pnpm add @paxoslabs/amplify-sdk `</Tab>
  <Tab title="npm">`bash npm install @paxoslabs/amplify-sdk `</Tab>
  <Tab title="yarn">`bash yarn add @paxoslabs/amplify-sdk `</Tab>
  <Tab title="bun">`bash bun add @paxoslabs/amplify-sdk `</Tab>
</Tabs>

## Install Peer Dependencies

The SDK works with various wallet libraries. Install the dependencies for your chosen stack:

<Tabs>
  <Tab title="Privy">
    `bash pnpm add @privy-io/react-auth viem @tanstack/react-query `
  </Tab>

  <Tab title="Wagmi">`bash pnpm add wagmi viem @tanstack/react-query `</Tab>
  <Tab title="Viem Only">`bash pnpm add viem `</Tab>
</Tabs>

## Environment Setup

Create a `.env.local` file in your project root:

```bash theme={null}
# Required: Your Amplify API key
VITE_AMPLIFY_API_KEY=pxl_your_api_key

# Optional: Wallet provider credentials
VITE_PRIVY_APP_ID=your-privy-app-id

# Optional: Custom RPC URL
VITE_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/your-key
```

<Warning>
  Never commit `.env`, `.env.local`, etc. to version control. Add them to your
  `.gitignore` file.
</Warning>

## Initialize the SDK

Call `initAmplifySDK()` once at application startup:

```ts theme={null}
import { initAmplifySDK } from "@paxoslabs/amplify-sdk";

await initAmplifySDK(import.meta.env.VITE_AMPLIFY_API_KEY);
```

## Verify Installation

Test that everything is working:

```ts theme={null}
import {
  initAmplifySDK,
  fetchSupportedAssets,
  YieldType,
} from "@paxoslabs/amplify-sdk";

async function verify() {
  // Initialize SDK
  await initAmplifySDK("pxl_your_api_key");

  // Fetch supported assets
  const assets = await fetchSupportedAssets({
    yieldType: YieldType.CORE,
  });

  console.log("Supported assets:", assets);
}

verify();
```

Expected output:

```
Supported assets: [
  { symbol: "USDC", address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", ... },
  { symbol: "USDT", address: "0xdAC17F958D2ee523a2206206994597C13D831ec7", ... },
  ...
]
```

## Package Exports & Helper Utilities

The SDK supports focused imports for helper-heavy integrations:

```typescript theme={null}
// Main entry
import { initAmplifySDK, fetchSupportedAssets } from "@paxoslabs/amplify-sdk";

// Low-level helpers
import { getErc20Balance, getEthPrice } from "@paxoslabs/amplify-sdk/core";

// Vault operations
import {
  prepareDeposit,
  prepareDepositAuthorization,
} from "@paxoslabs/amplify-sdk/vaults";

// Utility helpers
import { calculateDeadline } from "@paxoslabs/amplify-sdk/utils";
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="./quickstart">
    Build a complete React app with deposits and withdrawals.
  </Card>

  <Card title="Concepts" icon="lightbulb" href="./concepts">
    Understand vaults, yield types, and authorization flows.
  </Card>
</CardGroup>
