Self-onboarding: SIWE/SIWS + /claim web app + extension session bootstrap#6
Merged
Conversation
…(Fastify mock), shared types
…t content+background build, content via Vite IIFE, background via esbuild, manifest copy)
…SIWE message preview, A-tier success state)
…o — watchlist, identity, co-signer)
….kiro/internal/ (ignored); public docs describe principles without numbers
# Conflicts: # .gitignore
…, founder-community popup
Security audit results:
- Removed raw numeric signal fields (confidence, *_hours, *_usd, top10_pct, etc)
from consumer ScoreResponse. Partner API is a separate surface.
- Removed client-side thresholds from Overlay.tsx. Now a pure renderer of
server-supplied display strings and ui_flags.
- Split dev manifest.json (localhost origin, 'dev' marker) from manifest.prod.json
(no dev origins, clean name, default_popup).
- Build-time inject of API_BASE via __API_BASE__ / __BUILD_ENV__ defines in
both Vite (content) and esbuild (background/popup).
- Background now attaches Bearer session token to every API call; content
script never touches credentials.
Popup added:
- src/popup/popup.html + index.ts (vanilla TS, no React to keep size small)
- Renders plan badge, usage bar, identity state, founder community link
- Community link is a build-time constant, never fetched from API
Release strategy:
- docs/release-strategy.md (public): 3-phase plan without numbers
- .kiro/steering/release.md: invariants Kiro must preserve going forward
including explicit rejection of invite-only consumer distribution
Build verified:
- dev: manifest 'TruthLayer (dev)', localhost origin, sourcemaps
- prod: manifest 'TruthLayer', only x.com + twitter.com origins, minified,
no localhost strings anywhere in bundles
API (apps/api): - Zero-dep HS256 JWT (timing-safe compare) - SIWE verifier (secp256k1 personal_sign recovery via ethereum-cryptography) - SIWS verifier (Ed25519 via @noble/curves + bs58) - Single-use nonces: 10-min TTL, per-triple, only-latest-valid, consume-on-submit - In-memory identity/session stores with Postgres-ready interfaces - Routes: POST /v1/session/anonymous, GET /v1/session, POST /v1/claim/nonce, POST /v1/claim - Category-level errors; no leakage of which defense layer fired - Twitter OAuth behind TwitterVerifier interface (stub for v1) Claim web app (apps/claim-web): - Vanilla TS + Vite, ~8KB gzipped, no wagmi/viem/ethers - Real wallet integration via window.ethereum (EIP-1193) and window.solana - 3-step flow: handle -> wallet -> sign; signed message is always the server-built canonical form (never templated client-side) - localStorage session persistence, refresh-safe mid-flow Extension (apps/extension): - Anonymous session bootstrap on onInstalled/onStartup and worker load - Token stored in chrome.storage.local.tl_session, attached to every API call by the background worker; content script never touches it Shared contract (packages/shared): - Session / claim request+response types - buildClaimMessage() — single source of truth for the canonical message so API and clients cannot desynchronize whitespace Adapters seam (apps/api/src/adapters): - Interface-only stubs for chain / price / social / risk adapters - README documents the mock -> real swap path without leaking provider choices Steering: - .kiro/steering/claim-flow.md: canonical-message, nonce lifecycle, signature verification, session model, never-merge rules Public docs: - docs/data-pipeline.md: what the pipeline consumes at the principle level, without naming providers or internal cache policies Smoke verified (both scripts pass): - apps/api/test-e2e-claim.mjs: wallet keypair -> anonymous session -> nonce -> sign -> A-tier recorded + replay rejected (403) + tampered message rejected (403) - apps/api/test-e2e-session.mjs: anonymous session issuance, snapshot, score with bearer, invalid bearer correctly 401
miraekims
pushed a commit
that referenced
this pull request
May 11, 2026
Merge pull request #6 from youngboy91-beep/feat/identity-auth-scaffold
miraekims
added a commit
that referenced
this pull request
May 12, 2026
Self-onboarding: SIWE/SIWS + /claim web app + extension session bootstrap Co-authored-by: youngboy91-beep <247809216+youngboy91-beep@users.noreply.github.com>
miraekims
added a commit
that referenced
this pull request
May 12, 2026
Merge pull request #6 from youngboy91-beep/feat/identity-auth-scaffold Co-authored-by: youngboy91-beep <247809216+youngboy91-beep@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request was generated by @kiro-agent 👻
Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent
Self-onboarding end-to-end: real SIWE/SIWS verification,
/claimweb app, extension session bootstrap.API (apps/api)
Claim web app (apps/claim-web)
Extension (apps/extension)
Shared contract (packages/shared)
Adapters seam (apps/api/src/adapters)
Steering
Public docs
Smoke verified
Both test-e2e-*.mjs scripts pass: