Spoolis docs
How verification works
Spoolis turns an agreed criterion and its evidence into a recorded result, then applies the agreement's economic rule. It does not always establish the underlying real-world truth itself.
Start with the transaction boundary
Spoolis is for transactions where payment depends on whether the agreed outcome actually happened.
For an integration, each check follows the same path:
criterion -> evidence -> verifier -> result -> economic rule- Criterion: define the condition before verification.
- Evidence: supply the artifact or confirmation the criterion requires.
- Verifier: route the evidence to an available execution method.
- Result: record what the verifier returned, then apply the agreed rule to determine earned value.
Spoolis determines earned value and signs the Outcome Receipt. A wallet, marketplace, payment system, or configured integration may verify and consume it, then act under its own authorization and settlement policy. Spoolis does not hold funds.
Who runs the check?
Outcome Receipt condition results support four execution methods. Two are live today. Schema acceptance of a method value does not mean an executor is live.
deterministic · LiveFixed code and inputs produce a fixed evaluation. The result proves what that code found in those inputs. It does not prove that the supplied evidence reflects real-world truth.
human_confirmed · LiveAn authorized person confirms the criterion. Spoolis records the confirmation and applies the agreed economic rule. The receipt proves what was recorded, not that Spoolis independently inspected the underlying event or item.
external_tool · Reserved, not liveThis receipt value is reserved for a named external system, such as CI, a carrier API, or a registry. No planner path or executor emits it today.
ai_assisted · Planned, not liveThis method is planned for a grounded model evaluating specified evidence. It is not enabled. The current executor returns an uncertain verdict instead of an AI-assisted result.
If Spoolis cannot support a criterion with an available verification method, it does not invent a verdict.
Method and provenance are separate facts
The method says who or what resolved a condition. Evidence provenance records where an evidence item came from, how it was captured, its artifact reference, when it was observed, and which verifier used it. Provenance is origin and capture metadata, not a trust score. When provenance is missing, the origin is unknown.
Required fields are present
result: pass
method: deterministic
evidence provenance: uploaded JSONSpoolis does not assign universal assurance labels. A deterministic check over manually entered input and a human confirmation after physical inspection make different claims. The receipt exposes the raw facts so your integration can apply its own policy.
Deterministic verifier registry
The live deterministic registry includes checks for structured data, URLs, text, files, hashes, and timestamps. Fixed code and inputs produce a fixed evaluation. Durable evidence can support later reproduction, while a network response is a time-bound observation even when the checking code is fixed. Examples include:
json.path.equalscompares a dot or bracket path in a structured evidence payload.http.statuschecks one public HTTP or HTTPS URL with SSRF protection and a bounded timeout.text.containschecks whether delivered text contains an agreed non-empty string.hash.matchescomputes SHA-256 over delivered file bytes and compares the agreed digest.deadline.metcompares the evidence record timestamp with the agreed ISO deadline, never the evaluation clock.
Missing or unreadable input does not pass. Each verifier returns an explicit reason when a check fails.
Verify the receipt, then apply your policy
In the canonical example, Spoolis verifies 100 enrichment records at $1.00 per accepted record, accepts 98, rejects 2 with reasons, and signs a receipt for $98.00 earned. Install the public npm verifier and verify that Outcome Receipt with a pinned trust set.
import { verifyOutcomeReceipt } from '@spoolis/receipt-verifier'
const verification = await verifyOutcomeReceipt(receipt, { trustSet })
if (!verification.valid) throw new Error(verification.reasons.join(', '))
console.log(receipt.amounts.earned)Offline signature verification is sufficient and requires no Spoolis account or API call. You may optionally call GET /api/receipts/{id}/status before the payment stack acts on the $98.00 earned amount under its own authorization policy.
A valid Ed25519 signature proves the receipt is genuine and unaltered. It does not prove that every underlying check can be reproduced forever, that supplied evidence reflects real-world truth, or that payment was authorized or settled. Deterministic checks over durable evidence can be reproducible. A live URL, external API result, or human confirmation may not be.
Read verify a receipt for package and trust-set details. Read when Spoolis decides and when you decide for the responsibility boundary.
Planner modes are a different vocabulary
The planner classifies what a criterion requires as deterministic, ai_assisted, or human_required. These planner modes are not receipt execution methods. There is no external_tool planner mode.
Lower-level attestation verification
The signed attestation is the lower-level verdict underneath the Outcome Receipt. Integrations should normally start with the portable receipt. If you need to verify an attestation directly, select the trust set matching its environment, validate its key ID, digests, expiry, amounts, parties, and authority, then verify the canonical payload with Ed25519. A demo attestation has no production settlement authority.
const { signature, signingKeyId, ...payload } = attestation
const bytes = Buffer.from(canonicalSerialize(payload))
const valid = crypto.verify(
null, bytes, publicKey, Buffer.from(signature, "base64")
)