Local signing companion: a second, independent check on every transaction before you sign
翻译准备中
正在加载完整 README。
查看完整 README ↗A second, independent check on every transaction before you sign.
Ethereum is built to be verifiable, and verification is cheap. Yet most users still sign transactions without independently checking what they approve. Onay makes that second check seamless: it verifies the transaction locally, explains what it does, and lets you compare against your wallet before signing.
Onay is a local desktop app with a thin browser extension that sits between the dapp and the wallet. It intercepts the signing request, verifies chain state through an embedded Helios light client, recompiles and verifies the source code locally, simulates the transaction, renders its intent in readable form with ERC-7730 Clear Signing, and finally displays the ERC-8213 calldata digest for an equivalence check with the wallet. Onay is view only: it holds no keys and does not replace your wallet.
The plan of record is PLAN.md.
| Folder | What it is |
|---|---|
app/ | The desktop app (Tauri). The web user interface is in app/src/, the Rust side in app/src-tauri/. Also holds the relay (app/relay/) and the code that relay and app share (app/ipc/). |
site/ | The download page at onay.sh. Static HTML, built with Vite and Tailwind. |
extension/ | The Chrome extension (Manifest V3). No runtime dependencies. |
Node.js 22 or newer and pnpm. The exact pnpm version is pinned in package.json; pnpm switches to it automatically.
Rust through rustup. The compiler version is pinned in app/rust-toolchain.toml; rustup installs it on first use.
A Chromium-based browser: Google Chrome, Brave, Microsoft Edge, or Vivaldi, Chromium on Linux, Arc on macOS. On Linux, install it as a normal package: Snap and Flatpak browsers cannot start the relay.
Linux only: the Tauri system libraries.
sudo apt install libwebkit2gtk-4.1-dev libdbus-1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev
macOS only: the Xcode Command Line Tools (xcode-select --install).
Then install the JavaScript dependencies once, from the repo root:
pnpm install
pnpm --filter app tauri dev
This builds the relay, starts the web user interface with hot reload, compiles the app, and opens its window. At startup the app does two things:
~/.config/google-chrome/NativeMessagingHosts/dev.sourcify.onay.json. The manifest points to the relay in app/target/debug/.$XDG_RUNTIME_DIR/onay/onay.sock (Linux) or $TMPDIR/onay/onay.sock (macOS).The settings list both under "Browser link".
pnpm --filter extension build
chrome://extensions and turn on "Developer mode".extension/dist.iobfgkmfcccohihielbadfbebklmbdbp. The app accepts only this ID. The key field in extension/manifest.json keeps it the same on every machine.After a code change, build again and click the reload icon on the extension card.
auditors/ directory lists them. The same page holds the token lists: a call to a listed token renders with the ERC-20 template. The Uniswap Labs Default list is there from the start; add more by URL, in the Uniswap Token Lists format.To pair again, quit the app and delete its key store: ~/.local/share/dev.sourcify.onay/link.json (Linux) or ~/Library/Application Support/dev.sourcify.onay/link.json (macOS). At the next start the app makes a new key and knows no extension, so the extension shows a new pairing code. The development and the production app use the same file, so this resets both. To give the extension a new key too, run indexedDB.deleteDatabase('onay') in the console of its service worker (chrome://extensions, "service worker" link on the Onay card) and reload the extension.
The Onay icon in the Chrome toolbar shows the state of the link. If the app is not running when a site asks for a signature, the extension opens a small window that asks you to start the app, and it forwards the request when the app is there.
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗