The Amplify SDK provides functions for initializing the SDK, discovering accounts, and preparing transactions for deposits and withdrawals.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.
Initialization
initAmplifySDK
Initialize the SDK with your API key before using any other functions.
getSupportedAssets
Fetch supported tokens and account configurations for a yield type.
Account Discovery
getVaultsByConfig
Discover accounts by yield type, chain, and asset. Returns
vault.name for
use in transaction functions.findVaultByConfig
Find a single account by asset address, yield type, and chain.
Deposits
Deposit Workflow
The unified deposit API with
prepareDepositAuthorization and
prepareDeposit.prepareDepositTxData
Prepare transaction data for a standard deposit after approval.
prepareDepositWithPermitTxData
Prepare transaction data for a permit-based deposit (single transaction).
prepareDepositPermitSignature
Build EIP-712 typed data for signing a permit deposit directly.
Withdrawals
prepareWithdrawalAuthorization
Check approval requirements and prepare withdrawal authorization.
prepareWithdrawal
Prepare transaction data through the unified withdrawal wrapper.
prepareWithdrawOrderTxData
Build low-level WithdrawQueue order transaction data.
prepareApproveWithdrawOrderTxData
Build low-level approval transaction data for account shares.
Display Helpers
Display Helpers
UI helper functions for showing account APY, TVL, fees, share calculations,
and withdrawal history.
Function Quick Reference
| Function | Description |
|---|---|
initAmplifySDK | Initialize SDK with API key and options |
waitForCacheReady | Wait for the account cache to be populated |
isCacheReady | Check if the account cache is ready |
getVaults | Fetch accounts with optional filters |
getSupportedAssets | Get supported tokens for a yield type |
getVaultsByConfig | Discover accounts by yield type, chain, and asset |
findVaultByConfig | Find a single account by asset + yield type + chain |
getWithdrawSupportedAssets | Get all assets grouped by available accounts |
prepareDepositAuthorization | Determine optimal authorization method |
prepareDeposit | Prepare deposit with auto-detected method |
prepareDepositTxData | Prepare standard deposit transaction |
prepareDepositWithPermitTxData | Prepare permit-based deposit transaction |
prepareDepositPermitSignature | Build EIP-712 permit typed data for signing |
prepareWithdrawalAuthorization | Determine if withdrawal approval is required |
prepareWithdrawal | Prepare withdrawal execution transaction |
prepareWithdrawOrderTxData | Prepare low-level WithdrawQueue submission |
prepareApproveWithdrawOrderTxData | Prepare low-level withdraw approval transaction |
prepareCancelWithdrawOrderTxData | Prepare withdrawal order cancellation |
getMinimumMint | Calculate expected account shares for a deposit |
getVaultAPY | Fetch latest account APY |
getVaultTVL | Fetch account total value locked |
getWithdrawalFee | Calculate withdrawal fees |
getWithdrawalRequests | Fetch user’s withdrawal requests |
getMinimumWithdrawalOrderSize | Get minimum withdrawal order size |
Type Guards
The SDK exports type guards for handling discriminated union results:Account Discovery Pattern
Starting in v0.5.0, transaction functions require avaultName instead of yieldType. The recommended pattern is: