Guides
Read a record
One record field by field, and two of its digests recomputed.
Every intent the engine judges leaves a record. This guide reads one and recomputes two of its digests, with nothing but Node.
The record
This is the record /demo writes for Pay Maya under the default policy:
{
"pdr": "1",
"id": "pdr_0001",
"created_at": "2026-11-28T12:00:00.000Z",
"source": "demo",
"wallet": "BwFYBcxEDrybw5YNB92ra3GFj6RVRsdhBofKmf6skkBn",
"tis": {
"tis": "1",
"action": "transfer",
"params": {
"asset": "SOL",
"to": "CvaC1sSWgsG9UZT3fU8R2TRhrFcpxa1d2mR6pU3mTdgv",
"amount": "0.5"
},
"reason": "User asked to pay Maya 0.5 SOL for design work."
},
"tis_digest": "ffabb16b1b92d9f5ce521536c52cb893370290896c830c7b76cb7e601ef8deac",
"message_digest": "2d01885fc2d24ee8b6b3fd257ded5e94b50fa8b7136b7e21a4404db88c6c0c83",
"policy_version": 1,
"policy_digest": "c958b5c7f8fd5818451f8abcc30a0f2494302e935ce5e1a1bcde9ddea57b2293",
"programs": [
"11111111111111111111111111111111",
"ComputeBudget111111111111111111111111111111"
],
"outflow": {
"source": "decoded",
"lamports": "500000000",
"tokens": [],
"unknown": []
},
"approvals": [],
"checks": [
{
"rule": "schema",
"result": "pass",
"detail": "valid TIS v1, compiled to 3 instructions"
},
{
"rule": "paused",
"result": "pass",
"detail": "wallet is active"
},
{
"rule": "program_allowlist",
"result": "pass",
"detail": "System allowed; ComputeBudget always permitted"
},
{
"rule": "daily_spend",
"result": "pass",
"detail": "0 + 0.5 of 2 SOL in 24h"
},
{
"rule": "token_limits",
"result": "n/a",
"detail": "moves no tokens"
},
{
"rule": "no_unlimited_approval",
"result": "n/a",
"detail": "grants no approval"
}
],
"decision": "allow"
}tis is the intent as the agent wrote it. programs and outflow are what the engine read from the compiled transaction: the System program and ComputeBudget, and 0.5 SOL leaving the wallet. outflow.source is decoded because the demo has no chain to simulate against; a record the API writes says simulation.
Read the checks
The checks are in the order the engine ran them. A record is deny if any is fail:
| Rule | Result | Detail |
|---|---|---|
schema | pass | valid TIS v1, compiled to 3 instructions |
paused | pass | wallet is active |
program_allowlist | pass | System allowed; ComputeBudget always permitted |
daily_spend | pass | 0 + 0.5 of 2 SOL in 24h |
token_limits | n/a | moves no tokens |
no_unlimited_approval | n/a | grants no approval |
| decision | allow |
The rules says what each rule read.
Recompute the digests
tis_digest is the SHA-256 of tis as canonical JSON, and policy_digest the same over the policy the record cites. Save the record as record.json, the default policy as policy.json, and digest.mjs beside this script:
// Recomputes a record's intent and policy digests: node check-record.mjs record.json policy.json
// record.json is a PDR; policy.json is the policy it cites (its five fields).
import fs from "node:fs";
import { jsonDigest } from "./digest.mjs";
const [recordFile, policyFile] = process.argv.slice(2);
const pdr = JSON.parse(fs.readFileSync(recordFile, "utf8"));
const policy = JSON.parse(fs.readFileSync(policyFile, "utf8"));
const results = [
["tis_digest", jsonDigest(pdr.tis) === pdr.tis_digest],
["policy_digest", jsonDigest(policy) === pdr.policy_digest],
];
for (const [name, ok] of results) console.log(`${ok ? "match" : "DIFFERENT"} ${name}`);
process.exitCode = results.every(([, ok]) => ok) ? 0 : 1;node check-record.mjs record.json policy.jsonmatch tis_digest
match policy_digestChange one character of the intent or one field of the policy and the line turns to DIFFERENT.
message_digest is the SHA-256 of the compiled message's bytes. When the signer signs a record, it signs those bytes unchanged, so the message in the sent transaction hashes to the same value.