Actually Smart Contractsalpha

Status: the sandbox runs today live, and so does POST /v1/quotes live. Every other call on this page is planned planned.

Docs

API reference

One SDK, one REST API and two on-chain calls. Each row says whether it's live or planned.

SDK: @verafy/asc (TypeScript), verafy_asc (Python)

CallDoesStatusDocs
asc.draft({ text })Compiles an .asc.md into steps, runs the loophole check, and returns a draft with a report.plannedPublish an ASC
asc.publish(draft, { signer })Publishes the signed-off draft on Solana and returns { id, version, url }.plannedPublish an ASC
asc.requestRuling({ asc, action, evidence, jury, ... })Asks a jury to rule and returns a Ruling.plannedRequest a ruling
asc.getRuling(id)Reads a ruling.plannedRequest a ruling
asc.dispute(rulingId, { reason })Sends a ruling to a second jury.plannedDisputes
asc.certify({ repo, commit, standards, jury })Reviews a commit and returns a Certificate.plannedStandards and certification
asc.quote(request)Prices any requestRuling or certify call without running it. Until the SDK ships, use POST /v1/quotes.plannedCredits and pricing

REST

Each call takes the same body as the SDK call, with auth by API key. Quotes are free and need no key.

EndpointSame asStatusDocs
POST /v1/ascsasc.draftplannedPublish an ASC
POST /v1/ascs/:id/publishasc.publishplannedPublish an ASC
POST /v1/rulingsasc.requestRulingplannedRequest a ruling
GET /v1/rulings/:idasc.getRulingplannedRequest a ruling
POST /v1/rulings/:id/disputeasc.disputeplannedDisputes
POST /v1/certificationsasc.certifyplannedStandards and certification
GET /v1/certifications/:idreads a certificateplannedStandards and certification
POST /v1/quotesasc.quoteliveCredits and pricing
GET /v1/standardslists the standardsplannedStandards and certification
POST /v1/quotesshelllive
curl -X POST https://asc.verafy.ai/v1/quotes \
  -H 'content-type: application/json' \
  -d '{"kind":"ruling","jury":{"size":7,"tier":"standard"}}'

# {"kind":"ruling","unit":"credits","proposed":true,"charged":0,"credits":35,
#  "jury":{"size":7,"tier":"standard"},"detail":"7 jurors, standard tier"}

Quotes use the proposed prices. The fast and frontier tiers return tier_price_not_set until their prices are set.

On chain

ChainCallStatusDocs
Solanaverify_ruling(&asc, &action, &instructions) -> OutcomeplannedEnforce a ruling
EVMrequestRuling(ascId, action, jury) → requestIdplannedEnforce a ruling
EVMverifyRuling(requestId, attestations) → OutcomeplannedEnforce a ruling

Hard caps stay in the contract's own code. The jury can only pick a listed outcome.