Earn component opens a market selector so users can deposit into yield protocols (Aave, Morpho, Yearn, and others) from any chain or funding source.
Earn currently supports open market selection only. Pre-configured deposits and contract calldata deposits are not yet available. For programmable deposits today, use composable actions with market IDs.
Basic usage
Props reference
| Prop | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | Your API key |
onEarnStart | function | No | Called when the user begins |
onEarnSuccess | function | No | Called on completion |
onEarnError | function | No | Called on failure |