Skip to main content

What is an attestation?

An attestation is the signed record of an authority verification outcome. It is the output of executeFromSignals and contains everything needed to independently verify the decision - by any party, at any time, without access to your infrastructure.

Attestation structure

{
  "executionId":           "88a9db95-5f31-4f0d-84de-28a3ec9e3c83",
  "execution_fingerprint": "43258cff783fe703...",
  "policyId":              "loan-approval",
  "policyVersion":         "1.0.0",
  "schemaVersion":         "1.0.0",
  "runtimeVersion":        "1.0.0",
  "runtimeHash":           "4ece56164e1a8809...",
  "signalsHash":           "43258cff783fe703...",
  "decision": {
    "action":            "approve",
    "requires_override": false,
    "reason":            "Credit score meets standard threshold."
  },
  "execution_state": "completed",
  "signature":       "TU6LMv5NJJm1KvM2..."
}

Field reference

FieldTypeDescription
executionIdUUIDUnique identifier for this specific execution event
execution_fingerprintSHA-256 hexsha256(canonicalize({ policyId, policyVersion, signals })) - the replay protection key
policyIdstringWhich policy governed this decision
policyVersionsemverWhich version of the policy
schemaVersionsemverSchema version used for evaluation
runtimeVersionsemverRuntime version that produced this attestation
runtimeHashSHA-256 hexHash of the runtime itself - pins the exact code
signalsHashSHA-256 hexHash of the input signals
decision.actionstringThe governance outcome
decision.requires_overridebooleanWhether human override is required before execution
decision.reasonstringHuman-readable explanation of the decision
execution_statestring"completed" or "pending_override"
signaturebase64Ed25519 signature over the canonical payload

executionId vs execution_fingerprint

These are semantically distinct:
FieldWhat it identifiesHow it’s generated
executionIdThis specific execution eventcrypto.randomUUID() - random
execution_fingerprintThe content of the execution inputssha256(canonicalize({ policyId, policyVersion, signals })) - deterministic
The execution_fingerprint is the replay protection key - same signals always produce the same fingerprint, and the second submission is rejected. The executionId is unique per event even if signals differ.

Verifying an attestation

import { verifyAttestation, LocalVerifier } from "@parmanasystems/core";

const verifier = new LocalVerifier(publicKey);
const result   = verifyAttestation(attestation, verifier);

console.log(result.valid);   // true if all checks pass
console.log(result.checks);
// {
//   signature_verified: true,
//   runtime_verified:   true,
//   schema_compatible:  true,
//   governed:           true,
// }

Storing attestations

Attestations are plain JSON - store them in any database. They remain verifiable forever as long as you keep the public key.
// Store
import fs from "fs";
fs.writeFileSync("attestation.json", JSON.stringify(attestation, null, 2));

// Retrieve and verify later
const stored = JSON.parse(fs.readFileSync("attestation.json", "utf8"));
const result = verifyAttestation(stored, verifier);
For structured PostgreSQL-backed storage with querying support, use @parmanasystems/audit-db.

Decisions that require override

When decision.requires_override is true, the execution_state is "pending_override" and a human approver must explicitly sign off before execution proceeds.
import { approveOverride } from "@parmanasystems/core";

const override = await approveOverride({
  execution_fingerprint:
    attestation.execution_fingerprint,
  approved_by:   "user@example.com",
  approver_role: "risk-manager",
  reason:        "Manually reviewed and approved based on supporting documentation.",
});

Use Cases

Regulatory proof-of-decision for loan rejections

When a borrower disputes a loan rejection under the RBI Fair Practices Code, the NBFC retrieves the stored attestation and shares it with the regulator. The recipient runs verifyAttestation with the NBFC’s public key � without any database access � and independently confirms which policy version evaluated which signals and that the decision has not been modified since signing. The bundleHash in the attestation pins the exact policy artifact.

Audit trail for insurance claims (IRDAI)

An insurer stores every claim attestation in @parmanasystems/audit-db. During an IRDAI inspection, the audit team queries all reject decisions for claims above ?5 lakh. The bundleHash in each attestation proves the exact policy rules that governed each decision � the insurer cannot retroactively claim a different rule applied.

Multi-party verification in MSME co-lending

A fintech co-lends with a bank. Both parties need to verify that credit decisions were made using the agreed policy. The fintech shares attestations; the bank verifies them independently using the shared public key � no API call to the fintech’s infrastructure required.

See also