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
| Tool | What it does |
|---|---|
get_chains | Chains with live block height and gas. |
get_balance | Native balance. |
get_tokens | Native plus ERC-20 balances: common tokens of the chain and any addresses you pass. |
get_tx | Transaction, receipt status and a plain explanation. |
get_safe | Owners, threshold, nonce, version, balance of a Safe. |
simulate_tx | Revert reason, gas, fee, asset changes, net change for the sender. |
explain_tx | Decoded call: known ABIs first, then the verified ABI on Sourcify, then a public signature database. |
risk_check | Simulation plus every risk layer. Verdict pass, warn or block. Writes a record. |
prepare_tx | Risk check plus a signing link valid for 30 minutes. With safe, prepares a Safe transaction for an agent under its policy. |
agent_wallet_plan | Safe 1-of-2 creation plan with predicted address and a signing link for the owner. |
set_policy / get_policy | Spend caps for an agent Safe, activated by an owner signature. |
get_record, about | One 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.
| Rule | Level | When |
|---|---|---|
check_incomplete | block | A mandatory layer could not run. |
known_bad_address | block | Target, recipient or spender is on the public ScamSniffer address list. |
approval_to_eoa | block | An approval or approval-for-all goes to an address without code. |
token_to_itself | block | Tokens are sent to the token contract. |
transfer_blocked | block | A token you would receive or approve cannot be transferred in simulation (balance placed by state override, then transfer). |
policy_* | block | Agent Safe without policy, expired, target not allowed, above per-tx or daily cap. |
would_revert | warn | The call reverts in simulation. |
unlimited_approval, approval_for_all | warn | Unlimited allowance or a whole collection. |
unverified_contract | warn | No verified source on Sourcify (or the explorer on Elysium and Ethereum). |
upgradeable_proxy | warn | EIP-1967 implementation or beacon slot is set. |
owner_privileges | warn | The contract has an owner and its code contains mint, pause, blacklist or fee setters. |
fresh_contract | warn | No code at the block from 72 hours ago. |
transfer_tax | warn | The receiver gets at least 1% less than sent. |
most_of_balance | warn | 90% or more of the sender's native balance. |
burn_recipient, data_to_eoa | warn | Burn address recipient; calldata to an address without code. |
verification_unknown, age_unknown | warn | An 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.
| Endpoint | Purpose |
|---|---|
GET /health, /config, /chains | Status, live features, chains. |
GET /balance, /tokens, /tx, /safe | Reads, with chain and address, hash or safe. |
POST /simulate, /explain, /risk_check, /prepare | Transaction tools. |
POST /agent_wallet_plan, GET|POST /policy, POST /nonce | Agent wallets. |
GET /records, /records/{id}, /verify/{id}, /digests, /stats | The public record. |
GET /sign/{token}, POST /records/{id}/submitted | Signing links. |
POST /tier | Gasless 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
_unknownwarning. - 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/configlists exactly what is live.