Skip to content

feat(examples): Chrome extension standalone stealth scanner#161

Open
jerrygeorge360 wants to merge 1 commit into
wraith-protocol:developfrom
jerrygeorge360:feat/stellar-chrome-extension
Open

feat(examples): Chrome extension standalone stealth scanner#161
jerrygeorge360 wants to merge 1 commit into
wraith-protocol:developfrom
jerrygeorge360:feat/stellar-chrome-extension

Conversation

@jerrygeorge360

Copy link
Copy Markdown

Closes #142

What

Adds examples/stellar-chrome-extension/ — a Manifest V3 Chrome extension that scans Stellar in the background service worker and raises a desktop notification on incoming stealth payments. No webapp tab required.

Built on @wraith-protocol/sdk/chains/stellar: deriveStealthKeys, fetchAnnouncementsStream, scanAnnouncements, generateStealthAddress.

How it works

  • Service worker (src/background/service-worker.ts) is the scanner. MV3 workers are ephemeral, so durable state lives in chrome.storage.local and the scan cadence is driven by chrome.alarms (not setInterval). Each run scans forward from the last ledger and fires one notification per newly detected payment. Clicking a notification opens the demo dApp's activity view for that address.
  • Popup (src/popup/) connects a wallet once (Freighter via a demo-dApp round-trip, or a manual signature paste), shows scan status + recent payments, and has Scan now / Fire test event buttons.
  • Only viewing-side material is stored (viewing key, spending pubkey, spending scalar) — enough to detect payments, never a mnemonic or spend secret. The signature is discarded after key derivation.

Acceptance criteria

  • Load-unpacked instructions in README — step-by-step chrome://extensions flow
  • Notification fires on canned test eventbuildTestAnnouncement runs the real sender-side crypto against the connected wallet's own keys, so scanAnnouncements produces a genuine, verifiable match before the notification fires (works fully offline)
  • No permission over-reachstorage, alarms, notifications, two exact testnet host URLs, and one exact externally_connectable origin. No <all_urls>, no wildcard hosts, no tabs permission.

Notes / follow-ups

  • Testnet only; endpoints come from the SDK's stellar deployment.
  • The Freighter path depends on a demo-dApp /connect page that doesn't exist yet — documented in the README; the manual signature path is the working fallback.
  • The dynamically-imported @stellar/stellar-sdk XDR codec chunk is ~988 kB (used only by the live RPC scan, not by worker startup or the test event). Could be trimmed later by calling Soroban RPC directly.
  • Added to examples/README.md and the Examples CI matrix.

Add examples/stellar-chrome-extension/, an MV3 Chrome extension that scans
Stellar in the background service worker and raises a desktop notification on
incoming stealth payments — no webapp required.

- Service worker drives scanning via chrome.alarms; state in chrome.storage
- Popup connects a wallet once (Freighter via demo dApp round-trip, or manual
  signature), shows status + recent payments, Scan now / Fire test event
- Test event runs the real sender-side crypto so scanAnnouncements produces a
  verifiable match before notifying
- Minimal permissions: storage, alarms, notifications, two exact testnet hosts,
  one exact externally_connectable origin
- Wired into examples README + Examples CI matrix
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@jerrygeorge360 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Chrome extension example: standalone scanner

1 participant