Docs

How Onrecord works.

Everything the gateway does, every rule it applies and every limit it has.

Quickstart

Add https://onrecordapp.xyz/mcp as a remote MCP server in your client. No key and no sign-up. Then ask your AI, for example: check this approval before I sign it or what is the USDC balance of 0x… on Base. Guides per client are on Developers.

Chains: hyperevm (999), elysium (99901), ethereum (1), base (8453), arbitrum (42161). Amounts are decimal strings in native units, like "0.25".

The flow

1. Your AI calls prepare_tx or risk_check. 2. Onrecord runs the call with eth_call and eth_estimateGas on the latest block, and a call trace with logs where the RPC serves debug_traceCall. 3. The calldata is decoded and explained in one sentence, without AI. 4. The risk layers run and the worst level wins. 5. A record is written. 6. If the verdict is not block, a signing link is returned. 7. You open it, see a fresh simulation, and sign in your own wallet. 8. The page reports the transaction hash back and the record shows whether it matches what was prepared.

MCP tools

ToolWhat it does
get_chainsChains with live block height and gas.
get_balanceNative balance.
get_tokensNative plus ERC-20 balances: common tokens of the chain and any addresses you pass.
get_txTransaction, receipt status and a plain explanation.
get_safeOwners, threshold, nonce, version, balance of a Safe.
simulate_txRevert reason, gas, fee, asset changes, net change for the sender.
explain_txDecoded call: known ABIs first, then the verified ABI on Sourcify, then a public signature database.
risk_checkSimulation plus every risk layer. Verdict pass, warn or block. Writes a record.
prepare_txRisk check plus a signing link valid for 30 minutes. With safe, prepares a Safe transaction for an agent under its policy.
agent_wallet_planSafe 1-of-2 creation plan with predicted address and a signing link for the owner.
set_policy / get_policySpend caps for an agent Safe, activated by an owner signature.
get_record, aboutOne record; service facts and limits.

Transactions can be given as raw to, value, data, or as token + amount + to (with action: "approve" for an approval). Without from the simulation uses a funded simulation account.

Risk rules

Mandatory layers are the simulation, the target code and the scam list. If one of them cannot finish, the verdict is block. Fail closed.

RuleLevelWhen
check_incompleteblockA mandatory layer could not run.
known_bad_addressblockTarget, recipient or spender is on the public ScamSniffer address list.
approval_to_eoablockAn approval or approval-for-all goes to an address without code.
token_to_itselfblockTokens are sent to the token contract.
transfer_blockedblockA token you would receive or approve cannot be transferred in simulation (balance placed by state override, then transfer).
policy_*blockAgent Safe without policy, expired, target not allowed, above per-tx or daily cap.
would_revertwarnThe call reverts in simulation.
unlimited_approval, approval_for_allwarnUnlimited allowance or a whole collection.
unverified_contractwarnNo verified source on Sourcify (or the explorer on Elysium and Ethereum).
upgradeable_proxywarnEIP-1967 implementation or beacon slot is set.
owner_privilegeswarnThe contract has an owner and its code contains mint, pause, blacklist or fee setters.
fresh_contractwarnNo code at the block from 72 hours ago.
transfer_taxwarnThe receiver gets at least 1% less than sent.
most_of_balancewarn90% or more of the sender's native balance.
burn_recipient, data_to_eoawarnBurn address recipient; calldata to an address without code.
verification_unknown, age_unknownwarnAn optional lookup failed.

Signing links

A link is /sign/<id>.<expiry>.<mac>. The mac is an HMAC-SHA256 over the id, the expiry, the chain and the hash of the exact transaction, so a changed amount or target breaks the link. Links expire after 30 minutes. The page re-simulates before you sign and uses your browser wallet (EIP-1193). After sending, it attaches the hash and the gateway checks to, value and data on chain: matched or mismatch.

Agent wallets

Safe v1.4.1 from the official factory 0x4e1DCf7AD4e460CfD30791CCC4F9c8a4f820ec67, singleton SafeL2 on HyperEVM, Elysium, Base and Arbitrum and Safe on Ethereum, fallback handler 0xfd0732Dc9E303f09fCEf3a7388Ad10A83459Ec99. Owners: you and the agent, threshold 1. The owner signs a plain policy message; the gateway checks that the signer is an owner of that Safe and not the agent. When the agent calls prepare_tx with safe, the gateway applies the caps and returns the Safe transaction hash for the agent to sign. Caps live in the gateway, not on chain: the agent key used directly could bypass them. Remove the owner to revoke.

Record and digests

Record hash = sha256 of the canonical JSON (sorted keys, no spaces) of {v, id, ts, chain, kind, target, verdict, rules (sorted), payload_hash}. The payload hash is sha256 of the canonical {chain, from, to, value, data}. Each UTC hour: root = sha256(hashes ordered by time then id, joined by "\n"), digest = sha256(prev + ":" + hour + ":" + count + ":" + root), where hour is the unix time divided by 3600 and the first prev is 64 zeros. Recompute any of it on Verify.

HTTP API

Base https://onrecordapp.xyz/api/v1. JSON in, JSON out, CORS open. Full spec: openapi.json.

EndpointPurpose
GET /health, /config, /chainsStatus, live features, chains.
GET /balance, /tokens, /tx, /safeReads, with chain and address, hash or safe.
POST /simulate, /explain, /risk_check, /prepareTransaction tools.
POST /agent_wallet_plan, GET|POST /policy, POST /nonceAgent wallets.
GET /records, /records/{id}, /verify/{id}, /digests, /statsThe public record.
GET /sign/{token}, POST /records/{id}/submittedSigning links.
POST /tierGasless holder check.

Limits

  • 60 requests a minute per IP across MCP and API.
  • Simulation is a snapshot. State can change before you sign.
  • No call traces on Elysium yet, so asset changes there show what the request sends.
  • Fresh-contract and token-transfer checks depend on archive and override support of public RPCs; when they cannot run you see an _unknown warning.
  • No contract audit and no sanctions screening.
  • Not live: swaps, private sends, copy trading, an on-chain cap module, an on-chain anchor for digests. /api/v1/config lists exactly what is live.
Copied