Skip to main content

POST /v1/yield/setup-relay

Free — No payment required.
Relay a client-signed EIP-7702 setup transaction to enable smart wallet delegation for yield operations. When POST /v1/yield/prepare returns needsSetup: true, the agent must sign a setup transaction and submit it through this endpoint. The server validates the setup ticket, broadcasts the signed transaction to a test RPC, waits for confirmation, and verifies that delegation and module initialization succeeded. Two setup types are supported:
  • full — First-time setup. Signs a Type-4 (EIP-7702) transaction with authorization_list to delegate the EOA to the Nexus smart account and initialize modules.
  • modules — Re-initialization only. Signs a Type-2 (EIP-1559) self-call when delegation already exists but modules need setup.

Parameters

object
required
Setup ticket returned by POST /v1/yield/prepare when needsSetup is true. Contains:
  • version — Always 1
  • walletAddress — Agent EOA address (0x...)
  • chainId — Target chain ID
  • implementation — Nexus smart account implementation address
  • initCalldataHashkeccak256 of the setup calldata
  • setupType"full" or "modules"
  • expiresAt — ISO 8601 expiry timestamp
string
required
Signed raw transaction hex (0x...). Must be:
  • Type-4 with authorization_list for setupType: "full"
  • Type-2 or Type-4 for setupType: "modules"
  • A self-call (to == walletAddress)
  • Signed by the wallet specified in setupTicket.walletAddress
number
Number of block confirmations to wait for (1-10, default: 2).

Example

Response

After a successful relay, call POST /v1/yield/prepare again to get the deposit/redeem/rebalance payload — setup is now complete.

Typical flow

  1. Call POST /v1/yield/prepare — receives needsSetup: true with setupTicket
  2. Sign the setup transaction locally (Type-4 for full, Type-2 for modules)
  3. Call POST /v1/yield/setup-relay with the ticket and signed transaction
  4. Call POST /v1/yield/prepare again — receives the execution payload with needsSetup: false