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

pnpm add @paxoslabs/amplify-sdk

Install Peer Dependencies

The SDK works with various wallet libraries. Install the dependencies for your chosen stack:
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.local to version control. Add it to your .gitignore file.

Initialize the SDK

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

await initAmplifySDK(process.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", ... },
  ...
]

Next Steps