Skip to content

Repository files navigation

proofmark

Content provenance you can actually verify. Sign what created or edited a piece of content — an AI model, a tool, a human — as W3C Verifiable Credentials that are cryptographically bound to the exact bytes. A C2PA-style provenance sidecar, offline and dependency-light.

🌍 English · Português · 📚 Documentation

proofmark demo: sign and verify a provenance chain

CInpmLicense: MIT

Why

"Was this AI-generated?" is the wrong question — you can't reliably detect it after the fact. The right question is "who claims to have made this, and can I verify it?" proofmark answers that: each actor signs an assertion (created / edited / aiGenerated / reviewed) bound to the content hash. Change one byte and the verification fails. It mirrors the C2PA model of signed assertions, using portable Verifiable Credentials instead of embedded manifests.

Install

npm install proofmark

Quick start

import{createIdentity,stamp,addAssertion,verifyManifest}from'proofmark';constaiTool=createIdentity();constreviewer=createIdentity();constcontent='An article drafted by AI, then reviewed by a human.';// The AI tool stamps what it generated…letmanifest=awaitstamp(aiTool,content,{action: 'aiGenerated',tool: 'claude-fable-5'});// …a human reviewer signs off on the same bytes.manifest=awaitaddAssertion(manifest,reviewer,content,{action: 'reviewed',tool: 'human'});constresult=awaitverifyManifest(content,manifest);console.log(result.valid);// trueconsole.log(result.contentMatches);// true — flips to false if a byte changes

Run the demo: npm run demo.

API

FunctionPurpose
createIdentity(seed?)Ed25519 did:key identity for a signer (AI tool or person).
hashContent(data)Content-binding hash ("sha256:…").
stamp(signer, content, assertion)Hash content + produce a manifest with one signed assertion.
addAssertion(manifest, signer, content, assertion)Append another signed assertion.
signAssertion(signer, hash, assertion)Low-level: sign one assertion VC.
verifyManifest(content, manifest)Recompute hash, verify every signature + binding.

An assertion has action (created | edited | aiGenerated | reviewed | published), an optional tool, createdAt, and free-form meta.

What it is (and isn't)

  • ✅ Portable, offline, verifiable provenance for any bytes (text, images, files).
  • ✅ Multi-actor chains (generator → editor → reviewer → publisher).
  • ⚠️ It does not embed a manifest inside a JPEG/PNG like full C2PA — it's a detached sidecar bound by hash. See docs/en/vs-c2pa.md.
  • ⚠️ It proves who signed a claim, not that the claim is true. Trust is rooted in which signer DIDs you accept.

License

MIT © Marcelo Domingues

About

Verifiable content provenance: sign what created/edited content (AI or human) as W3C VCs bound to the bytes. A C2PA-style sidecar, offline.

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages