Skip to main content
Retrieves the list of tokens supported for deposits into a specific yield strategy.

Import

import { fetchSupportedAssets } from "@paxoslabs/amplify-sdk";

Usage

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

Parameters

All parameters are optional and can be combined to narrow the results.
ParameterTypeRequiredDescription
yieldTypeYieldTypeNoFilter by yield strategy (CORE, TREASURY, or FRONTIER)
chainsnumber[]NoFilter by chain IDs (e.g., [1, 8453])
addressstringNoFilter by exact token address (cache-only)
symbolstringNoFilter by token symbol (cache-only)
interface AssetFilterOptions {
  /** Filter by yield type (CORE, TREASURY, FRONTIER) */
  yieldType?: YieldType;
  /** Filter by chain IDs (e.g., [1, 8453]) */
  chains?: number[];
  /** Filter by exact token address (cache-only) */
  address?: string;
  /** Filter by token symbol (cache-only) */
  symbol?: string;
}
The yieldType and chains filters are applied at the API level. The address and symbol filters are applied client-side against the cached asset data.

Return Type

interface SupportedAsset {
  /** Token contract address */
  address: `0x${string}`;
  /** Token symbol (e.g., "USDC") */
  symbol: string;
  /** Full token name (e.g., "USD Coin") */
  name: string;
  /** Token decimals (e.g., 6 for USDC) */
  decimals: number;
  /** CoinGecko token identifier for price lookups */
  coinGeckoTokenId?: string;
  /** Chain IDs where this token is supported */
  chains: number[];
}

type FetchSupportedAssetsResult = SupportedAsset[];

Examples

import { fetchSupportedAssets, YieldType } from "@paxoslabs/amplify-sdk";

// Fetch assets for Core yield strategy
const coreAssets = await fetchSupportedAssets({
  yieldType: YieldType.CORE,
});

console.log(`Found ${coreAssets.length} supported assets`);
coreAssets.forEach(asset => {
  console.log(`${asset.symbol}: ${asset.address}`);
});

Checking Permit Support

To determine the optimal deposit flow for a token, use prepareDepositAuthorization() which automatically detects permit support at the contract level:
import { prepareDepositAuthorization, isPermitAuth, YieldType } from "@paxoslabs/amplify-sdk";

const auth = await prepareDepositAuthorization({
  yieldType: YieldType.CORE,
  depositAsset: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  depositAmount: "100",
  to: userAddress,
  chainId: 1,
});

if (isPermitAuth(auth)) {
  console.log("Token supports gasless permit signatures");
} else {
  console.log("Token requires standard approval");
}

Error Handling

Error Message PatternDescriptionResolution
"SDK not initialized"SDK not initializedCall initAmplifySDK() first
"No vault found"No vault matches parametersVerify yieldType and chainId
import { fetchSupportedAssets, YieldType, APIError } from "@paxoslabs/amplify-sdk";

try {
  const assets = await fetchSupportedAssets({ yieldType: YieldType.CORE });
} catch (error) {
  if (error instanceof APIError) {
    console.error(`API Error [${error.endpoint}]: ${error.message}`);
  }
}