- Institutional / JVMTM / reserve-provenance / GRU transport + standards JSON - Validation and verify scripts (Blockscout labels, x402, GRU preflight, P1 local path) - Wormhole wiring in AGENTS, MCP_SETUP, MASTER_INDEX, 04-configuration README - Meta docs, integration gaps, live verification log, architecture updates - CI validate-config workflow updates Operator/LAN items, submodule working trees, and public token-aggregation edge routes remain follow-up (see TODOS_CONSOLIDATED P1). Made-with: Cursor
52 lines
2.5 KiB
Bash
Executable File
52 lines
2.5 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Validate JVMTM / regulatory closure example JSON against local schemas (draft 2020-12).
|
|
# Uses check-jsonschema when available; SCHEMA_STRICT=1 fails if missing.
|
|
set -euo pipefail
|
|
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
BASE="$ROOT/config/jvmtm-regulatory-closure"
|
|
SCHEMA="$BASE/schemas"
|
|
EX="$BASE/examples"
|
|
|
|
HAVE_CHECK_JSONSCHEMA=1
|
|
|
|
if ! command -v check-jsonschema &>/dev/null; then
|
|
HAVE_CHECK_JSONSCHEMA=0
|
|
if [[ "${SCHEMA_STRICT:-0}" == "1" ]]; then
|
|
echo "error: check-jsonschema not found; pip install check-jsonschema" >&2
|
|
exit 1
|
|
fi
|
|
echo "skip: check-jsonschema not installed (pip install check-jsonschema)"
|
|
fi
|
|
|
|
validate_pair() {
|
|
local schema_file="$1" example_file="$2"
|
|
check-jsonschema --schemafile "$schema_file" "$example_file"
|
|
}
|
|
|
|
if [[ "$HAVE_CHECK_JSONSCHEMA" == "1" ]]; then
|
|
validate_pair "$SCHEMA/daily-3way-reconciliation-report.schema.json" "$EX/daily-3way-reconciliation-report.example.json"
|
|
validate_pair "$SCHEMA/three-way-reconciliation-result.schema.json" "$EX/three-way-reconciliation-result.example.json"
|
|
validate_pair "$SCHEMA/prefunding-proof.schema.json" "$EX/prefunding-proof.example.json"
|
|
validate_pair "$SCHEMA/pre-settlement-ack.schema.json" "$EX/pre-settlement-ack.example.json"
|
|
validate_pair "$SCHEMA/sample-exception-event.schema.json" "$EX/sample-exception-event.example.json"
|
|
validate_pair "$SCHEMA/kyt-screening-result.schema.json" "$EX/kyt-screening-result.example.json"
|
|
validate_pair "$SCHEMA/recovery-time-report.schema.json" "$EX/recovery-time-report.example.json"
|
|
validate_pair "$SCHEMA/dr-simulation-report.schema.json" "$EX/dr-simulation-report.example.json"
|
|
validate_pair "$SCHEMA/real-time-balance-snapshot.schema.json" "$EX/real-time-balance-snapshot.example.json"
|
|
validate_pair "$SCHEMA/transaction-compliance-execution.schema.json" "$EX/transaction-compliance-execution.example.json"
|
|
validate_pair "$SCHEMA/transaction-compliance-execution.schema.json" "$EX/transaction-compliance-execution.blocked.example.json"
|
|
fi
|
|
|
|
if ! command -v python3 &>/dev/null; then
|
|
echo "error: python3 not found; required for JVMTM transaction-grade pack validation" >&2
|
|
exit 1
|
|
fi
|
|
|
|
python3 "$ROOT/scripts/validation/validate-jvmtm-transaction-compliance-pack.py"
|
|
|
|
if [[ "$HAVE_CHECK_JSONSCHEMA" == "1" ]]; then
|
|
echo "OK jvmtm-regulatory-closure schema validation (11 example/schema pairs + transaction-grade pack checks)"
|
|
else
|
|
echo "OK jvmtm-regulatory-closure transaction-grade pack validation (schema checks skipped: check-jsonschema not installed)"
|
|
fi
|