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
| Code | Meaning | Action |
| QUOTE_INVALID | Vendor chain or measurement check failed | Do not trust the agent. |
| TCB_OUTDATED | Platform below required TCB | Wait for operator to rotate. |
| MANDATE_MISMATCH | Mandate hash differs from expected | Operator changed limits. Review the new version. |
| SIG_INVALID | Action not signed by enclave key | Reject. Possible manual intervention. |
| SEQUENCE_GAP | Missing decision numbers | Decisions were withheld. Treat record as incomplete. |
| HEARTBEAT_MISSED | No signed ping within window | Safe action may have executed. Check ledger. |
Deployments
| Chain | Registry | Status |
| Robinhood Chain | 0x7A2c...e114 | testnet |
| Base | pending | scheduled |