Skip to content

Evaluate @guardianproject/proofmode WASM package as parser/verifier replacement #2

@johnx25bd

Description

@johnx25bd

Context

We wrote a custom ProofMode bundle parser (src/parse/) that handles CSV metadata extraction, signal normalization, and bundle file categorization. Signature verification is stubbed (MVP checks format, not crypto).

Guardian Project publishes @guardianproject/proofmode (v0.5.0, npm, Jan 2026) — a Rust→WASM package that does everything our parser does plus real cryptographic verification:

  • PGP signature verification (via pgp Rust crate)
  • SHA-256 hash verification
  • OpenTimestamps verification
  • C2PA Content Credentials checking
  • SafetyNet/DeviceCheck attestation validation
  • EXIF metadata extraction

Source: https://gitlab.com/guardianproject/proofmode/proofmode-rust
npm: https://www.npmjs.com/package/@guardianproject/proofmode
Rust crate: https://crates.io/crates/proofmode (v0.3.2)

Task

  1. Test Node.js compatibility: The README notes "runtime issues" in Node.js (WASM works in browsers). Install the package and try calling checkFiles() with a real ProofMode bundle in Node 18+. Document what works and what breaks.

  2. Evaluate API surface: Their exports are checkFiles, checkCIDs, checkURLs, generate_proof_wasm, get_file_hash. Map these to our plugin interface needs:

    • Can checkFiles() output replace our parseBundle() + createStampFromBundle() pipeline?
    • Does the return value include parsed signals (lat/lon, timestamps, device info)?
    • Can we extract what we need for UnsignedLocationStamp from their result?
  3. If it works: Refactor plugin-proofmode to use their package for parsing and verification, keeping our code as a thin adapter that maps their output to Astral's LocationStamp format. Our custom parser becomes a fallback or is removed.

  4. If Node.js WASM doesn't work: Consider alternatives:

    • Build thin native Rust addon (their crate is on crates.io)
    • Use their Docker image as a sidecar
    • Use archived proofcheck-node (pure JS, uses openpgp v5) as reference for adding real PGP verification to our parser
    • Keep our parser for extraction, add openpgp for signature verification

Why this matters

Using their official package gives us:

  • Real cryptographic verification instead of format-only stubs
  • Cross-platform support maintained by the ProofMode team
  • Automatic support for new ProofMode features (C2PA, etc.)
  • Less code to maintain

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions