Repository navigation
Description
Re-scoped 2026-07-10 → ADR 0006 (via #202). Since this spike was written, a hand-rolled
127.0.0.1:8765loopback bridge shipped (#62/#63/#139/#141/#146/#148/#198) and is accepted as the temporary, experimental alpha transport — it is not the end state and gets no further hardening. Native messaging remains the post-audit target, so open choice (a) below is about the replacement wire, not the alpha's. Task 5's localhost contrast can use the shipped bridge as a live specimen.
Part of #44 (ADR 0001). First deliverable of PRD-04. Standalone spike — do not touch crates/ or ship anything user-facing.
Goal
Prove (or disprove) that a first-party, key-less browser connector can give Deckard universal dapp reach over a wire Deckard owns end-to-end (no third-party relay, no embedded browser, no store as a trust anchor), and settle two open choices: (a) the local wire (native messaging vs hardened localhost) and (b) the self-distribution path, on both Chromium and Firefox.
Context (verified in research — don't re-litigate)
- Dapps speak EIP-1193; inject a standard provider announced via EIP-6963 (research §7, 21–22).
- Native messaging is the leading wire: OS-installed stdio host gated by manifest
allowed_origins/allowed_extensions, runs as the user, not web-reachable (§3, 12, 15). - A localhost RPC port is web-reachable (DNS-rebinding / cross-site WS hijacking); needs origin-allowlist + token + Host checks and is still weaker (§1, 2).
- MV3 service workers are ephemeral;
connectNativekeeps the port alive but reconnect ononDisconnect(§5). - Trust is bounded by design, not the store: a key-less connector, even fully compromised, can only propose — never sign/self-approve/exfiltrate a key (§6, 22, 29). This is why self-signed off-store distribution is acceptable.
- Mirror
deckard-mcp(docs/build/30-mcp-shape.md); usedeckard-contract'sMockSigner(no real key).
Tasks
- Mock host + mock daemon: a small Rust bin (spike's
deckard-bridgedstand-in) speaking native-messaging stdio framing (32-bit native-endian length + UTF-8 JSON, §12) on one side and thedeckard-contractwire toMockSigneron the other. Mapeth_requestAccounts→Address,personal_sign→mock sign,eth_sendTransaction→Propose/Status/Execute. Standalone cratespikes/deckard-bridge/with its own[workspace];.gitignoretarget/+Cargo.lock; depend ondeckard-contractby path. No real key/signing/broadcast. - Minimal connector (Chromium MV3 + Firefox; separate manifests): inject EIP-1193, announce via EIP-6963 (
rdnse.g.sh.deckard), relay page JSON-RPC → background → native-messaging port → host. Handle MV3 SW reconnect. - Drive a real dapp end to end:
eth_requestAccounts+ onepersonal_sign, on Chromium and Firefox. - Stress MV3: force SW eviction mid-session; confirm reconnect + success.
- Prove web-unreachability of native messaging (no port to reach from a page); contrast: show a localhost fallback can be reached cross-origin without defenses, and that token/Host checks block it.
- Self-distribution dry run: signed Firefox XPI installed from a self-hosted URL (not AMO listing); Chromium self/sideload path + friction, documented.
Constraints
Standalone spikes/deckard-bridge/; don't edit crates//app. Key-less throughout; no real broadcast. No secret in any log/message (grep assertion).
Success criteria / report
YES/NO on "native messaging carries a full EIP-1193 round-trip cleanly on both browsers with reliable MV3 reconnection," + a wire recommendation (with the §5 security evidence), + a self-distribution recommendation (exact Firefox + Chromium paths + friction), + a runnable spike. Return a <spike_report> with: wire_verdict, native_messaging, web_unreachability, distribution, eip6963, what_worked/failed, recommendation (one paragraph for PRD-04), artifacts.
(The full spike brief was drafted at spikes/deckard-bridge-spike.md on branch claude/wallet-security-dapps-extension-jzlxj7; per the issues-for-work-items convention it now lives here.)
Activity
0xpantera commentedon Jun 14, 2026
Starting a narrow implementation branch for the first minimal EIP-1193 browser bridge scaffold: local test dapp -> injected provider -> localhost Deckard bridge -> in-memory dapp session -> selected account. Scope is intentionally smaller than the full PRD-04 spike: no Kohaku, no hardware wallet support, no broad signing, no native messaging decision yet.