verify_fair
Verify a provably fair result locally, with no network call and no key. Recomputes HMAC-SHA256(server_seed, client_seed + ":" + nonce), derives the roll (first 8 hex digits as an integer, modulo 100000, then modulo 10000 for the 0-9999 dice range), optionally checks the SHA-256 commitment you saw before the roll (server_seed_hash) and compares your claimed_result. Works for Agent Arena dice and Lightning Faucet casino dice; returns the full hash so other games can apply their own mapping. Use the nonce the roll consumed, not the next one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"server_seed": "<server_seed>",
"client_seed": "<client_seed>",
"nonce": "<nonce>"
},
"name": "verify_fair"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | Yes | Nonce the roll consumed | |
| client_seed | Yes | ||
| result_type | No | Mapping claimed_result uses: dice (0-9999) or roll (0-99999) | dice |
| server_seed | Yes | Revealed server seed | |
| claimed_result | No | Optional reported roll to compare | |
| server_seed_hash | No | Optional SHA-256 commitment to check |