A live demonstration of getrandombeacon: a randomness source derived from real GPU mining work, not a server-side random number.
A thin JSON wrapper around the getrandombeacon RPC, for anyone who wants to use
Sharecoin's randomness beacon in their own code without running a node.
Request:
GET /raffle/api/beacon?start_height=<height>&window_size=<n>
start_height (required) - the first block height in the combination window.window_size (optional, default 8) - how many consecutive blocks'
mix_hash values to combine (1-10000). Larger windows bound an attacker's influence more
tightly, see docs/DETAILS.md.Example: /api/beacon?start_height=100
Returns an error (not a value) if any block in the requested window isn't
confirmed on the chain yet - the whole point is nobody, including this server, can know the
result before it's real. Don't trust this endpoint either: the response includes the exact
sharecoin-cli command to independently verify the same value yourself against your
own node. This is a convenience wrapper, not the source of truth.