TrustProof-Protocol

TrustProof Protocol

CI npm PyPI Spec Validated License: Apache-2.0 W3C CG Docs

TrustProof Protocol defines signed action receipts — compact Ed25519/EdDSA JWTs that bind a subject, policy snapshot, action, hashed inputs/outputs, timestamp, jti, and tamper-evident chain. Interoperable with W3C Verifiable Credentials, Mastercard Verifiable Intent, Google AP2, and all major agent frameworks.


What’s New in v0.2


Interop Protocols

TrustProof protocol_refs links to any agentic commerce protocol:

Protocol Field Organization
Verifiable Intent verifiable_intent_id Mastercard
AP2 Mandates ap2_mandate_id Google
A2A Tasks a2a_task_id Google
Agentic Commerce acp_checkout_id Stripe / OpenAI
x402 Payments x402_payment_hash Coinbase
MCP Tool Calls mcp_tool_call_id Anthropic
Upstream Proofs upstream_proof TrustProof Mesh

Quickstart

pnpm install
pnpm spec:validate
pnpm --filter @trustproof/sdk build
pnpm --filter @trustproof/sdk test
cd packages/py && python -m pytest -q && cd -

Generate and verify a proof:

node --input-type=module -e "
import {generateKeyPairSync} from 'node:crypto';
import fs from 'node:fs';
import {generate} from './packages/js/dist/index.js';
const c = JSON.parse(fs.readFileSync('./spec/examples/allow.json','utf8'));
const {privateKey, publicKey} = generateKeyPairSync('ed25519');
const priv = privateKey.export({format:'pem',type:'pkcs8'}).toString();
const pub = publicKey.export({format:'pem',type:'spki'}).toString();
const jwt = await generate(c, priv);
fs.writeFileSync('/tmp/tp.jwt', jwt);
fs.writeFileSync('/tmp/tp.pub.pem', pub);"

node packages/js/dist/cli.js inspect "$(cat /tmp/tp.jwt)"
node packages/js/dist/cli.js verify "$(cat /tmp/tp.jwt)" --pubkey /tmp/tp.pub.pem

Playground (StackBlitz)

Run generate/verify/chain in-browser — no install required:

Open in StackBlitz


What it is / What it isn’t

What it is:

What it isn’t:


Verifier CLI

# TypeScript
node packages/js/dist/cli.js inspect "<jwt>"
node packages/js/dist/cli.js verify "<jwt>" --pubkey "<pem|b64|path>"

# Python
cd packages/py && python -m trustproof inspect "<jwt>"
cd packages/py && python -m trustproof verify "<jwt>" --pubkey "<pem|b64|path>"

Test Suite

Suite Tests Status
TrustProof JS SDK 43 ✅ Pass
TrustProof Python SDK 29 ✅ Pass
Total 72 ✅ All Pass

Spec validation (separate from unit tests):

PASS schema: spec/examples/allow.json
PASS schema: spec/examples/deny.json
PASS schema: spec/examples/step_up.json
PASS vector: spec/vectors/v001_allow_basic.json
PASS vector: spec/vectors/v002_deny_basic.json
PASS vector: spec/vectors/v003_stepup_basic.json
PASS vector: spec/vectors/v004_chain_linking.json
PASS vector: spec/vectors/v005_canonicalization_edge.json
PASS vector: spec/vectors/v006_vc_profile.json

Protocol vs Verdicto Enterprise

Scope Includes
Protocol (OSS) Schema, canonicalization rules, hash rules, chain rules, golden vectors, JS/Python SDKs, CLI verify/inspect
Enterprise (Verdicto) Key management at scale, hosted verification, dashboards/logs, policy engine, webhooks, step-up UX, multi-tenant operations, SLA/compliance workflows

Enterprise capabilities map to protocol primitives and are out of scope for the protocol definition.


Repo Layout

├── packages/
│   ├── js/          # @trustproof/sdk (TypeScript — generate/verify/chain + CLI)
│   └── py/          # trustproof (Python — generate/verify/chain + CLI)
├── spec/
│   ├── trustproof.schema.json
│   ├── examples/    # allow.json, deny.json, step_up.json
│   └── vectors/     # v001–v006 golden test vectors
├── integrations/    # LangChain, OpenClaw/NemoClaw, MCP, Autoresearch, OpenAI Agents
├── examples/        # Integration demos, StackBlitz playground
├── docs/            # Spec notes, security, demo runbook, decisions
└── .github/workflows/  # CI for JS, Python, and vector validation

Protocol Artifacts


Documentation


Security & Correctness


Contributing

Issues and PRs welcome. See CONTRIBUTING.md.

Priority areas:


License

Apache-2.0. Part of the Ataraxia Labs open-source ecosystem.


Ataraxia Labs · San Juan, Puerto Rico · verdicto.dev · W3C AI Agent Protocol CG · Docs