Skip to content
Documentation

Verify a decision

Every recommendation Bayeto produces can be reduced to a hash, and every decision record can be signed. This page is how you check one without asking us anything.

The chain

  1. A decision is canonicalized — serialized with object keys in a fixed order, so two byte-different JSON documents describing the same decision produce the same bytes.
  2. Those bytes are prefixed with a domain separator and hashed with SHA-256. A decision uses bayeto:decision:v3; an implementation packet uses bayeto:packet:v1. The domain is part of what is hashed, so a packet hash can never be replayed as a decision hash.
  3. The decision record collects those hashes with the inputs they were computed over — the ledger version, the window, the objective — and the whole record is signed with an Ed25519 key.

The version is in the domain string on purpose. When the hashed shape changes, the domain changes with it, so an old receipt does not silently verify under new rules — it fails, loudly, which is the correct outcome.

Checking a receipt

The verifier is a single Node file with no dependencies — not even ours. It imports nothing from Bayeto: no shared canonicalizer, no helper, no network call. That is deliberate, because a verifier that reused our code would only prove our code agrees with itself.

curl -O https://bayeto.ai/verify-receipt.mjs
curl -O https://bayeto.ai/.well-known/bayeto-jwks.json

node verify-receipt.mjs receipt.jws bayeto-jwks.json
# exit 0 = verified, exit 1 = not verified

Read the verifier before you run it — that is the point of it being short. It is a byte-identical copy of the file our own CI runs.

Pin the key out of band

The verifier takes the key set as a local file, and will not fetch it for you. Fetching the key at verification time would not be independent verification: it would be asking the party under audit whether its own signature is good, and an issuer who was compromised — or merely careless — could serve a key that validates anything.

So download the key set once, keep your copy, and verify against that copy from then on. If a receipt stops verifying against a key you pinned, that is information, and you should have it.

What a verified receipt does and does not prove

It proves that this decision, with these inputs, was produced by Bayeto and has not been altered since. It does not prove the recommendation was good, that the saving materialised, or that the underlying telemetry was complete — those are separate claims, and the product measures them separately.

Determinism is what makes the hash worth anything: the same telemetry, graph and objective produce the same decision every time, so an independent party can re-run the engine and get the same hash rather than taking ours on trust.

© 2026 Bayeto