Retrieves the list of token metadata across all vaults, with optional filtering by yield strategy, chain, address, or symbol. This returns token-level information only (address, symbol, decimals, chains) — it does not indicate whether a specific token is currently depositable or withdrawable on a given vault.
The assets returned by getSupportedAssets() are not guaranteed to be
depositable or withdrawable on every vault. Deposit/withdrawal availability is
a per-vault, per-asset property. To check whether an asset is currently
depositable or withdrawable for a specific vault, use
getVaultsByConfig()
and inspect vault.supportedAssets[].depositable /
vault.supportedAssets[].withdrawable.
Import
import { getSupportedAssets, YieldType } from '@paxoslabs/amplify-sdk'
Usage
// All supported assets (cache-first)
const allAssets = await getSupportedAssets()
// Filter by yield strategy
const coreAssets = await getSupportedAssets({ yieldType: YieldType.CORE })
// Filter by chain IDs
const ethAssets = await getSupportedAssets({ chains: [1, 8453] })
// Combine filters
const coreEthAssets = await getSupportedAssets({
yieldType: YieldType.CORE,
chains: [1],
})
// Filter by token address (cache-only)
const usdc = await getSupportedAssets({
address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
})
// Filter by symbol (cache-only)
const usdcBySymbol = await getSupportedAssets({ symbol: 'USDC' })
Parameters
All parameters are optional and can be combined to narrow the results.
| Parameter | Type | Required | Description |
|---|
yieldType | YieldType | No | Filter by yield strategy (CORE, TREASURY, or FRONTIER) |
chains | number[] | No | Filter by chain IDs (e.g., [1, 8453]) |
address | string | No | Filter by exact token address (cache-only) |
symbol | string | No | Filter 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
Returns SupportedAsset[] — token metadata only. This type intentionally does not include depositable or withdrawable flags because those are per-vault properties. See VaultSupportedAsset below for per-vault flags.
Type Definition
Example Response
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[];
[
{
address: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
symbol: "USDC",
name: "USD Coin",
decimals: 6,
coinGeckoTokenId: "usd-coin",
chains: [1],
},
{
address: "0xdAC17F958D2ee523a2206206994597C13D831ec7",
symbol: "USDT",
name: "Tether USD",
decimals: 6,
coinGeckoTokenId: "tether",
chains: [1],
},
]
Examples
By Chain
Combined Filters
With React Query
Asset Selector
import { getSupportedAssets } from "@paxoslabs/amplify-sdk";
// Assets available on Ethereum and Base
const assets = await getSupportedAssets({ chains: [1, 8453] });
console.log(`Found ${assets.length} supported assets`);
assets.forEach((asset) => {
console.log(`${asset.symbol}: chains ${asset.chains.join(", ")}`);
});
import { getSupportedAssets, YieldType } from "@paxoslabs/amplify-sdk";
// CORE assets on Ethereum only
const assets = await getSupportedAssets({
yieldType: YieldType.CORE,
chains: [1],
});
// Find USDC by symbol (cache-only filter)
const usdc = await getSupportedAssets({ symbol: "USDC" });
import { useQuery } from "@tanstack/react-query";
import {
getSupportedAssets,
type AssetFilterOptions,
} from "@paxoslabs/amplify-sdk";
function useAssets(filters?: AssetFilterOptions) {
return useQuery({
queryKey: ["assets", filters],
queryFn: () => getSupportedAssets(filters),
staleTime: 5 * 60 * 1000,
});
}
// Fetch all assets
const { data: allAssets } = useAssets();
// Fetch assets on a specific chain
const { data: ethAssets } = useAssets({ chains: [1] });
import { useQuery } from "@tanstack/react-query";
import { getSupportedAssets } from "@paxoslabs/amplify-sdk";
function AssetSelector({
chainId,
onSelect,
}: {
chainId: number;
onSelect: (address: string) => void;
}) {
const { data: assets } = useQuery({
queryKey: ["assets", chainId],
queryFn: () => getSupportedAssets({ chains: [chainId] }),
});
return (
<select onChange={(e) => onSelect(e.target.value)}>
<option value="">Select asset</option>
{assets?.map((asset) => (
<option key={asset.address} value={asset.address}>
{asset.symbol}
</option>
))}
</select>
);
}
Vault-Level Availability
The depositable and withdrawable flags live on each vault’s supportedAssets array as VaultSupportedAsset, not on the global SupportedAsset returned here. The same token may be depositable on one vault but not another.
import { getVaultsByConfig, YieldType } from '@paxoslabs/amplify-sdk'
const vaults = await getVaultsByConfig({
yieldType: YieldType.CORE,
chainId: 1,
})
for (const vault of vaults) {
for (const asset of vault.supportedAssets) {
console.log(
`${asset.symbol} on ${vault.name}: ` +
`deposit=${asset.depositable}, withdraw=${asset.withdrawable}`
)
}
}
interface VaultSupportedAsset {
address: `0x${string}`
symbol: string
name: string
decimals: number
coinGeckoTokenId?: string
/** Whether deposits are currently enabled for this vault-asset pair */
depositable?: boolean
/** Whether withdrawals are currently enabled for this vault-asset pair */
withdrawable?: boolean
}
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,
getVaultsByConfig,
YieldType,
} from '@paxoslabs/amplify-sdk'
const [vault] = await getVaultsByConfig({
yieldType: YieldType.CORE,
chainId: 1,
})
const auth = await prepareDepositAuthorization({
vaultName: vault.name,
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 Pattern | Description | Resolution |
|---|
"SDK not initialized" | SDK not initialized | Call initAmplifySDK() first |
"No vault found" | No vault matches parameters | Verify yieldType and chainId |
import { getSupportedAssets, YieldType, APIError } from '@paxoslabs/amplify-sdk'
try {
const assets = await getSupportedAssets({ yieldType: YieldType.CORE })
} catch (error) {
if (error instanceof APIError) {
console.error(`API Error [${error.endpoint}]: ${error.message}`)
}
}