Actually Smart Contractsalpha

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

Docs

Publish an ASC

Publishing turns your file into rules that can't change, with an id any caller can use.

terminalplanned
npx asc publish withdrawals.asc.md
asc.draft() and asc.publish()TypeScriptplanned
import { asc } from '@verafy/asc';
import fs from 'node:fs';

const draft = await asc.draft({ text: fs.readFileSync('withdrawals.asc.md', 'utf8') });
console.log(draft.report);          // compiled steps and the loophole report: read it

const published = await asc.publish(draft, { signer });
// { id: 'asc_hotwallet_v1', version: '1.0.0', url: 'https://asc.verafy.ai/...' }

What publishing does

  1. Draft. Your English is compiled into steps.
  2. Loophole report. The steps are read back against the English, and any gap is listed.
  3. Your sign-off. Nothing is written until you sign.
  4. Written to Solana. The rules can't change after that. You get an id, like asc_hotwallet_v1, and a public page.

Versions

Publishing again makes @1.1.0. Old rulings keep pointing at the version they used. Callers can pin a version, like asc_hotwallet_v1@1.0.0. Without a pin, the current version is used and recorded on the ruling.

Private ASCs planned

The rules are encrypted so only the jury can read them. Its limit: any juror could leak the rules.

What it costs

A draft is 2 credits. Publishing is the network cost plus 10%. See Credits and pricing.

ASCs are stored on Solana with IQ Labs inscriptions. Under the hood.