A pack opens a draw: an account that keeps the pack’s own copy of the prize table. MagicBlock’s verifiable randomness settles the draw, usually within a few seconds. Then the vault pays the prize. See Opening a pack and Provable fairness.
Get a draw
One draw: waiting for randomness, or settled with its tier and the coins paid.
The draw account that the pack opened.
You find a draw’s address in the pack’s buy transaction, in a pull (draw), or later in the answer of the pack build route.
The route keeps answering after the prize is paid and the draw account closes. Then the API rebuilds the result from the draw’s stored events.
Follow a draw
Ask about once a second until settled is true.
Without a key you can make 30 reads a minute. Stop asking once the draw settles, and slow down if you follow many draws at once. See Limits and errors.
If MagicBlock is late, the draw can wait longer. It can ask for randomness again, and after a deadline it pays the smallest prize. See If the draw is late.
Sample answer
The addresses below are made up.
The draw object
The state of a draw
A draw moves through these states:
Most draws go straight from waiting to paid. The sample above is a paid draw whose account has closed. A prize waits as owed only when the buyer’s coin account could not receive it. Then owed shows what a claim still has to pay. See If the draw is late.
Fields
Coin amounts use the machine’s tokenDecimals.