Actually Smart Contractsalpha

Status: the sandbox runs today live. The SDK and API on this page are planned planned.

Docs

Request a ruling

asc.requestRuling() asks a jury to rule on one action under one published ASC, and returns a signed ruling.

asc.requestRuling()TypeScriptplanned
const ruling = await asc.requestRuling({
  asc: 'asc_hotwallet_v1',                 // a published ASC id, optionally pinned: 'asc_hotwallet_v1@1.0.0'
  action: { type: 'withdrawal', to, amount_usd: 250000 },   // what you want to do
  evidence: { account, destination, ticket, totals },       // what the jury may read
  jury: { size: 5, quorum: 4, tier: 'standard' },
  standards: ['EAO@1.0'],                  // optional: also judge against a standard's rules
  maxCredits: 40,                          // refuse to run if the quote is higher
  wait: true,                              // false: return at once with status 'pending'; use a webhook
  webhook: 'https://example.com/asc',      // optional
});
asc.request_ruling()Pythonplanned
from verafy_asc import asc

ruling = asc.request_ruling(
    asc="asc_hotwallet_v1",
    action={"type": "withdrawal", "to": to, "amount_usd": 250000},
    evidence={"account": account, "destination": destination, "ticket": ticket, "totals": totals},
    jury={"size": 5, "quorum": 4, "tier": "standard"},
)

Parameters

NameRequiredMeaning
ascyesThe published ASC id. Without @version, the ASC's current version is used and recorded on the ruling.
actionyesThe thing being decided. It's hashed, and the ruling is valid only for this exact action.
evidencenoData the jury may read. Each item is saved and hashed before any juror sees it. URLs passed with asc.snapshot() are fetched once.
jury.sizeno3 to 9 jurors. Defaults to the ASC's min_jury. It can't go below the ASC's minimum.
jury.quorumnoHow many must agree. Defaults to two thirds of size, rounded up. It can't go below the ASC's minimum.
jury.tiernofast, standard or frontier, which sets the model list and price. fast suits agent loops; frontier suits large sums and constitutions.
jury.modelsnoPick models by name instead of a tier. They must come from different labs if the ASC says different_labs.
jury.proofnonone today. model-proof is planned (provable inference, one open model so far).
standardsnoStandard ids whose rules are added to the ASC's rules for this ruling.
maxCreditsnoThe call fails with over_budget before anything runs if the quote is higher.
wait, webhooknoA ruling takes 20 to 60 seconds. wait: true holds the call open; otherwise poll getRuling or take the webhook.

What comes back

ruling (illustrative)JSONillustrative
{
  "id": "rul_8fK2c9",
  "asc": "asc_hotwallet_v1",
  "status": "final",
  "outcome": "hold",
  "rulesBroken": [
    { "rule": 5, "votes": 5, "note": "Email and 2FA changed 3 hours ago; withdrawal to an address never used by this account." }
  ],
  "jury": { "size": 5, "quorum": 4, "tier": "standard", "answered": 5 },
  "votes": [
    { "juror": "gpt",      "lab": "OpenAI",    "outcome": "hold", "wallet": "J1u...", "sig": "3fa9c1..." },
    { "juror": "claude",   "lab": "Anthropic", "outcome": "hold", "wallet": "J2c...", "sig": "b07e42..." },
    { "juror": "gemini",   "lab": "Google",    "outcome": "hold", "wallet": "J3g...", "sig": "9d21aa..." },
    { "juror": "qwen",     "lab": "Alibaba",   "outcome": "hold", "wallet": "J4q...", "sig": "51c8e0..." },
    { "juror": "deepseek", "lab": "DeepSeek",  "outcome": "hold", "wallet": "J5d...", "sig": "e6f30b..." }
  ],
  "evidence": { "sha256": "4b1e07c2a9d3...", "items": 4 },
  "attestations": "<base64: the signed votes, ready to pass to verify_ruling / verifyRuling>",
  "dispute": { "open_until": "2026-11-07T16:20:00Z" },
  "cost": { "quoted": 25, "charged": 25, "unit": "credits" },
  "record": "https://asc.verafy.ai/rulings/rul_8fK2c9",
  "illustrative": true
}
  • status is pending, final, disputed or escalated.
  • outcome is one of the outcomes the ASC lists, or its default when there's no quorum, a timeout or bad evidence.
  • rulesBroken lists the rule number, how many jurors cited it, and a one-line note.
  • votes has one entry per juror (model, lab, outcome, wallet, signature).
  • attestations is ready to pass to verifyRuling on chain. See Enforce a ruling.
  • dispute.open_until is when the dispute window closes. See Disputes.
  • cost is quoted and charged, in credits.
  • record is a public link.

Failures are never a yes

On a timeout, no quorum, or too few jurors answering, the result is the ASC's default outcome, and the call is charged 0.

Waiting and webhooks

A ruling takes 20 to 60 seconds. With wait: true the call returns the final ruling. With wait: false it returns at once with status: 'pending'; read it later with asc.getRuling(id) or take the webhook, which receives the same ruling body when it's final.

Choosing a jury

UseJuryWhy
Agent tool calls, outbound messages3, quorum 2, fastSits in a loop; speed matters more than depth
Withdrawals, payouts, grants5, quorum 4, standardThe default for money
Constitutions, treasury trades, large sums7, quorum 5, frontierWrong answers are expensive; disputes are likely
Model audits5, quorum 4, standard, run in batchesNot live chat. A ruling takes 20 to 60 s

What the jury sees and signs

Each juror reads the ASC, the action, and the evidence, hashed before any juror sees it. Each juror signs its vote with its own wallet, and answers are committed before any is revealed, so no juror can copy another. How it works draws each step.