{
"$type": "com.atproto.lexicon.schema",
"defs": {
"main": {
"description": "Data needed for the players to coordinate generating a trusted random number together, eg. dice rolls, who plays first, shuffling cards",
"properties": {
"id": {
"description": "An ID used by the game logic to find transient data when needed",
"maxLength": 32,
"type": "string"
},
"inputs": {
"description": "The inputs needed to complete the calculation at its various stages, one per player",
"items": {
"description": "A hashed or cleartext value used in a calculation. A hash, value, or both must be present, and all hashes must be revealed by a value (for verification) at some point during the game",
"properties": {
"hash": {
"description": "A multibase, multihash that will be used in the calculation",
"maxLength": 64,
"type": "string"
},
"player": {
"description": "The player who contributed this input",
"format": "did",
"type": "string"
},
"value": {
"description": "A multibase, multiformat encoded value that will be used in the calculation",
"maxLength": 64,
"type": "string"
}
},
"required": [
"player"
],
"type": "object"
},
"type": "array"
},
"result": {
"description": "Holds the result of the calculation, so that it can be validated easily. Should always be present once the calculation is completable",
"type": "integer"
},
"under": {
"description": "The number which this random number will be under (eg. coin toss = 2, dice roll = 6)",
"type": "integer"
}
},
"required": [
"id",
"under",
"inputs"
],
"type": "object"
}
},
"id": "games.atplay.calculation.randomNumber",
"lexicon": 1
}