D20DAO Verifiable Randomness
v0.1.2Verifiable VRF draws on Arc, 0.05 USDC each.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
draw Draw verifiable randomness (0.05 USDC)
Draw verifiable randomness for 0.05 USDC: dice, a coin flip, a number in a range, one or several winners, or a shuffle. Opens one VRF request on Arc and returns the result with request, fulfillment and proof links; the optional seed is bound to the payment on chain. Pays from the user's Circle Agent Wallet. One call returns every value of its operation, so ask once and never repeat a call to re-roll. An identical call within five minutes returns the earlier draw without paying; give each separate draw its own seed. The user sets a daily spending cap, so draws can run out: a paid answer carries…
| Parameter | Type | Description |
|---|---|---|
operation * | string | raw: one 256-bit word. coinFlip: 0 (tails) or 1 (heads). dice: count rolls of 1 to sides. range: one integer from min to max. chooseOne: one zero-based index. chooseMany: count distinct indices. shuff… |
count | integer | dice: rolls, 1 to 128 (default 1). chooseMany: distinct picks, required. |
items | array | chooseOne, chooseMany, shuffle: labels to draw from (1 to 256, each at most 200 bytes). Only their count is proven; the answer adds picked. Give this or population. |
max | range only, required: highest value, inclusive, at least min. | |
min | range only, required: lowest value, inclusive. | |
population | integer | chooseOne, chooseMany, shuffle: how many to draw from, 1 to 256. Give this or items. |
seed | string | Context bound on chain to this draw, such as "raffle-7 round 2" (at most 64 bytes). Use a new seed for each separate draw. To commit to an item list, put its hash here. |
sides | dice only, required: faces per die, at least 2. |
get_result Read a draw (free)
Read a paid draw by paymentId, or a request by requestId, for free. Use it to finish a draw that came back pending or unanswered. Chosen items come back as indices here, not as labels: apply them to the list you sent.
| Parameter | Type | Description |
|---|---|---|
paymentId | string | The paymentId of a paid draw (0x and 64 hex characters). |
requestId | string | A request id this API opened, as a decimal string. |
setup_status Check payment setup (free)
Check whether draws can be paid: the Circle CLI, its login, the agent wallet, its Gateway balance and today's spending. Returns the next setup step.