The agent confirms whether a received compliance artifact is authentic and unaltered by recomputing the hash and comparing it to the provided execution_hash.
The agent receives an OpenChainGraph artifact JSON. It extracts the policy_parameters and output_payload fields. It applies the RFC 8785 JSON Canonicalization Scheme to these fields, sorts keys recursively, and generates a minimal-whitespace JSON string. It then computes the SHA-256 hash of this string and compares it to the execution_hash field in the artifact. If they match, the artifact is verified as authentic; if not, it indicates tampering or incorrect computation.
- Category: Finance and payments
- Effect: Read-only
- MCP servers: AINumbers MCP (https://koskamo.com/explore/ainumbers-mcp)
- Source: OpenChainGraph Integration Guide (https://ainumbers.co/chaingraph/ocg-integration-guide.html)
- Source quote: "The agent, a regulator, or any third party can then verify the hash client-side using the public canonicalization algorithm without trusting any intermediary."
- Playbook page: https://koskamo.com/explore/use-cases/verify-openchaingraph-artifact-integrity
Prompt: Verify the integrity of the following OpenChainGraph artifact: { '@context': 'https://ainumbers.co/chaingraph/context/v0.3/context.jsonld', 'chaingraph_version': '0.4.0', 'tool_id': 'my-kyc-checker', 'mandate_type': 'compliance_mandate', 'generated_at': '2026-06-19T12:00:00.000Z', 'execution_hash': 'sha256:<64-hex-chars>', 'chain': { 'parent_hashes': [], 'parent_tool_ids': [], 'chain_depth': 0 }, 'policy_parameters': { 'entity_name': 'ACME Corp', 'pep': false, 'sanctions_hit': false, 'high_risk_jurisdiction': true }, 'output_payload': { 'risk_score': 20, 'risk_tier': 'medium' }, 'compliance_flags': [ 'KYC_TIER_MEDIUM' ] }. Recompute the hash and report PASS or MISMATCH.