Commit Graph

6 Commits

Author SHA1 Message Date
Jeff Emmett f8ab716722 feat(x402): bridge on-chain USDC payments with CRDT token ledger
Connects x402 (on-chain USDC via Base) and CRDT token system (Automerge cUSDC)
in both directions: on-chain payments auto-mint cUSDC to payer's DID, and users
can pay with cUSDC balance via new "crdt" payment scheme. 402 responses now
return both exact and crdt payment options.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 14:23:24 -07:00
Jeff Emmett 97bf2d7987 feat(rwallet): integrate CRDT token flows into wallet visualizations
- Add transferTokens() and getAllTransfers() to token service
- Seed DAO ecosystem: cUSDC + BFT tokens, 3 treasuries, 6 participants,
  ~30 transactions spread over 60 days
- Add /api/crdt-tokens/transfers endpoint for ledger history
- Wire CRDT transfers into loadTransfers() with DID→pseudo-address mapping
- Update data transforms (timeline, sankey, multichain) to support
  _fromLabel/_toLabel for human-readable CRDT participant names
- Show viz tabs (Timeline, Flow Map, Sankey) when CRDT tokens exist
- Add "local"/"CRDT" chain to color and name maps

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-21 13:47:14 -07:00
Jeff Emmett 8bd8348529 feat(encryptid): fix DID consistency, add PRF key derivation, stepper signup, and magic link login
- Fix DID mismatch: server now stores and reads proper did🔑z6Mk... DIDs
  from database instead of deriving truncated did🔑${slice(0,32)}
- Add PRF extension to WebAuthn create/get flows for client-side key derivation
- Derive DID, signing keys, encryption keys, and EOA wallet from passkey PRF
- Auto-upgrade truncated DIDs to proper format on sign-in
- Add POST /api/account/upgrade-did endpoint for DID migration
- Add 5-step educational registration wizard (identity, passkey, DID, wallet, security)
- Add email/username field to sign-in for scoped passkey selection
- Add magic link email login for external devices without passkeys
- Add POST /api/auth/magic-link and GET /magic-login verification page
- Add mintWelcomeBalance() for 5 fUSDC to new users
- Store EOA wallet address during registration when PRF available

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-20 11:29:20 -07:00
Jeff Emmett 36931b2d30 fix(token-service): use known DID for jeff seed instead of cross-container API call
The directory API only returns space members, and jeff isn't in demo space.
Hardcode the known DID with SEED_JEFF_DID env var override support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:52:21 -07:00
Jeff Emmett df453d9e00 fix(token-service): use HTTP API instead of direct DB import for DID lookup
The rspace container doesn't have DATABASE_URL for the encryptid DB.
Use the /api/users/directory endpoint via HTTP to resolve jeff's DID,
with retry-on-restart if encryptid isn't reachable yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:48:32 -07:00
Jeff Emmett ba3a0018ea feat(rwallet): add cUSDC CRDT token system with Automerge ledger
Introduces CRDT-native token infrastructure stored as Automerge documents.
Seeds 5 cUSDC to user jeff on startup. Adds token API routes and a
"Local Tokens" section in the rWallet viewer.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 21:43:49 -07:00