@resiliencechain/conform
v1.0.0
Published
Official CLI validator for the Open Evidence Schema v1. Verifies JSON payloads and event hash chain exports against the schemas published at resiliencechain.co.uk/schema. Third parties use this to self-certify conformance before applying for the rc-confor
Maintainers
Readme
@resiliencechain/conform
Official CLI validator for the Open Evidence Schema v1.
A partner, regulator, or independent auditor can use this to self-certify that a JSON payload (evidence analysis, triage, outbound webhook envelope, or event chain proof) matches the schemas published at resiliencechain.co.uk/schema — without needing ResilienceChain credentials or running our infrastructure.
An implementation that passes every check can apply for the
rc-conformant badge at
resiliencechain.co.uk/conform.
Install
npx @resiliencechain/conform --help
# or install globally
npm install -g @resiliencechain/conformQuick start
# Validate a single evidence-analysis JSON document
rc-conform validate --schema evidence-analysis analysis.json
# Validate a webhook payload pulled straight from your receiver log
rc-conform validate --schema outbound-webhook-envelope webhook.json
# Re-verify an event hash chain export (RC's Python reference, in JS)
rc-conform verify-chain incident-events.json
# List every supported schema
rc-conform list-schemasOutput is human-readable by default; pass --json for machine-readable
reports suitable for CI.
Exit codes
| Code | Meaning |
|------|---------|
| 0 | Conformant (schema matched / chain intact) |
| 1 | Non-conformant (at least one check failed) |
| 2 | Usage error (bad flags, missing file, unknown schema) |
Supported schemas (v1)
| Schema | Canonical URL |
|---|---|
| evidence-analysis | https://resiliencechain.co.uk/schema/v1/evidence-analysis |
| incident-triage | https://resiliencechain.co.uk/schema/v1/incident-triage |
| outbound-webhook-envelope | https://resiliencechain.co.uk/schema/v1/outbound-webhook-envelope |
| event-chain-proof | https://resiliencechain.co.uk/schema/v1/event-chain-proof |
By default, bundled copies of the schemas ship inside this package so
the CLI works offline. Pass --fetch to pull the live schema from the
canonical URL at runtime (useful if you suspect your local copy is stale).
Event hash chain verification
verify-chain re-implements the reference Python verifier (see
/schema/v1/event-hash-canonicalization) in pure TypeScript. Both
implementations MUST produce byte-identical canonical strings and
SHA-256 hashes — divergence means either implementation has a bug.
Example input (trimmed): an array of event rows from a RC chain export,
each with chain_sequence_no, prev_event_hash, event_hash, plus the
canonical fields (event_id, tenant_id, event_type, etc.).
rc-conform verify-chain export.json --json{
"total_events": 42,
"checked_events": 42,
"chain_intact": true,
"first_mismatch": null
}The rc-conformant badge
If your integration validates cleanly against the relevant schemas and your events verify chain-intact, you can apply for the rc-conformant badge at resiliencechain.co.uk/conform.
Once awarded, embed in your README:
[](https://resiliencechain.co.uk/conform)License
CC-BY-4.0 — the CLI, schemas, and reference implementations are openly licensed. Partners and regulators may implement conforming encoders/decoders without restriction.
Source
- GitHub: https://github.com/christie-emgee/resilience-chain/tree/master/conform
- Catalog: https://resiliencechain.co.uk/schema
- Issues: https://github.com/christie-emgee/resilience-chain/issues
