get_random
Draw unbiased, Ed25519-signed verifiable randomness for fair selections, raffles, and commit-reveal protocols. Ensure third-party verifiability with cryptographic proofs.
Instructions
Draw unbiasable, Ed25519-signed verifiable randomness (Platon).
Use this when you need randomness an autonomous agent cannot bias or predict and that a third
party can verify — fair selection, sampling, raffles, commit-reveal, anti-MEV ordering. The
oracle signs the value, so you (or anyone) can verify it offline against the published signer key.
Returns:
The standard envelope (see server instructions). `result` contains:
- `random_hex`: the random bytes, hex-encoded (`num_bytes` long).
- `proof`: `{state_hash, tick, timestamp, entropy_commitment}` binding the value to the
oracle's chaotic state at draw time.
- `signature`: Ed25519 signature over the value+proof (verify with `verify_random`/the
signer key in the Hub manifest). `verifiable.signed` will be true.
Cost ~$0.004 USDC, charged per call.
Example:
get_random(num_bytes=32, client_seed="0xdeadbeef")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| num_bytes | No | Number of random bytes to draw, 1..1024. The result's `random_hex` is this many bytes hex-encoded. Use 32 for a 256-bit seed/word. | |
| client_seed | No | Optional caller-supplied seed (hex) for domain separation — it is bound into the signed proof so two callers asking at the same tick get distinct, attributable randomness. Pass '' to omit. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |