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
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: