Skip to content

A pre-recording verification simulator for notarized documents, ensuring integrity and authenticity with EVM-based anchoring.

License

Notifications You must be signed in to change notification settings

chrismaz11/TrustSignal

Repository files navigation

Deed Shield

Impeccable MVP for a pre-recording verification simulator that ingests synthetic notarized bundles, verifies a simulated RON seal and notary authority, emits immutable-style receipts, and anchors receipt hashes on EVM.

Quickstart

npm install
npm -w apps/api run db:generate
npm -w apps/api run db:push
npm -w apps/api run dev

In another terminal:

npm -w apps/web run dev

API defaults to http://localhost:3001, web runs on http://localhost:3000.

Local Demo

Runs 50 synthetic verifications, anchors 5 receipts, and verifies receipt integrity.

npm run demo

Anchoring Modes

  • Local mode (default)
    • Requires a local EVM RPC at LOCAL_CHAIN_URL (defaults to http://127.0.0.1:8545).
    • Requires LOCAL_PRIVATE_KEY (demo sets it automatically).
  • Sepolia mode
    • Set SEPOLIA_RPC_URL and PRIVATE_KEY.
    • Provide ANCHOR_REGISTRY_ADDRESS (deployed contract address).

If Sepolia env vars are missing, the API uses local mode.

API Examples

curl -s http://localhost:3001/api/v1/health
curl -s http://localhost:3001/api/v1/synthetic | \
  curl -s -X POST http://localhost:3001/api/v1/verify \
  -H 'content-type: application/json' \
  -d @-
curl -s http://localhost:3001/api/v1/receipt/<receiptId>
curl -s -X POST http://localhost:3001/api/v1/anchor/<receiptId>

OpenAPI spec: apps/api/openapi.json.

Threat Model Notes

  • Synthetic-only: no real PII is ingested or persisted.
  • Receipts are immutable-style: integrity is derived from canonical JSON hashing.
  • Anchoring stores only hashes; no document contents are posted on-chain.
  • Trust registry validation rejects unsigned or tampered registries.

Repo Layout

  • apps/api: Fastify API + Prisma (SQLite)
  • apps/web: Next.js portal UI
  • packages/core: canonicalization, hashing, registry, verification engine
  • packages/contracts: Solidity AnchorRegistry + deploy scripts
  • scripts/demo.ts: end-to-end demo run

Deed Shield v2 Risk & Proof Model

Deed Shield v2 introduces advanced risk detection and privacy-preserving proofs.

1. Document Fraud Risk Engine

An AI-driven module that analyzes deed PDFs for anomalies before recording.

  • Forensics: Dectects suspicious metadata/timestamps.
  • Layout: Validates structure against known templates.
  • Result: Generates a fraudRisk object in the verification receipt (Low/Medium/High risk bands).

2. Zero-Knowledge Compliance (ZKP)

Proves policy compliance without revealing private transaction details (Notary ID, County codes).

  • Output: zkpAttestation embedded in receipts.
  • Privacy: Does not expose PII or internal rule logic.

3. Receipt Revocation

Allows lifecycle management of issued receipts.

  • Endpoint: POST /api/v1/receipt/:receiptId/revoke
  • Mechanism: Updates status in registry; reflected in verification responses.

4. Anchor Portability

Designed for multi-chain anchoring.

  • Stub: PortableAnchorManager in core prepares for swapping anchor providers without invalidating historical proofs.

Documentation

Full user documentation is available in the User Manual.

About

A pre-recording verification simulator for notarized documents, ensuring integrity and authenticity with EVM-based anchoring.

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages