totalAssets()
Returns the total underlying assets managed by the vault.
Signature
totalAssets(): Promise<bigint>
Parameters
- None
Returns
bigint: total underlying managed by the vault.
Example
import { formatUnits } from "viem";
const details = await vault.getVaultDetails();
const total = await vault.totalAssets();
// Option 1: SDK helper (caches decimals internally)
console.log(
"Total assets:",
await vault.toUnderlyingDecimals(total),
details.underlying.symbol
);
// Option 2: viem formatting
console.log(
"Total assets:",
formatUnits(total, details.underlying.decimals),
details.underlying.symbol
);
Response Example
"158974398534987534985349"