zend.random draws a value with Sui’s built-in randomness in Zend’s zend::draws contract, and records it once per interaction and label. Both players’ pages can call it; the second call gets the same result.
Kinds
Rules
- Each
(interaction, label)is drawn once, ever. You can’t redraw"flip"until you like the answer. - Asking again with the same label and the same settings returns the recorded result. Asking with different settings fails with
DRAW_MISMATCH. - Labels are 1–25 characters of
a-z,0-9,_and-. - Up to 50 draws per interaction (
TOO_MANY_DRAWS). - Everyone in the interaction’s live room also gets the result as a message from
"zend"withdata: { type: "random", result }. - Draws cost the user nothing. Each one counts against your app’s network budget.
Result
From your server
random.drawn webhook for every draw, from a page or from your server.
Show that a result was checked
Setcheck: true on a result card’s slots:
Check a draw yourself
- On Sui: look up
transactionIdand find theDrawnevent from the package inverify.package. - Offline: check
attestationagainst Zend’s public key withverifyAttestation.