Skip to content

feat(chat-app): message recovery from Walrus archives - #77

Open
ioannischtz wants to merge 2 commits into
sew-1004-walrus-discovery-indexer-localnetfrom
sew-1004-chat-app-recovery-transport
Open

ioannischtz wants to merge 2 commits into
sew-1004-walrus-discovery-indexer-localnetfrom
sew-1004-chat-app-recovery-transport

Conversation

@ioannischtz

Copy link
Copy Markdown
Collaborator

Stacked on #76 (which stacks on #75). Closes the SEW-1004 recovery loop: the chat-app can restore a group's archived messages from Walrus without the relayer.

  • WalrusRecoveryTransport (chat-app/src/lib/walrus-recovery-transport.ts, adapted from the SDK's non-exported example): indexer patch list → aggregator content → SDK decryption. Wired via the factory's recovery option when indexer + aggregator URLs are configured (VITE_INDEXER_URL, defaults to localhost:3001 under devstack).
  • Restore button in the chat header merges recovered messages into the open conversation (dedupe by messageId, order-sorted).
  • The transport normalizes the archived signature/public_key byte arrays to hex before mapping — the published SDK (0.0.2) passes them through raw, which silently kills sender verification on recovery. The SDK-side fix is deliberately NOT in this stack (avoids coupling to a release); it is parked on fix-sdk-walrus-message-signature-fields for its own PR.
  • Runbook: DEVSTACK.md gains the disaster-recovery demo (kill + restart the relayer → empty store → Restore) and now points at the routed URL only (127.0.0.1:5173 is a forbidden origin for the dev-wallet server — no accounts show).

Validated headless (2 archived messages recovered relayer-independently, decrypted + sender-verified) and manually in the UI (relayer restarted with empty store → member-check error on fetch → Restore brings history back).

Known reference-relayer limitation surfaced by the demo, out of scope: no checkpoint backfill, so a restarted relayer rejects fetches/sends for pre-existing groups (develop-relayer lists backfill as the fork exercise).

🤖 Generated with Claude Code

ioannischtz and others added 2 commits July 7, 2026 13:28
- WalrusRecoveryTransport (adapted from the SDK example): indexer patch
  list -> aggregator content -> SDK decryption; normalizes the archived
  Vec<u8> signature fields until the SDK fix ships in a release
- wired via the factory's recovery option when indexer + aggregator URLs
  are configured (devstack defaults the indexer to localhost:3001)
- Restore button in the chat header merges recovered messages into the
  open conversation

Validated live: 2 archived messages recovered relayer-independently,
decrypted + sender-verified.

Co-Authored-By: Claude Fable 5 <[email protected]>
The dev-wallet server allowlists only the routed app origin; on
127.0.0.1:5173 the wallet shows no accounts (forbidden origin).

Co-Authored-By: Claude Fable 5 <[email protected]>
@vercel

vercel Bot commented Jul 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
groups-sdk Ready Ready Preview, Comment Jul 7, 2026 10:32am

Request Review

This branch was successfully deployed

1 active deployment
Preview — 4c0a15e9 Deployed Jul 7, 2026 by vercel[bot]
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.

1 participant