Generate unsigned deposit transaction calldata for a DeFi yield market
Documentation Index
Fetch the complete documentation index at: https://docs.trails.build/llms.txt
Use this file to discover all available pages before exploring further.
YieldCreateEnterAction returns the unsigned transaction payload needed to deposit into a DeFi yield market. This is the low-level endpoint that backs the lend and deposit composable actions in the SDK.
Use this endpoint when building custom DeFi UIs outside React, or when you need to construct the calldata manually before passing it to Trails via the to.calldata param on QuoteIntent.
For React apps, use the lend() or deposit() action builders with useTrailsSendTransaction — they call this endpoint internally.
| Field | Type | Required | Description |
|---|---|---|---|
earnMarketId | string | Yes | Market ID from YieldGetMarkets |
userWalletAddress | string | Yes | Address of the depositing wallet |
args | object | No | Market-specific arguments (varies by protocol) |
payload containing unsigned transaction data:
| Field | Description |
|---|---|
transactions | Array of transaction objects to execute |
transactions[].to | Contract address |
transactions[].data | ABI-encoded calldata |
transactions[].value | ETH value (for native token deposits) |
lend or deposit builders with useTrailsSendTransaction:
OK
JSON object containing unsigned transaction payloads