Skip to content

FairStamp/verify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FairStamp Verify

Independent verification tools for FairStamp receipts.

This repository contains open-source tools to verify FairStamp receipts (.fsreceipt files) without relying on FairStamp's servers. Your receipts are self-contained cryptographic proofs — these tools let you verify them forever, even if FairStamp ceases to exist.

Compatibility Promise

FairStamp receipts are permanently valid. This verification tool guarantees:

Receipt Version Verification Support
v1.0 (legacy) ✅ Full verification
v1.1 (current) ✅ Full verification
v2.0+ (future) ✅ Core verification with graceful degradation

Your receipts are permanent. Our verification is eternal.

The schema_version field in every receipt tells the verifier how to parse it. As FairStamp evolves to support DNFTs, token integration, and new features, this tool will:

  • Always verify core fields (hash, timestamp, signature)
  • Add full support for new versions as they're released
  • Never break verification of old receipts

What This Verifies

  • ✅ File hash matches the receipt (SHA-256)
  • ✅ Receipt structure is valid (all schema versions)
  • ✅ Timestamp has not expired
  • ✅ Dual timestamp integrity (v1.1+ receipts)
  • ✅ Issuer signature validity
  • ✅ Schema version compatibility

Quick Start

Python (no dependencies)

# Verify a single file
python verify.py myfile.jpg myfile.jpg.fsreceipt

# Verify just the receipt structure
python verify.py --receipt-only myfile.jpg.fsreceipt

# Batch verify a folder
python verify.py --batch ./my-receipts/

Node.js (no dependencies)

# Verify a single file
node verify.js myfile.jpg myfile.jpg.fsreceipt

# Verify just the receipt structure
node verify.js --receipt-only myfile.jpg.fsreceipt

Browser

Open verify.html in any browser — drag and drop your file and receipt for instant verification.

Receipt Structure

For complete schema documentation including all versions and field definitions, see SCHEMA.md.

Version Detection

Every FairStamp receipt contains a schema_version field that determines how to parse and verify it:

{
  "schema_version": "1.1",   // ← Verifier reads this FIRST
  "receipt_id": "FS-...",
  ...
}

Schema v1.0 (Legacy)

Single timestamp source, basic structure:

{
  "receipt_id": "FS-1734567890-0",
  "schema_version": "1.0",
  "content": {
    "asset_hash": "a1b2c3d4...",
    "hash_algorithm": "SHA-256"
  },
  "timestamp": {
    "created_at": "2025-12-20T15:30:00.000Z",
    "authority": "FairStamp TSA",
    "valid_until": "2035-12-20T15:30:00.000Z"
  }
}

Schema v1.1 (Current)

Dual timestamps from independent sources for enhanced trust:

{
  "receipt_id": "FS-1734567890-0",
  "schema_version": "1.1",
  "content": {
    "asset_hash": "a1b2c3d4...",
    "hash_algorithm": "SHA-256"
  },
  "timestamp": {
    "primary": {
      "created_at": "2025-12-20T15:30:00.000Z",
      "authority": "FairStamp TSA",
      "traceability": "Google Cloud NTP → GPS/Atomic"
    },
    "secondary": {
      "created_at": "2025-12-20T15:30:00.043Z",
      "authority": "Cloudflare Edge",
      "traceability": "Cloudflare Stratum-1 → GPS/Atomic"
    },
    "delta_ms": 43,
    "integrity_hash": "...",
    "valid_until": "2035-12-20T15:30:00.000Z"
  },
  "issuer": {
    "name": "FairStamp",
    "id": "did:web:fairstamp.com",
    "policy_oid": "2.16.840.1.113733.1.7.23.6"
  },
  "extensions": {
    "gstm_burn": { ... },
    "dnft_upgrade": { "eligible": true }
  }
}

Future Versions (v2.0+)

Future versions will add fields for:

  • DNFT binding and upgrade paths
  • Token ecosystem integration
  • Merkle batch membership proofs
  • Post-quantum signature migration

New fields always APPEND — existing fields never move or disappear.

Why Open Source?

When you purchase FairStamp credits, you're buying cryptographic proof that exists independently of our service. These tools ensure:

  1. Permanence — Verify receipts even if FairStamp stops operating
  2. Transparency — See exactly how verification works
  3. Independence — No API calls, no accounts, no tracking

License

MIT License — use freely for any purpose.

Links


FairStamp is a product of Wave 3 Digital Trust LLC

About

Open source verification tools for FairStamp receipts - Python, Node.js, and browser

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors