Integrate
Bundler API
The HIP-ID bundler speaks ERC-4337 JSON-RPC, signs paymaster approvals and reports inclusion latency. The site exposes it at /api/bundler.
Endpoints
| Site route | Bundler route | What |
|---|---|---|
POST /api/bundler | POST / | ERC-4337 JSON-RPC 2.0, single request or batch |
GET /api/metrics | GET /metrics | Counters, inclusion latency, chain and price-feed state |
GET /api/prices?coins=... | GET /v1/prices?coins=... | Hyperliquid mid prices |
GET /api/stocks | GET /v1/stocks | Live HIP-3 stock marks |
| not proxied | GET /health | Plain text ok |
Integrations should use the site routes. The site forwards only the eight methods below, accepts batches of up to 20 requests (the bundler itself takes up to 50), and answers 503 with {"error":"bundler offline","reason":"..."} when the bundler is unreachable. The bundler serves one EntryPoint, 0x0000000071727De22E5E9d8BAf0edAc6f37da032, on chain 99901. Methods that take an EntryPoint argument refuse any other.
Lifecycle of an operation
A first operation through this path on Elysium mainnet (deploy, passkey, call, paymaster in one bundle): 0x8127b6f608f89a09062d0f3250257f790569d1a773bd5fa34a1da9174d508a13.
JSON-RPC methods
Operations use the unpacked v0.7 JSON shape (ERC-7769 field names): sender, nonce, factory, factoryData, callData, callGasLimit, verificationGasLimit, preVerificationGas, maxFeePerGas, maxPriorityFeePerGas, paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymasterData, signature. Quantities are hex strings. Gas and fee fields may be omitted when asking for an estimate or a sponsorship.
eth_chainId
No params. Returns "0x1863d".
eth_supportedEntryPoints
No params. Returns ["0x0000000071727De22E5E9d8BAf0edAc6f37da032"].
pm_sponsorUserOperation
Params: [userOperation, entryPoint]. Estimates gas, sets the fees, checks the account's daily budget on-chain, and signs the HipPaymaster approval. Refuses operations whose factory is not the HIP-ID factory. Returns:
{
"userOperation": { ...every gas, fee and paymaster field filled, "signature": "0x" },
"userOpHash": "0x...", // what the passkey or session key must sign
"validUntil": 1795950000, // end of the paymaster approval window, unix seconds
"maxCostWei": "0x..." // gas ceiling x maxFeePerGas, reserved by the paymaster
}By default the fees are maxPriorityFeePerGas = 0.001 gwei and maxFeePerGas = 2 x gasPrice + priority. The approval is valid from 30 seconds before signing until 300 seconds after; sign and send within that window. Before signing the returned hash, check the returned operation is the one you asked for (see Threat model).
eth_estimateUserOperationGas
Params: [userOperation, entryPoint]. Simulates the operation with generous limits, a realistic dummy passkey signature and a dummy paymaster approval, then returns:
{
"preVerificationGas": "0x...", // calldata gas of the packed op + 21,000 + 12,000
"verificationGasLimit": "0x...", // measured x 1.2 + 70,000
"callGasLimit": "0x...", // measured x 1.3 + 20,000
"paymasterVerificationGasLimit": "0x15f90", // 90,000
"paymasterPostOpGasLimit": "0xc350" // 50,000
}The dummy signature fails at the key lookup, before WebAuthn parsing and the P-256 check, so 70,000 gas is added to cover that path. Estimation runs the HipPaymaster checks, so it only works for HIP-ID accounts. pm_sponsorUserOperation calls it for you.
eth_sendUserOperation
Params: [userOperation, entryPoint] with the final signature. Runs the full validation (below) and queues the operation. Returns the userOpHash. One operation per sender and nonce may be pending or submitted at a time; a duplicate is refused.
eth_getUserOperationReceipt
Params: [userOpHash]. Returns null until the operation is included, then:
{
"userOpHash": "0x...",
"sender": "0x...",
"nonce": "0x0",
"success": true, // false if the inner call reverted
"actualGasCost": "0x...",
"actualGasUsed": "0x...",
"entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"receipt": { "transactionHash": "0x...", "blockNumber": "0x..." },
"hipid": {
"receivedMs": 1795949000123, // when eth_sendUserOperation accepted it
"includedMs": 1795949001042, // when the bundler saw the receipt
"latencyMs": 919,
"bundleSize": 1
}
}The receipt object carries the transaction hash and block number only; fetch the full transaction receipt from the RPC if you need logs. The hipid object is specific to this bundler. Receipts are written to a journal and survive restarts.
eth_getUserOperationByHash
Params: [userOpHash]. Returns { "userOperation": {...}, "entryPoint": "0x...", "status": {...} }, or null if unknown. Operations are kept in memory; after a restart, included operations return their status without the userOperation field.
hipid_status
Params: [userOpHash]. Returns null if unknown, or one of:
{ "status": "pending" }
{ "status": "submitted", "transaction_hash": "0x..." }
{ "status": "included", "userOpHash": "0x...", "success": true, "transactionHash": "0x...", "blockNumber": 12900000,
"receivedMs": 0, "includedMs": 0, "bundleSize": 1, ... }
{ "status": "failed", "reason": "AA24 signature error" }failed means the operation was dropped at preflight or its bundle transaction reverted. Note the snake_case transaction_hash in the submitted form.
Errors
| Code | Meaning |
|---|---|
| -32500 | Refused by simulation. The message is the EntryPoint reason (for example AA24 signature error, AA25 invalid account nonce) or a paymaster refusal such as the daily budget. |
| -32602 | Bad params, unsupported EntryPoint, duplicate operation, or a gas field over 128 bits. |
| -32603 | The upstream RPC failed. Retry. |
| -32601 | Unknown method. The site returns this, with HTTP 400, for any method outside the allow-list. |
| -32600 | Malformed request object. |
| -32700 | The site could not parse the body as JSON (HTTP 400). |
Validation
The bundler validates with the official EntryPointSimulations contract from @account-abstraction/contracts v0.7.0. Its runtime bytecode is injected at the EntryPoint address through an eth_call state override, so simulateValidation and simulateHandleOp run against the live EntryPoint's storage (deposits, nonces, stakes) without deploying anything. This is sound because the EntryPoint on Elysium is byte-identical to Ethereum mainnet's canonical v0.7 EntryPoint: both have runtime codehash 0x8db5ff695839d655407cc8490bb7a5d82337a86a6b39c3f0258aa6c3b582fc58.
eth_sendUserOperation accepts an operation only if:
simulateValidationsucceeds with the real account signature and the real paymaster approval,- neither the account nor the paymaster flags a signature failure (
AA24,AA34), - both validity windows are open now (2 seconds of clock slack) and neither ends within 10 seconds.
The bundler does not trace opcodes against ERC-7562. It is a private mempool: operations are simulated individually, then simulated again together as the exact bundle before any gas is spent.
Bundling
- The loop wakes when an operation arrives or every 200 ms, and takes up to 32 queued operations.
- Preflight. It
eth_callshandleOpswith exactly those operations, from the bundler address. If the EntryPoint reverts withFailedOp(index, reason), that operation is marked failed and dropped, and the preflight runs again with the rest. Nothing is sent until a preflight passes. - One transaction per bundle. The gas limit is the sum of every operation's gas ceiling plus 150,000. The fee is
2 x gasPrice + 0.001 gwei. - Journal. The transaction hash, nonce and operation hashes are written to a journal before anything else happens.
- Receipt. The bundler polls the receipt itself every 150 ms, so the latency it reports is not rounded up to a client poll interval. Each
UserOperationEventin the receipt is mapped back to its operation. - Never re-sent. If no receipt arrives within 120 seconds, the operations stay
submittedwith the transaction hash. A sent bundle is never sent again, so an operation cannot be paid for twice by this bundler.
The public Elysium RPC rate-limits callers (HTTP 429). Every RPC call the bundler makes retries with backoff, and eth_gasPrice is cached for one second, so a busy RPC slows operations down instead of failing them.
HTTP endpoints
GET /metrics
{
"bundler": { "receivedTotal", "includedTotal", "failedTotal", "pending", "bundlesTotal", "lastBundleTx",
"simulationsTotal", "simulationsPerSec1m",
"inclusionMs": { "count", "p50", "p90", "p99", "min", "max" } | null, "startedMs" },
"chain": { "accounts", "accountsScannedTo", "headBlock", "bundler", "bundlerBalanceWei",
"paymaster", "paymasterDepositWei", "paymasterSpentTodayWei", "paymasterGlobalDailyWei", "updatedMs" },
"priceFeed": { "updatedMs", "messages", "connectedMs", "reconnects", "coins" },
"entryPoint", "factory", "paymaster", "chainId", "version"
}inclusionMs is measured from acceptance by eth_sendUserOperation to the bundler seeing the receipt, over every included operation in the journal. chain refreshes every 30 seconds; accounts counts the factory's AccountCreated events.
GET /v1/prices?coins=...
Mid prices from Hyperliquid's public allMids WebSocket, kept live with reconnects. coins is a comma-separated list of Hyperliquid coin names (for spot pairs, @index; for HIP-3 perps, the prefixed name such as xyz:NVDA). Without it, the default list is HYPE, BTC, ETH, SOL, PURR, KNTQ, @107 and @334. The site route accepts letters, digits, @, :and commas, up to 200 characters.
{ "mids": { "HYPE": "...", "BTC": "..." }, "updatedMs": 0, "messages": 0, "connectedMs": 0, "reconnects": 0 }GET /v1/stocks
Live marks for the stock board (NVDA, AAPL, TSLA, GOOGL, MSFT, AMZN, META, MU, AMD, MSTR, COIN, HOOD, SP500, XYZ100). At start and every 30 minutes the bundler calls perpDexs and metaAndAssetCtxs for every HIP-3 dex, drops delisted listings (they keep a frozen mark forever) and picks, per symbol, the live listing with the most 24 hour volume. It then streams activeAssetCtx for each chosen coin (about one update a second each) and allMids for every live HIP-3 dex over one WebSocket.
{ "stocks": [{ "symbol": "NVDA", "name": "NVIDIA", "coin": "xyz:NVDA", "dex": "xyz", "dexName": "XYZ",
"markPx": "...", "oraclePx": "...", "midPx": "...", "prevDayPx": "...", "dayNtlVlm": "...",
"openInterest": "...", "funding": "...", "updatedMs": 0 }],
"liveDexes": ["xyz", "..."], "delistedDexes": ["..."], "discoveredMs": 0, "updatedMs": 0, "messages": 0, "connectedMs": 0, "reconnects": 0 }GET /health
Returns ok as plain text. Served by the bundler only.
curl examples
Replace <site> with the site's domain.
curl -s https://hipid.app/api/bundler \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
# {"jsonrpc":"2.0","id":1,"result":"0x1863d"}
curl -s https://hipid.app/api/bundler \
-H 'content-type: application/json' \
-d '[{"jsonrpc":"2.0","id":1,"method":"eth_supportedEntryPoints","params":[]},
{"jsonrpc":"2.0","id":2,"method":"hipid_status","params":["0x<userOpHash>"]}]'
curl -s https://hipid.app/api/bundler \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"pm_sponsorUserOperation","params":[{
"sender":"0x<account>","nonce":"0x0",
"factory":"0x<factory>","factoryData":"0x<createAccount calldata>",
"callData":"0x<execute calldata>","signature":"0x"
},"0x0000000071727De22E5E9d8BAf0edAc6f37da032"]}'
curl -s https://hipid.app/api/bundler \
-H 'content-type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_getUserOperationReceipt","params":["0x<userOpHash>"]}'
curl -s https://hipid.app/api/metrics
curl -s 'https://hipid.app/api/prices?coins=HYPE,BTC'


