Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get the minimum withdrawal order size for a vault
import { getMinimumWithdrawalOrderSize } from "@paxoslabs/amplify-sdk";
import { getMinimumWithdrawalOrderSize, YieldType } from "@paxoslabs/amplify-sdk"; const result = await getMinimumWithdrawalOrderSize({ yieldType: YieldType.CORE, chainId: 1, assetAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", }); console.log(result.minimumOrderSize); // bigint console.log(result.shareDecimals); // number
yieldType
YieldType
chainId
ChainId
assetAddress
Address
interface GetMinimumWithdrawalOrderSizeParams { yieldType: YieldType; chainId: ChainId; assetAddress: Address; }
interface MinimumWithdrawalOrderSizeResult { /** Minimum order size in vault share units */ minimumOrderSize: bigint; /** Vault share token decimals */ shareDecimals: number; }
import { getMinimumWithdrawalOrderSize, YieldType } from "@paxoslabs/amplify-sdk"; import { parseUnits, formatUnits } from "viem"; const result = await getMinimumWithdrawalOrderSize({ yieldType: YieldType.CORE, chainId: 1, assetAddress: usdcAddress, }); const userAmount = parseUnits(userInput, result.shareDecimals); if (userAmount < result.minimumOrderSize) { const min = formatUnits(result.minimumOrderSize, result.shareDecimals); console.error(`Minimum withdrawal is ${min} shares`); }
"No vault found"
"SDK not initialized"
initAmplifySDK()