Sworn / Verify
Verifier documentation

Check it yourself.

There are two ways to verify a Sworn agent: read the registry from your own contract, or run the checks off-chain with the SDK. Both do exactly the same thing.

Install

shellnpm
npm install @sworn/verify

SDK

verify.tstypescript
import { Registry, verifyDecision } from "@sworn/verify";

// 1. resolve the agent and validate its attestation
const registry = new Registry({ chain: "robinhood" });
const agent = await registry.agent("sw-01");

// 2. verify a single decision row
const ok = await verifyDecision(decision, {
  agent,
  requireMandate: "m-7f2e",
  minTcb: "2026-06",
});

// 3. verify a whole window and compute an attested track record
const record = await registry.trackRecord("sw-01", { since: "30d" });

Contract

ISwornRegistry.solsolidity
interface ISwornRegistry {
  function isAttested(address agentKey) external view returns (bool);
  function mandateOf(address agentKey) external view returns (bytes32);
  function verifyAction(
    address agentKey, bytes32 actionHash, bytes32 traceHash, bytes calldata sig
  ) external view returns (bool);
}

// a venue that only fills sworn orders
function fill(Order calldata o, bytes calldata sig) external {
  require(REGISTRY.isAttested(o.agent), "not attested");
  require(REGISTRY.verifyAction(o.agent, keccak256(abi.encode(o)), o.traceHash, sig), "bad sig");
  _fill(o);
}

What is checked

Quote validityVendor certificate chain, TCB status, measurement matches a published runtime release.
Key bindingSigning key appears in quote report data.
Mandate bindingMandate hash in report data matches the published mandate document.
Model bindingModel weights hash in report data matches the operator's declared model.
Action signatureSignature over action hash, trace hash, mandate hash, and sequence number.
SequenceDecision sequence numbers are contiguous. Gaps indicate withheld decisions.

Errors

CodeMeaningAction
QUOTE_INVALIDVendor chain or measurement check failedDo not trust the agent.
TCB_OUTDATEDPlatform below required TCBWait for operator to rotate.
MANDATE_MISMATCHMandate hash differs from expectedOperator changed limits. Review the new version.
SIG_INVALIDAction not signed by enclave keyReject. Possible manual intervention.
SEQUENCE_GAPMissing decision numbersDecisions were withheld. Treat record as incomplete.
HEARTBEAT_MISSEDNo signed ping within windowSafe action may have executed. Check ledger.

Deployments

ChainRegistryStatus
Robinhood Chain0x7A2c...e114testnet
Basependingscheduled
Request SDK accessTry it on the ledger