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.
Calculate expected vault shares for a given deposit amount
import { getMinimumMint } from "@paxoslabs/amplify-sdk";
import { getMinimumMint, YieldType } from "@paxoslabs/amplify-sdk"; const result = await getMinimumMint({ yieldType: YieldType.CORE, chainId: 1, depositAssetAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC depositAmount: "1000.0", }); console.log(result.expectedShares); // bigint console.log(result.exchangeRate); // bigint
yieldType
YieldType
CORE
TREASURY
FRONTIER
chainId
ChainId
depositAssetAddress
Address
depositAmount
string
"1000.0"
interface GetMinimumMintParams { yieldType: YieldType; chainId: ChainId; depositAssetAddress: Address; depositAmount: string; }
interface MinimumMintResult { /** Expected vault shares to be minted */ expectedShares: bigint; /** On-chain exchange rate from Accountant */ exchangeRate: bigint; /** Vault share token decimals */ shareDecimals: number; /** Deposit asset decimals */ assetDecimals: number; }
import { getMinimumMint, YieldType } from "@paxoslabs/amplify-sdk"; import { formatUnits } from "viem"; const result = await getMinimumMint({ yieldType: YieldType.CORE, chainId: 1, depositAssetAddress: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", depositAmount: "1000.0", }); const sharesFormatted = formatUnits(result.expectedShares, result.shareDecimals); console.log(`You will receive ~${sharesFormatted} vault shares`);
"No vault found"
"SDK not initialized"
initAmplifySDK()