Function Signature
Description
Builds the unsigned transaction that claims every reward ownerAddress has accrued in an Earn vault. Rewards are supported only for vaults from some providers; for any other provider the API rejects the request with an HTTP 400 error. See Provider support.
The method only builds the payload. Execute it with executeEarnTransaction, or use claimEarnRewards to prepare and execute in one call.
Available as client.earn on DynamicEvmWalletClient and DynamicSvmWalletClient.
Parameters
Required Parameters
vaultId (string): The vault identifier from listVaults.
ownerAddress (string): The wallet address that accrued the rewards.
Optional Parameters
traceContext (TraceContext): Trace context forwarded to the Dynamic API.
Returns
Promise<EarnSigningPayload>: The unsigned signing payload to execute.
Example
Error Handling
Fails with an HTTP 403 error when Earn is not enabled for your environment, an HTTP 400 error when the vault’s provider does not support rewards, or an HTTP 422 error when the wallet has nothing to claim.
See Also
Last modified on October 29, 2026