Config engine + SDK

Build with VRE

On-chain proof of who won. Build committed W3O1 rules, resolve once, let anyone verify from the transaction signature.

How it works

Three steps. One artifact. One replay path.

The public surface is simple: build a deterministic artifact, resolve it on-chain with an operator path, then replay the signature from public RPC data. Artifact building is open. Operator execution depends on the program instance you use.

1
commit

Build artifact bytes

Define participants, weights or scores, winners count, and optional formula fields. The SDK compiles them into deterministic W3O1 bytes.

$ node build-artifact.mjs
2
resolve

Resolve on-chain

An operator path submits the committed artifact to the canonical or partner-owned program. The resulting transaction becomes the public evidence surface.

$ yarn -s resolve:operator --config raffle.json
3
verify

Share & verify

You get a signature. Paste it at /verify or call verifyOutcome(). Anyone can replay the same outcome from public RPC data.

$ node verify.mjs → MATCH / OK
Install

One npm package. Deterministic build + replay.

~/projects/my-dapp
# Install the public SDK $ npm install verifiable-outcome-sdk # Public surface: artifact builder + replay verifier $ node -e 'import("verifiable-outcome-sdk").then(m => console.log(Object.keys(m)))' verifiable-outcome-sdk v0.4.0 surface: buildArtifact, verifyOutcome formats: W3O1 v1-v3 · deterministic replay kernel
The shape

Config in. Signature out. Replay anywhere.

raffle.jsonconfig
// Example formula config before compilation to W3O1 bytes { "type": "formula_draw", "formula": "rank_desc", "input_lamports": 12, "payout_lamports": 3, "winners_count": 2, "participants": [ { "id": "trader-alice", "score": 1200 }, { "id": "trader-bob", "score": 950 }, { "id": "trader-carol", "score": 1400 } ], "target": null }
app.tsprogrammatic
// Current public npm surface import { buildArtifact, verifyOutcome } from "verifiable-outcome-sdk"; const artifact = buildArtifact({ type: "formula_draw", formula: "rank_desc", input_lamports: 12, payout_lamports: 3, winners_count: 2, participants: [ { id: "trader-alice", score: 1200 }, { id: "trader-bob", score: 950 }, { id: "trader-carol", score: 1400 }, ], }); const replay = await verifyOutcome({ signature: "5wZUU5…RVd2", rpcUrl: "https://api.devnet.solana.com", programId: "9tEram…FE1F", }); // { status: "MATCH", outcome_id, outcome_ids, ... }
Partner Draw API

One POST request. Outcome committed on-chain.

No SDK required. Send participants and a formula — get back a transaction signature and a public replay URL. Anyone can verify the result independently.

RequestPOST /api/partner/draw
$ curl -X POST https://verifiableoutcome.online/api/partner/draw \ -H "Content-Type: application/json" \ -H "X-Api-Key: <your-api-key>" \ -d '{ "formula": "weighted_random", "winners_count": 1, "participants": [ { "id": "alice", "weight": 3 }, { "id": "bob", "weight": 1 }, { "id": "carol", "weight": 2 } ] }'
Response200 OK
{ "ok": true, "signature": "5wZUU5…RVd2", "outcome_id": "alice", "outcome_ids": ["alice"], "replay_url": "https://verifiableoutcome.online/verify?sig=5wZUU5…RVd2", "artifact_slot": 312847201, "resolution_slot":312847203 }
FieldRequiredDescription
formulayesweighted_random, rank_desc, rank_asc, first_n, closest_to
participantsyesArray of 2–100 objects. Each has id (string) + weight (weighted_random) or score (others)
winners_countnoInteger 1–10. Defaults to 1
targetclosest_to onlySigned integer. The value participants are ranked by proximity to
labelnoFree-form string up to 80 chars for your records
Use cases

Committed rules. Single or multi-winner outcomes.

Same SDK shape: build artifact, resolve on-chain, replay the signature.

Raffle

W3O1 v1 weighted random. One winner from a committed weighted participant list.

Rewards Selection

W3O1 v2 multi-winner weighted random. Replay returns full ordered outcome_ids.

Trading Competition

W3O1 v3 rank_desc. Signed scores and stable input order produce deterministic top-N winners.

Prediction Market

W3O1 v3 closest_to. Replay includes committed target, signed scores, and stable order.

Partners

Need your own instance?

Large platforms and GameFi projects can deploy VRE under a partner agreement — no per-resolution fee, full control over your program ID.

Become a partner