Partner API + SDK

Build with VRE

On-chain proof of who won. Send participants and a formula, the VRE operator runs the draw on devnet, anyone verifies it from the transaction signature.

How it works

Three steps. One request. One replay path.

You send one HTTP request; the operator commits your rules, waits for future Solana slots and settles the draw on-chain. The canonical program binds only rules approved by its admin key, so draws run through the API; verification needs nothing.

1
commit

Send participants

Participants, a formula and the number of winners go in one request with your partner key. The rules are committed on-chain before any randomness exists.

$ curl -X POST …/api/partner/draw
2
resolve

Winners from future slots

prepare_rng_v2 fixes three slots 8, 16 and 24 slots ahead; once they exist, settle_rng_v2 picks the winners from their hashes. The request returns in 12–45 seconds.

→ prepare_rng_v2 · settle_rng_v2
3
verify

Share & verify

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

$ vre verify --sig … → MATCH / OK
Install

One npm package. Replay any result.

~/projects/my-dapp
# Install the public SDK $ npm install verifiable-outcome-sdk # Or verify without installing $ npx -p verifiable-outcome-sdk vre verify --sig MVE6v5…YFAy5H verification_result : MATCH verification_reason : OK rng_version : 2
The shape

Participants in. Signature out. Replay anywhere.

body.jsonrequest
// POST /api/partner/draw { "formula": "rank_desc", "winners_count": 2, "participants": [ { "id": "trader-alice", "score": 1200 }, { "id": "trader-bob", "score": 950 }, { "id": "trader-carol", "score": 1400 } ] }
app.jsdraw + verify
import { verifyOutcome } from "verifiable-outcome-sdk"; const res = await fetch("https://verifiableoutcome.online/api/partner/draw", { method: "POST", headers: { "content-type": "application/json", "x-api-key": KEY }, body: JSON.stringify(body), }); const draw = await res.json(); const replay = await verifyOutcome({ signature: draw.signature, rpcUrl: "https://api.devnet.solana.com", programId: "6QtLot4uztCfjUuPreoiYPc3e1gH2fg6pq8hKYyvCP6B", }); // replay.status === "MATCH", replay.outcome_ids = draw.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. One request takes 12–45 seconds because it waits for future Solana slots. One draw per 10 seconds per key.

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": 498390112, "resolution_slot": 498390152, "rng_version": 2, "entropy_source": "slot_hash", "target_slots": ["498390136", "498390144", "498390152"], "resolved_slots": ["498390136", "498390144", "498390152"] }
FieldRequiredDescription
formulayesweighted_random, rank_desc, rank_asc, first_n, closest_to
participantsyesAt least 2, about 100 at most (8 KB of rules). Unique id up to 64 printable ASCII bytes; optional weight for weighted_random, required score for rank_desc, rank_asc and closest_to; first_n keeps the order you send
winners_countnoInteger 1–10. Defaults to 1
targetclosest_to onlySigned integer. The value participants are ranked by proximity to
labelnoFree-form string for your records
use_casenoraffle, airdrop or competition; informational
Use cases

Committed rules. Single or multi-winner outcomes.

Same request shape: participants and a formula in, a signature anyone can replay out.

Raffle

weighted_random. One winner from a committed weighted participant list.

Rewards Selection

weighted_random with several winners. Replay returns the full ordered outcome_ids.

Trading Competition

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

Prediction Market

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

Access

Get an API key

Verification is open to everyone and needs no key: the replay endpoint, the SDK verifier and the verify page are public. A partner key is what unlocks the write side — server-side draws, the sortition flow and the conditions endpoints. Tell us in Telegram what you are building and the volume you expect.

Running at scale? Platforms can deploy the engine under a partner agreement with their own program ID.