Function Signature
Description
Returns an owner’s shares and assets in an Earn vault, both in raw token units. Show assets, because it grows as yield accrues. Depending on the vault’s provider, shares either stays flat or always equals assets, so it is not meaningful to show a user.
Available as client.earn on DynamicEvmWalletClient and DynamicSvmWalletClient.
Parameters
Required Parameters
vaultId (string): The vault identifier from listVaults.
ownerAddress (string): The wallet address that owns the position, typically walletMetadata.accountAddress.
Optional Parameters
traceContext (TraceContext): Trace context forwarded to the Dynamic API.
Returns
Promise<EarnVaultPosition>: The owner’s position. Amounts are raw-unit strings; keep them as strings or bigint.
Example
Error Handling
Fails with an HTTP 403 error when Earn is not enabled for your environment, or an HTTP 400 error when the address does not match the vault’s chain family.
See Also
Last modified on October 29, 2026