Safe utilities for consuming and verifying InterAI decision evidence without overstating what a receipt proves.
Decision Receipts helps a host distinguish a public receipt reference from owner-authenticated signed evidence, bind that evidence to an expected execution intent, and call InterAI's documented service-verification boundary without reserializing the signed payload.
import {
assertReceiptIntentDigest,
verifyReceiptWithService,
} from "./index.mjs";
assertReceiptIntentDigest(ownerLookup, expectedExecutionIntentDigest);
await verifyReceiptWithService({ lookup: ownerLookup });The helper enforces several important rules:
- an anonymous
public_summaryis a reference only and is never accepted as authorization evidence; - owner-authenticated lookup data must contain complete service-verifiable evidence;
verification.signed_payloadis treated as opaque and forwarded unchanged;- the expected
execution_intent_digestmust match exactly when asserted; - transport, HTTP, parse and invalid-signature outcomes fail closed.
Current InterAI receipt signatures use HMAC-SHA256 and are service-verifiable by InterAI. This repository does not provide or claim independent offline public-key verification.
A durable decision receipt is useful only if consumers preserve its trust boundary. A public lookup link, a receipt ID, or a human-readable summary must not silently become permission to execute.
receipt reference
|
+--> public summary -----------------> reference only
|
+--> owner-authenticated evidence
|
v
exact intent match
|
v
InterAI service verification
|
valid? ----+---- no ---> fail closed
|
yes
v
consumer continues
requireOwnerSignedEvidence(lookup)— rejects incomplete or public-summary-only evidence.assertReceiptIntentDigest(lookup, expectedDigest)— checks exact execution-intent binding.verifyReceiptWithService(options)— callsPOST /trust/verify-signatureand fails closed on verification uncertainty.ReceiptVerificationError— typed error with a machine-readablecode.
verifyReceiptWithService defaults to https://api.interailabs.dev and a 5000 ms timeout.
This repository is not a receipt issuer, signing implementation, key-management system, authorization engine or proof that a side effect occurred.
A DecisionReceipt is evidence of a decision. It is not itself proof that the action executed, and it is not a substitute for domain-specific controls.
Requires Node.js 20 or newer.
npm testNo runtime dependencies are required.
This repository is an open-source evidence-consumption tool from InterAI Labs. InterAI Risk Oracle is the related hosted pre-execution decision service.
This repository consumes documented public receipt fields and endpoints only. It contains no signing keys, private signing implementation, account data, Risk Oracle policy/scoring logic, trust intelligence, billing/storage internals or production operations.
Hosted Risk Oracle API: https://api.interailabs.dev
Apache-2.0. See LICENSE and NOTICE.