Draft for consultation · CTRES v1.0, universal edition · Independent open standard · Open for review by every authority

validator-lite · Apache License 2.0

Check a package before you submit it

validator-lite is the open validator for CTRES packages. It checks that a package is well formed and that it holds together — the Structural and Referential classes of validation defined in §11.

Scope · §11

Validation is defined by class, not by rule

validator-lite implements the two classes that depend only on the package itself and the published JSON Schema for records R1–R12 and the manifest.

What it checks

  • StructuralIs the package well formed?Required fields present; types and enumerations valid; manifest hashes match the files
  • ReferentialDoes the package hold together?Every payment references an instrument in R2 and a provider in R10; every check reference resolves; each transfer is booked once; statement totals agree with the records behind them

A package that passes both classes meets the validation requirement of Level 2 in §10. That is not a claim of conformance: “CTRES Conformant” describes an implementation tested against a named conformance suite version (§13).

What it does not check

  • Profile conformanceDoes the evidence show the control operated under this jurisdiction’s rules?
  • CompletenessIs anything missing that should be there?
  • Reconciliation against independent sourcesBank and provider statements, the chain for virtual assets, or an authority’s own central system.

These depend on the jurisdiction profile and on rules each authority sets: the catalogue of individual checks, their severities, the tolerances that separate a rounding difference from a discrepancy, and the materiality thresholds that make an exception reportable. They are maintained separately as a versioned conformance suite.

Get started

Install, run, automate

validator-lite is a Python package. Install a tagged release directly from the repository and point it at a package directory.

1 Install

Install a tagged release
pip install "git+https://github.com/ctres-standard/[email protected]"

2 Validate a package

Readable list of findings
ctres-validate <package_dir>

3 Automate

The same findings as JSON, for pipelines
ctres-validate <package_dir> --json

What a package is

A directory holding one JSON Lines file per record type and a manifest.json with a SHA-256 hash per file (§8.2).

Package layout
<package_dir>/
├── manifest.json
│     licence · profile and version
│     period · record counts
│     SHA-256 per file
└── one .jsonl file per record type
      UTF-8 · one record per line

Demonstration package

The repository includes a synthetic demonstration package. Its values are illustrative, like the examples in Annex C, and are not drawn from any operator. Run the validator on it to see the output before preparing your own package; the repository README gives its location.

Conformance suite

Request access to the conformance suite

The Profile conformance and Completeness classes are tested against a named suite version and a named profile version, so that the result can be reproduced later.

  • For authorities: available for evaluation.
  • For operators: available for self-checking before submission.
  • Never a condition: an implementation validated by any other means is equally conformant.

Tell us who you are and what you intend to test. Requests are answered by the editor. You can also write to [email protected].

Fields marked with an asterisk are required.

Your message is sent by email to [email protected] and is used only to reply to you.