Truvian Shield Docs

The desks

The Case Desk.

The Case Desk decides an insurance claim, a security alert or a customer dispute on evidence: Tencent Hunyuan plans which facts the case turns on, Truvian buys each one from Telegraph's ranked miners, fixed rules check what the case asserts, and Hunyuan writes the resolution into a signed memo. It answers Tencent's use cases #31 (insurance claims and investigation), #33 (enterprise security operations) and #30 (enterprise customer resolution), and has been live at /case since 3 Dec 2026.

How to use it

Open /case, press one of the twelve Try one examples (or paste your own case), and press Investigate. A case takes 20 to 90 seconds. Agents call POST /api/case with a JSON body; the reply is the signed memo.

FieldWhat it isLimits
typeinsurance, security or customerrequired; anything else is a 400
documentthe case as submitted: what is claimed or alerted, the identifiers to check (transaction hash, CVE id, file hash, domain), and the policy or runbook it is decided under60 to 6,000 characters after trimming
titlea short name for the caseoptional, cut to 120 characters; when missing, the first line of document, cut to 80
curl -s https://truvian.xyz/api/case \
  -H 'content-type: application/json' \
  -d '{"type":"security","title":"Scanner pages on-call","document":"<the alert, the identifiers, and the runbook>"}'
StatusWhen
200the stored memo, with id, sha256, signature, signer, url (/api/work/<id>) and booked (the ledger entry); a paid run also carries payment
400 INVALID_INPUTwrong type, or a document under 60 or over 6,000 characters
402the free allowance is used: the body quotes the price and how to pay (see below)
429 RATE_LIMITEDover a free cap while payments are off, with retryAfterSec
503 AGENT_MODEL_UNAVAILABLEno agent model is configured, or it failed while planning; nothing was bought

What it can decide

Each case type has three resolutions. The model must pick one of them; any other answer is recorded as NO_RESOLUTION. The meanings below are given to the model with every case (RESOLUTION_MEANING) and stored in the memo's meaning.

TypeResolutionMeaning
insurance
Tencent #31
PAYthe trigger is met and evidenced and no exclusion applies
DENYthe policy terms or the established facts rule the claim out (an exclusion applies, the trigger event did not happen, or the policy says such a loss is denied)
REFERa fact the policy needs is missing and could still be supplied, so the claim can be neither paid nor denied yet
security
Tencent #33
GENUINEevery runbook condition for an incident holds
FALSE_ALARMthe runbook says it is not an incident (score below threshold, asset not affected, indicator clean)
INCOMPLETEa condition the runbook needs is not established
customer
Tencent #30
OWEDthe policy entitles the customer to a refund, credit or reinstatement
NOT_OWEDthe established facts show the policy gives the customer nothing
NEEDS_EVIDENCEthe dispute cannot be decided until a missing fact is supplied

The resolving rules tell the model to apply the policy or runbook strictly: a fact the policy needs that is not established means evidence is missing, not that it is true. What the case records as the organisation's own verified records (its ledger, asset inventory, the insured's application) counts as established; outside facts (transactions, CVE records, public events, threat ratings) count only when bought.

How a case runs

  1. Plan (Hunyuan). The model reads the case and picks at most 3 questions from a fixed menu of Telegraph intents, each with the checks: what the case asserts about a field of the answer (eq, neq, gte or lte). Questions off the menu, with malformed parameters, or repeated are dropped and listed in plan.dropped; if every question was dropped, the model is asked once more.
  2. Buy (Telegraph). Each question is one paid ask, routed by the node to its ranked miner and paid from Shield's escrow. Two asks run at a time. Every fact records the miner, its rank, the cost, the latency, the payment receipt and a public signal link. An answer from a miner on Truvian's do-not-ask list is discarded.
  3. Check (fixed rules). runCheck compares each assertion with the bought field: numbers as numbers, booleans as booleans, text and addresses without regard to case. The result is holds, contradicted or unverified; a failed ask or an answer such as Unverified or Mixed confirms nothing.
  4. Follow up (Hunyuan and Telegraph). When a fact failed, came back inconclusive or carried none of the intent's comparable fields, the model may ask at most 2 more questions another way. It never repeats one already asked.
  5. Resolve (Hunyuan). The model writes the resolution, its reasons, the discrepancies and the evidence still needed, from the case, the bought facts (failures named as failures) and the check results.

The menu, with parameters and fields as the node publishes them (GET /engine/v1/intents/<FAMILY>, read 30 Nov 2026):

IntentAsks aboutFields a check may compare
ONCHAIN_TX_LOOKUP_GENERALone transaction by hash, on ethereum or basestatus, from, to, block_number, value_eth
CVE_LOOKUP_CVSSa CVE (Common Vulnerabilities and Exposures) record and its CVSS (Common Vulnerability Scoring System) scorecvss_score, severity, published
MALWARE_DETECTION_HASHthreat feeds and engines on a file hash, domain or IP addressthreat_level, match_count
THREAT_INTELLIGENCE_INDICATORan IP address, domain, hash, CVE or actormalicious, pulse_count
FACT_CHECK_GENERALone factual claim about a public eventverdict
NEWS_SEARCH_GENERALnews on a topic, entity or eventnone: read as evidence, never compared
SANCTIONS_SCREENING_MATCH_GENERALa person or entity name against sanctions listsmatched
SSL_VERIFICATION_CERTthe TLS certificate a host servesvalid, category

Cost, limits and payment

Questions per case
3 in the plan (MAX_ASKS_PER_CASE), at most 2 follow-ups (MAX_FOLLOW_UPS)
Telegraph budget per case
$0.10 (CASE_DESK_BUDGET_USD); once spent, further questions are recorded as not asked
Price of one Telegraph answer
about $0.01 in test USDC from Shield's escrow on Ethereum Sepolia
Agent model
tencent/hy4 through OpenRouter, every request pinned to the Tencent provider with no fallback, reasoning off; 90 s timeout per call (AGENT_LLM_TIMEOUT_MS)
Model cost in the memo
OpenRouter's list price for tencent/hy4, read 30 Nov 2026: $0.417 per million prompt tokens, $1.2505 per million completion tokens
Free runs
5 a day per IP address, at most 3 a minute, shared with every other desk (SHIELD_FREE_CHECKS_PER_IP, SHIELD_BURST_PER_MIN); site-wide caps of 300 runs and $5 of Telegraph spend a day
Past the free runs
$0.05 a run (SHIELD_PRICE_USD) in USDC on Base Sepolia over x402 (the HTTP 402 payment protocol)

Paying. Past the free allowance, POST /api/case answers 402 with the payment requirements. On the page, pay.js shows a payment sheet; the visitor's browser wallet signs a gasless USDC authorization (EIP-3009) and the same request is sent again with an X-PAYMENT header. Shield checks the payment first and settles it only after the case has run; the settlement comes back in the X-PAYMENT-RESPONSE header and the memo's payment field, and the remaining free runs in X-Shield-Checks-Left. Every run is booked in the ledger at what was paid for it: /api/business.

The memo and its permalink

The memo is truvian-work-memo/1 of kind case-investigation. It carries the case text, the resolution and its meaning, the reasons, the discrepancies, the evidence still needed, the plan and the follow-up plan with anything dropped, every bought fact with its checks, the check counts, the model that served it with its tokens, the Telegraph and model cost, and the time taken. It is hashed (sha256) and signed (EIP-191) by 0x956aECB0b0DEfC2f2631C26ec0FF7366Ebb53245.

Open a case on the page
/case?c=<id> (the page switches to it after a run)
The stored memo
GET /api/work/<id>
Latest cases
/api/works?kind=case-investigation (up to 50)
Check a signature
POST /api/memo/verify with {memo, signature}; the page's Verify signature button first checks it in your browser (/verify-memo.js), then asks this route for a second opinion

How it is built

runCaseDesk in src/shield/commerce/caseDesk.ts runs the five steps; normalizeCaseDeskRequest reads the input. The menu, the prompts, readPlan, runCheck, inconclusive, readResolution and the cost are in caseInvestigator.ts, the same rules that were measured on the example cases. The model call is chat in src/shield/commerce/llm.ts, configured by HUNYUAN_API_KEY, HUNYUAN_BASE_URL and HUNYUAN_MODEL. The route is in src/shield/commerceRoutes.ts; the memo is signed and stored by createCommerceService (src/shield/commerce/service.ts). The page is src/shield/public/case.html and case.js, with its examples in case-examples.json.

Offline tests (13)
npx tsx src/scripts/test-case-investigator.ts
Run example cases through the desk's code
npx tsx src/scripts/case-desk-try.ts IC-3 SO-3 (buys real answers; needs the model and Telegraph keys in .env)
The measured investigator
cases/README.md, src/scripts/case-investigator.ts

The example cases

Twelve cases, four per type, each designed to end in a different resolution. The insurer, merchants, policies and runbooks are invented and each document says so in its first line; the facts they turn on are real and checkable without Telegraph: Ethereum transactions of 30 Nov 2026, the Cetus exploit of 22 May 2025, NVD (National Vulnerability Database) records and the WannaCry hash.

TypeCases and designed resolution
insuranceIC-1 Cetus exploit loss, PAY · IC-2 a Kraken hack that never happened, DENY · IC-3 the "theft" went to the insured's own address, DENY · IC-4 real event, no position evidence, REFER
securitySO-1 exploit attempt on Apache Camel, GENUINE · SO-2 a "critical" SSH CVE that is 5.9, FALSE_ALARM · SO-3 WannaCry flagged by endpoint detection and response (EDR), GENUINE · SO-4 software bill of materials (SBOM) finding with no package version, INCOMPLETE
customerCR-1 invoice paid twice, OWED · CR-2 suspension for an underpayment the chain does not show, OWED · CR-3 payment sent to another address, NOT_OWED · CR-4 payment proof that does not exist onchain, NEEDS_EVIDENCE

Measured on 30 Nov 2026 (run 3, before the desk went live): 9 of 12 right with Telegraph's facts, 4 of 12 for Hunyuan alone, $0.0285 per correctly resolved case and about 74 s per case. Telegraph turned five wrong resolutions right and none right ones wrong. Details and receipts: cases/README.md.

Real cases, 3 Dec 2026

Every stored case, from /api/works?kind=case-investigation, read 3 Dec 2026. All three ran on the free allowance, all on tencent/hy4 served by Tencent.

MemoCaseResolutionFactsTelegraph / modelTime
dTLRmqXq
14:03 UTC
Exchange custody cover: a hack that never happened (IC-2)DENY4: a fact-check came back Unverified, so two follow-ups were bought; no confirmed breach, and the policy denies a loss with no confirmed breach$0.04 / $0.002369 s
5pDrtMqP
14:09 UTC
Wallet theft cover: the "theft" went to the insured's own address (IC-3)DENY1 transaction lookup, answered by miner 6255; 4 checks hold, and the recipient is the deposit address the insured declared, so exclusion 4.2 applies$0.01 / $0.001521 s
sw-8ZVWC
14:12 UTC
Scanner pages on-call for a "critical" SSH CVE (SO-2)FALSE_ALARM1 CVE lookup, answered by miner 6204: CVE-2023-48795 is 5.9 MEDIUM; 2 checks contradicted, below the runbook's 9.0 threshold. The first plan was dropped as off the menu and the retry asked once$0.01 / $0.002064 s

Each fact links its signal on the node, for example the CVE answer in sw-8ZVWC: signal 0x8944c172…33a6, receipt 0xe15e30ec…ab42.

Honest caveatUnlike Shield's other desks, where fixed rules make the decision, here the model writes the resolution; the rules only check the facts it is given, and the memo says so. The example cases were written by Truvian, and the three live cases above were Truvian's own runs, all free; no case had been paid for by 3 Dec. On the measured run the desk got 3 of 12 wrong: a fact-check miner answered Unverified for a real exploit (IC-1), and two security cases stayed INCOMPLETE because the answers lacked the fields the runbook needs (SO-1, SO-3). The $0.10 budget is checked before each ask while two run at once, so the last ask in flight can carry a case slightly past it. If the Hunyuan keys are not set, the desk runs on the fallback model (LLM_*) and the memo names it. The store keeps the latest 200 work memos of every kind, so an old permalink can stop resolving. Everything settles on testnets: test USDC on Ethereum Sepolia for Telegraph, Base Sepolia for x402.