Skip to content

feat: extended interactive playground with guided send flow - #147

Merged
truthixify merged 1 commit into
wraith-protocol:developfrom
gbengaeben:feat/guided-playground-flow
Aug 27, 2026
Merged

feat: extended interactive playground with guided send flow#147
truthixify merged 1 commit into
wraith-protocol:developfrom
gbengaeben:feat/guided-playground-flow

Conversation

@gbengaeben

Copy link
Copy Markdown
Contributor

Summary

Implements the guided send flow for the interactive playground (#134). The playground in scripts/playground/ grows from a scan-only demo into a four-step stepper flow — derive → send → scan → withdraw — that teaches the stealth payment mental model entirely client-side, with no wallet or network dependency.

Changes

  • Stepper UI (index.html, new playground.js): four steps with per-step reset buttons, permalink sharing for a given step + inputs, and deep-link support via ?step=.
  • Derive step: splits a 64-byte wallet signature into domain-separated spending/viewing seeds, expands them into scalars + public keys, and shows the resulting st:xlm: meta-address.
  • Send step: derives a one-time ephemeral keypair, computes the stealth address via ECDH, and constructs the Horizon announcement event the stealth-announcer contract would emit — added to the scan batch.
  • Scan step: parses the fixture Horizon events with a minimal XDR (ScVal) codec (same shape the SDK's parseAnnouncementEvent consumes), applies the view-tag fast filter, then ECDH + Ed25519 point matching. Demo keys are one click away.
  • Withdraw step: computes the withdrawable stealth balances and shows the simulated withdrawal transaction signed with each stealth private scalar.
  • Fixtures (generate-fixtures.mjs): extended generator producing the demo recipient keys and five Horizon-shaped events (two matching, three noise) — verified in sync by pnpm run check:playground-fixtures.
  • Docs embeds: each step is embedded inline on its host page — derive on api-reference/stealth-keys.mdx, send + withdraw on guides/stellar/stellar-quickstart.mdx, scan on api-reference/fetch-announcements-stream.mdx.
  • Tests (scripts/playground/tests/): new Playwright smoke suite served over HTTP. The main test walks the full guided flow and fails on any request to a non-local origin, enforcing the zero-external-requests acceptance gate programmatically. CI job added to snippets.yml.

Verification

  • pnpm run test:playground — 2/2 passing (full flow with zero external requests + per-step deep links)
  • pnpm run check:snippets and pnpm run check:nav-coverage — passing
  • pnpm run check:playground-fixtures — fixtures in sync
  • mint validate — no warnings on the changed pages

Fixes #134

Extends the scan-only playground into a four-step derive, send,
scan, and withdraw flow with fixture Horizon events, embeds each
step in the relevant docs pages, and adds Playwright smoke tests
that enforce the zero-external-requests gate.

Fixes wraith-protocol#134
@drips-wave

drips-wave Bot commented Aug 27, 2026

Copy link
Copy Markdown

@gbengaeben 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

@truthixify
truthixify merged commit d0d48db into wraith-protocol:develop Aug 27, 2026
3 checks passed
@truthixify

Copy link
Copy Markdown
Contributor

Merged. This is a lot more than a stepper @gbengaeben. Extending the existing snippets workflow instead of adding a parallel one, wiring a fixture sync check so the fixtures cannot silently drift, and a real Playwright smoke test over the whole flow. Thanks also for asking the setup questions up front, it clearly paid off.

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.

Extended interactive playground with guided send flow

2 participants