Skip to main content
Get started with the Amplify SDK in under 5 minutes.

Requirements

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

Install the SDK

bash pnpm add @paxoslabs/amplify-sdk

Install Peer Dependencies

The SDK works with various wallet libraries. Install the dependencies for your chosen stack:
bash pnpm add @privy-io/react-auth viem @tanstack/react-query

Environment Setup

Create a .env.local file in your project root:
# 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
Never commit .env, .env.local, etc. to version control. Add them to your .gitignore file.

Initialize the SDK

Call initAmplifySDK() once at application startup:
import { initAmplifySDK } from "@paxoslabs/amplify-sdk";

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

Verify Installation

Test that everything is working:
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:
// 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