HyperCore agent wallets¶
HyperCore actions are signed, not gas-paid — so to place orders for a user without a signature on every one, the user authorizes an agent: a key Edith holds that can act on their HyperCore account. Approve once; trade many times, gaslessly, with no per-order popup.
Edith's agent key for you is derived deterministically from a server-side mnemonic — it is never stored, and the same agent is recovered across restarts.
One-time setup¶
1. Find your agent¶
{
"success": true,
"data": {
"agentAddress": "0x…",
"agentName": "edith",
"builderAddress": "0x…",
"builderFeeTenthsBp": 10
}
}
2. Approve the agent¶
POST /api/hypercore/agent/approve returns an approveAgent payload for your
main wallet to sign (signTypedData):
curl -X POST https://photon.example.com/api/hypercore/agent/approve \
-H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
-d '{"chainId": 10200001}'
The response's plan.typedData is EIP-712 typed data. Sign it, then submit the
signed action:
curl -X POST https://photon.example.com/api/hypercore/agent/submit \
-H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
-d '{"chainId": 10200001, "plan": <the plan>, "signature": "0x…"}'
3. Approve the builder fee¶
Placing orders through Edith charges a small builder fee (see
HyperCore orders). Approve it once — the same
sign-and-submit flow via POST /api/hypercore/agent/approve-builder:
curl -X POST https://photon.example.com/api/hypercore/agent/approve-builder \
-H "api-key: $EDITH_API_KEY" -H "Content-Type: application/json" \
-d '{"chainId": 10200001}'
This approves the builder up to 0.1%, so the operator can adjust the charged
fee without asking you to re-approve.
Info
Both approvals are one-time and revocable on HyperCore. Until the agent is
approved, orders are rejected by the exchange; until the builder is approved,
orders carrying a fee are rejected. GET /api/hypercore/agent shows what's
configured.
After setup¶
Place orders with no further signatures — Edith's agent signs and submits them for you. The agent can only act on accounts that approved it, so authorization is bounded by your one-time approval.
Security model¶
- The agent key never leaves the server and is never stored — it is derived from a mnemonic on demand, indexed by your address.
- An agent can only do what you approved: trade on your HyperCore account. It cannot withdraw to another address or approve further agents.
- Requests to act as you are authenticated as you (api-key or wallet-login JWT) — nobody else can place orders on your account through Edith.