Skip to content

feat(proofs): add Stellar wallet ownership proof generation, export, and verification (#219) - #229

Closed
jeffrey-graham wants to merge 1 commit into
SudiptaPaul-31:mainfrom
jeffrey-graham:feat/stellar-wallet-ownership-proof-export-219
Closed

jeffrey-graham wants to merge 1 commit into
SudiptaPaul-31:mainfrom
jeffrey-graham:feat/stellar-wallet-ownership-proof-export-219

Conversation

@jeffrey-graham

Copy link
Copy Markdown

Summary

Implements Stellar wallet ownership proof generation, multi-format export (json, signed_json, verification_link), independent third-party verification, and the OwnershipProofPanel UI component.

Key Changes

  • lib/ownership-proof-service.ts:
    • Generates immutable (Object.freeze) ownership proof records linking a Stellar wallet address, snippet ID, and verified Stellar transaction hash.
    • Produces canonical JSON serialization and deterministic HMAC-SHA256 signatures to detect tampering.
    • Supports exporting proofs as JSON, Signed JSON, and shareable Verification Links.
    • Independently verifies proofs across all 5 states (verified, invalid, tampered, pending, unverifiable) with granular verification checks (walletVerified, transactionVerified, snippetMatchConfirmed, networkVerified, signatureVerified).
    • Enforces wallet ownership authorization, rejects wrong-network transactions, handles transient network retries, and logs audit events.
  • UI Component (components/snippets/OwnershipProofPanel.tsx):
    • Displays wallet, snippet, transaction, network, and status metadata with export, link copy, and live verification checklist actions.
  • API Endpoints:
    • POST /api/snippets/[id]/ownership-proof & GET /api/snippets/[id]/ownership-proof
    • GET /api/ownership-proofs/[proofId]
    • POST /api/ownership-proofs/verify
  • Tests (lib/__tests__/ownership-proof-service.test.tsx):
    • 11 unit, route, and React component tests covering generation, immutability, export formats, tampered/invalid detection, wrong-network rejection, authorization, and UI interactions.

Closes #219

@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

@jeffrey-graham is attempting to deploy a commit to the Sudipta 's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Add Stellar Wallet Ownership Proof Export

1 participant