@xgamesfun/solana 0.0.0-stage → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/DISCLAIMER.md +41 -0
- package/LICENSE +202 -0
- package/NOTICE +13 -0
- package/README.md +172 -2
- package/bin/xsolana.mjs +189 -0
- package/examples/artwork-auction.json +51 -0
- package/examples/blind-forge.json +128 -0
- package/examples/coin-flip-arena.json +103 -0
- package/examples/duel-arena.json +137 -0
- package/examples/elements-set.json +274 -0
- package/examples/event-badges.json +67 -0
- package/examples/expedition-guild.json +154 -0
- package/examples/fair-presale.json +48 -0
- package/examples/falling-drop.json +90 -0
- package/examples/guild-missions.json +137 -0
- package/examples/halving-seasons.json +107 -0
- package/examples/hero-trials.json +93 -0
- package/examples/ideas.json +789 -0
- package/examples/level-ladder.json +65 -0
- package/examples/merge-2048.json +128 -0
- package/examples/nft-raffle.json +33 -0
- package/examples/paper-hands-farm.json +44 -0
- package/examples/partner-vault.json +112 -0
- package/examples/sacrifice-raffle.json +118 -0
- package/examples/scorched-treasury.json +84 -0
- package/examples/shelter-fair.json +164 -0
- package/examples/spark-pity.json +153 -0
- package/examples/stakers-draw.json +118 -0
- package/examples/star-fleet.json +150 -0
- package/examples/starforce.json +116 -0
- package/examples/stud-farm.json +134 -0
- package/examples/team-vesting.json +70 -0
- package/examples/trade-in-shop.json +168 -0
- package/js/approve/details.mjs +263 -0
- package/js/approve/ed25519.mjs +36 -0
- package/js/approve/live-check.mjs +144 -0
- package/js/approve/page.html +86 -0
- package/js/approve/page.js +203 -0
- package/js/approve/server.mjs +726 -0
- package/js/chain/base58.js +73 -0
- package/js/chain/borsh.js +270 -0
- package/js/chain/bytes.js +141 -0
- package/js/chain/core.js +181 -0
- package/js/chain/curve.js +52 -0
- package/js/chain/lookup.js +279 -0
- package/js/chain/mint.js +96 -0
- package/js/chain/pda.js +66 -0
- package/js/chain/programs.js +102 -0
- package/js/chain/rpc.js +219 -0
- package/js/chain/sha256.js +68 -0
- package/js/chain/token.js +85 -0
- package/js/chain/token2022.js +247 -0
- package/js/chain/tx.js +224 -0
- package/js/client/accounts.js +679 -0
- package/js/client/compressed.js +46 -0
- package/js/client/grant.js +299 -0
- package/js/client/idl/loot.js +2 -0
- package/js/client/idl/loot.json +17206 -0
- package/js/client/index.js +10 -0
- package/js/client/ix.js +2887 -0
- package/js/client/pda.js +114 -0
- package/js/client/policy.js +69 -0
- package/js/client/random.js +70 -0
- package/js/client/sizes.js +297 -0
- package/js/client/traits.js +44 -0
- package/js/connect/connect.mjs +182 -0
- package/js/economy/check.mjs +2236 -0
- package/js/economy/cost.mjs +185 -0
- package/js/economy/examples.mjs +114 -0
- package/js/economy/explain.mjs +239 -0
- package/js/economy/guide.mjs +232 -0
- package/js/economy/legal.mjs +15 -0
- package/js/economy/live.mjs +130 -0
- package/js/economy/model.mjs +698 -0
- package/js/economy/plan.mjs +1155 -0
- package/js/economy/schema.json +3071 -0
- package/js/economy/secrets.mjs +60 -0
- package/js/economy/simulate.mjs +1019 -0
- package/js/economy/txsize.mjs +45 -0
- package/js/economy/validate.mjs +85 -0
- package/js/index.js +10 -0
- package/js/mcp/server.mjs +113 -0
- package/js/mcp/tools.mjs +485 -0
- package/js/play/index.js +2855 -0
- package/js/play/keys.js +167 -0
- package/js/results/index.js +184 -0
- package/js/results/wire.js +90 -0
- package/package.json +100 -4
- package/release.json +8 -0
- package/skills/xsolana-economy/SKILL.md +109 -0
- package/skills/xsolana-economy/references/after-launch.md +124 -0
- package/skills/xsolana-economy/references/apps.md +193 -0
- package/skills/xsolana-economy/references/sentence-to-spec.md +180 -0
- package/skills/xsolana-economy/references/telling-the-person.md +134 -0
- package/types/chain/base58.d.ts +10 -0
- package/types/chain/borsh.d.ts +23 -0
- package/types/chain/bytes.d.ts +45 -0
- package/types/chain/core.d.ts +52 -0
- package/types/chain/curve.d.ts +1 -0
- package/types/chain/lookup.d.ts +194 -0
- package/types/chain/mint.d.ts +25 -0
- package/types/chain/pda.d.ts +25 -0
- package/types/chain/programs.d.ts +65 -0
- package/types/chain/rpc.d.ts +68 -0
- package/types/chain/sha256.d.ts +1 -0
- package/types/chain/token.d.ts +141 -0
- package/types/chain/token2022.d.ts +53 -0
- package/types/chain/tx.d.ts +60 -0
- package/types/client/accounts.d.ts +318 -0
- package/types/client/compressed.d.ts +29 -0
- package/types/client/grant.d.ts +170 -0
- package/types/client/idl/loot.d.ts +4498 -0
- package/types/client/index.d.ts +9 -0
- package/types/client/ix.d.ts +5315 -0
- package/types/client/pda.d.ts +95 -0
- package/types/client/policy.d.ts +48 -0
- package/types/client/random.d.ts +26 -0
- package/types/client/sizes.d.ts +101 -0
- package/types/client/traits.d.ts +12 -0
- package/types/economy/check.d.mts +100 -0
- package/types/economy/cost.d.mts +69 -0
- package/types/economy/examples.d.mts +27 -0
- package/types/economy/explain.d.mts +19 -0
- package/types/economy/guide.d.mts +140 -0
- package/types/economy/legal.d.mts +12 -0
- package/types/economy/live.d.mts +124 -0
- package/types/economy/model.d.mts +431 -0
- package/types/economy/plan.d.mts +1014 -0
- package/types/economy/secrets.d.mts +4 -0
- package/types/economy/simulate.d.mts +164 -0
- package/types/economy/txsize.d.mts +17 -0
- package/types/economy/validate.d.mts +3 -0
- package/types/index.d.ts +9 -0
- package/types/mcp/tools.d.mts +635 -0
- package/types/play/index.d.ts +880 -0
- package/types/play/keys.d.ts +51 -0
- package/types/results/index.d.ts +155 -0
- package/types/results/wire.d.ts +122 -0
|
@@ -0,0 +1,3071 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/XGamesFun/solana-kit/main/js/economy/schema.json",
|
|
4
|
+
"title": "A loot economy (spec version 2)",
|
|
5
|
+
"description": "One project's economy on the shared loot program: its currencies, collectibles, pools and the mechanics that move them. Kept as xsolana.json in a project (or as the `economy` section of a games.fun game). Amounts are in whole units of their token, percents are percents, durations are like \"7d\".",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"version"
|
|
9
|
+
],
|
|
10
|
+
"additionalProperties": false,
|
|
11
|
+
"properties": {
|
|
12
|
+
"version": {
|
|
13
|
+
"const": 2,
|
|
14
|
+
"description": "The spec format: 2 is loot 0.7 and later."
|
|
15
|
+
},
|
|
16
|
+
"network": {
|
|
17
|
+
"const": "devnet",
|
|
18
|
+
"description": "Devnet only until the program is audited."
|
|
19
|
+
},
|
|
20
|
+
"name": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"maxLength": 80
|
|
23
|
+
},
|
|
24
|
+
"prompt": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"maxLength": 2000,
|
|
27
|
+
"description": "The creator's own words for this economy, kept as they wrote them."
|
|
28
|
+
},
|
|
29
|
+
"keys": {
|
|
30
|
+
"type": "object",
|
|
31
|
+
"additionalProperties": false,
|
|
32
|
+
"description": "A game has two keys. The owner (the creator's wallet) signs the setup and every mechanic. The authority signs what only the game knows: who won, who cleared the level.",
|
|
33
|
+
"properties": {
|
|
34
|
+
"authority": {
|
|
35
|
+
"anyOf": [
|
|
36
|
+
{
|
|
37
|
+
"const": "owner"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"$ref": "#/$defs/address"
|
|
41
|
+
}
|
|
42
|
+
],
|
|
43
|
+
"default": "owner",
|
|
44
|
+
"description": "\"owner\": the creator's wallet is both keys. Or the public address of another plain wallet (a server's key, the local keeper). Never a private key."
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"currency": {
|
|
49
|
+
"$ref": "#/$defs/key",
|
|
50
|
+
"description": "The game's own currency: the token every shop item is priced in and the treasury holds. A key from `tokens`."
|
|
51
|
+
},
|
|
52
|
+
"treasury": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"pattern": "^wallet:[1-9A-HJ-NP-Za-km-z]{32,44}$",
|
|
55
|
+
"description": "Where what a sale's shares leave goes (and a lottery's cut): \"wallet:<address>\" for another wallet than the owner's (a charity, a team's multisig vault). Left out: the owner's own wallet. The program pays its account of whatever currency was paid, and opens it when it is not there. Set it before going live: it doesn't change through the spec once live."
|
|
56
|
+
},
|
|
57
|
+
"tokens": {
|
|
58
|
+
"type": "array",
|
|
59
|
+
"items": {
|
|
60
|
+
"$ref": "#/$defs/token"
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"collection": {
|
|
64
|
+
"description": "The Core collection the setup makes, which the project's collectibles are minted into (an item can name another of the project's). `false`: none, a project of tokens only.",
|
|
65
|
+
"anyOf": [
|
|
66
|
+
{
|
|
67
|
+
"$ref": "#/$defs/collection"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"const": false
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"items": {
|
|
75
|
+
"type": "array",
|
|
76
|
+
"items": {
|
|
77
|
+
"$ref": "#/$defs/item"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"pools": {
|
|
81
|
+
"type": "array",
|
|
82
|
+
"maxItems": 256,
|
|
83
|
+
"items": {
|
|
84
|
+
"$ref": "#/$defs/pool"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
"stashes": {
|
|
88
|
+
"type": "array",
|
|
89
|
+
"items": {
|
|
90
|
+
"$ref": "#/$defs/stash"
|
|
91
|
+
},
|
|
92
|
+
"description": "NFTs the game holds to give away as prizes: a box's outcome `{ \"gives\": \"stash\" }` gives one of a stash's at random. The owner's wallet hands each listed NFT to the game when the economy goes live, so it must hold them then."
|
|
93
|
+
},
|
|
94
|
+
"tables": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/$defs/table"
|
|
98
|
+
},
|
|
99
|
+
"description": "Tables of weighted rows the project writes once and seals: a fresh item's trait draws a row of one per unit (its label, or its number), by weight among the rows still in stock. Written when the economy goes live, a batch of rows a transaction."
|
|
100
|
+
},
|
|
101
|
+
"boxes": {
|
|
102
|
+
"type": "array",
|
|
103
|
+
"items": {
|
|
104
|
+
"$ref": "#/$defs/box"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"payments": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"$ref": "#/$defs/payment"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"recipes": {
|
|
114
|
+
"type": "array",
|
|
115
|
+
"items": {
|
|
116
|
+
"$ref": "#/$defs/recipe"
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
"schedules": {
|
|
120
|
+
"type": "array",
|
|
121
|
+
"items": {
|
|
122
|
+
"$ref": "#/$defs/schedule"
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"lotteries": {
|
|
126
|
+
"type": "array",
|
|
127
|
+
"items": {
|
|
128
|
+
"$ref": "#/$defs/lottery"
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
"farms": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"$ref": "#/$defs/farm"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"contests": {
|
|
138
|
+
"type": "array",
|
|
139
|
+
"items": {
|
|
140
|
+
"$ref": "#/$defs/contest"
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
"auctions": {
|
|
144
|
+
"type": "array",
|
|
145
|
+
"items": {
|
|
146
|
+
"$ref": "#/$defs/auction"
|
|
147
|
+
}
|
|
148
|
+
},
|
|
149
|
+
"holds": {
|
|
150
|
+
"type": "array",
|
|
151
|
+
"items": {
|
|
152
|
+
"$ref": "#/$defs/hold"
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
"grants": {
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
158
|
+
"$ref": "#/$defs/grant"
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
"traits": {
|
|
162
|
+
"type": "array",
|
|
163
|
+
"description": "Traits the game vouches for from NFTs' off-chain metadata (a background, a class), so rules can read them: the root of a Merkle tree of each NFT's traits (`loot.traitsTree`), set when the economy goes live. Anyone then writes an NFT's traits into its Sheet with its proof (`app.proveTraits`), and boosts, gates and odds read them like any attribute.",
|
|
164
|
+
"items": {
|
|
165
|
+
"type": "object",
|
|
166
|
+
"additionalProperties": false,
|
|
167
|
+
"required": [
|
|
168
|
+
"collection",
|
|
169
|
+
"root"
|
|
170
|
+
],
|
|
171
|
+
"properties": {
|
|
172
|
+
"collection": {
|
|
173
|
+
"$ref": "#/$defs/address",
|
|
174
|
+
"description": "The collection the traits are of: the tree's name on chain."
|
|
175
|
+
},
|
|
176
|
+
"root": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"pattern": "^[0-9a-f]{64}$",
|
|
179
|
+
"description": "The tree's root, in hex."
|
|
180
|
+
},
|
|
181
|
+
"about": {
|
|
182
|
+
"$ref": "#/$defs/words"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
"decisions": {
|
|
188
|
+
"type": "array",
|
|
189
|
+
"items": {
|
|
190
|
+
"$ref": "#/$defs/decision"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"scenario": {
|
|
194
|
+
"$ref": "#/$defs/scenario"
|
|
195
|
+
},
|
|
196
|
+
"live": {
|
|
197
|
+
"$ref": "#/$defs/live"
|
|
198
|
+
},
|
|
199
|
+
"projectNumber": {
|
|
200
|
+
"type": "integer",
|
|
201
|
+
"minimum": 0,
|
|
202
|
+
"maximum": 9007199254740991,
|
|
203
|
+
"default": 0,
|
|
204
|
+
"description": "The project's number among its owner's: its address is [\"project\", owner, number]. A wallet that runs two economies gives each its own number."
|
|
205
|
+
},
|
|
206
|
+
"collections": {
|
|
207
|
+
"type": "array",
|
|
208
|
+
"uniqueItems": true,
|
|
209
|
+
"items": {
|
|
210
|
+
"$ref": "#/$defs/address"
|
|
211
|
+
},
|
|
212
|
+
"description": "Core collections the owner already controls (their update authority) that the project takes too, besides the one it makes: as many as the project's setup transaction carries (about 25 in all). An NFT of any of them is the project's own: it reads and writes it as one, and an item may be minted into it (with the project as its update delegate)."
|
|
213
|
+
},
|
|
214
|
+
"compressedTree": {
|
|
215
|
+
"type": "object",
|
|
216
|
+
"additionalProperties": false,
|
|
217
|
+
"description": "The tree the project's compressed NFTs are minted into (a Bubblegum v2 tree the setup opens, the project its only minter), when a prize gives one (`\"compressed\": true`). Its rent is paid once, at the setup: about 0.23 SOL for 16,384 NFTs, 0.43 SOL for 1,048,576.",
|
|
218
|
+
"properties": {
|
|
219
|
+
"holds": {
|
|
220
|
+
"type": "integer",
|
|
221
|
+
"minimum": 1,
|
|
222
|
+
"maximum": 1048576,
|
|
223
|
+
"default": 16384,
|
|
224
|
+
"description": "How many compressed NFTs it holds in all: the tree is made for the next power of two (at least 16,384). Once full, no more are given."
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"$defs": {
|
|
230
|
+
"key": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"pattern": "^[a-z][a-z0-9-]{0,31}$",
|
|
233
|
+
"description": "A short name for this part, used by the other parts and by its slots: lower case, digits and dashes."
|
|
234
|
+
},
|
|
235
|
+
"address": {
|
|
236
|
+
"type": "string",
|
|
237
|
+
"pattern": "^[1-9A-HJ-NP-Za-km-z]{32,44}$"
|
|
238
|
+
},
|
|
239
|
+
"link": {
|
|
240
|
+
"type": "string",
|
|
241
|
+
"pattern": "^https://"
|
|
242
|
+
},
|
|
243
|
+
"words": {
|
|
244
|
+
"type": "string",
|
|
245
|
+
"maxLength": 1000
|
|
246
|
+
},
|
|
247
|
+
"amount": {
|
|
248
|
+
"description": "An amount in whole units of its currency: 0.1, or \"0.1\" when it must be exact.",
|
|
249
|
+
"anyOf": [
|
|
250
|
+
{
|
|
251
|
+
"type": "number",
|
|
252
|
+
"minimum": 0
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"type": "string",
|
|
256
|
+
"pattern": "^[0-9]{1,20}(\\.[0-9]{1,18})?$"
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
},
|
|
260
|
+
"percent": {
|
|
261
|
+
"type": "number",
|
|
262
|
+
"minimum": 0,
|
|
263
|
+
"maximum": 100,
|
|
264
|
+
"description": "A percent with at most two decimals (the program counts in hundredths of a percent)."
|
|
265
|
+
},
|
|
266
|
+
"duration": {
|
|
267
|
+
"description": "Seconds, or a number and a unit: \"45s\", \"30m\", \"6h\", \"7d\", \"2w\".",
|
|
268
|
+
"anyOf": [
|
|
269
|
+
{
|
|
270
|
+
"type": "integer",
|
|
271
|
+
"minimum": 0
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"type": "string",
|
|
275
|
+
"pattern": "^[0-9]+(\\.[0-9]+)?(s|m|h|d|w)$"
|
|
276
|
+
}
|
|
277
|
+
]
|
|
278
|
+
},
|
|
279
|
+
"time": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"description": "\"publish\" (the moment it goes live), \"publish+7d\", or a date and time like \"2026-11-01T18:00:00Z\".",
|
|
282
|
+
"pattern": "^(publish(\\+[0-9]+(\\.[0-9]+)?(s|m|h|d|w))?|[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}(:[0-9]{2}(\\.[0-9]+)?)?(Z|[+-][0-9]{2}:[0-9]{2}))$"
|
|
283
|
+
},
|
|
284
|
+
"destination": {
|
|
285
|
+
"type": "string",
|
|
286
|
+
"description": "Where a share goes: \"burn\", \"treasury\" (the game's), \"pool:<key>\", \"wallet:<address>\" (a partner, a creator, a charity: the program pays their own account for the currency, and opens it when it is not there), \"account:<token account address>\" (an existing token account of that currency), \"holder:<collectible address>\" (whoever holds that collectible at the time), \"lottery:<key>\" (that lottery's pot), \"farm:<key>\" (that farm's rewards vault, shared by its stakers), or, in a box's or a lottery's split, \"chosen\" (a wallet the buyer names when they buy: a referrer, a streamer) or \"chosen:<item key>\" (whoever holds the collectible of that item the buyer names: the plot they build on; the buyer must name one a player holds, or the purchase is refused); in a payment's split, \"chosen\" only (a wallet the payer names each time they pay, never their own). A share that can't be paid (its wallet has no account, nobody holds the collectible) goes to the treasury instead; a sale never fails over it.",
|
|
287
|
+
"pattern": "^(burn|treasury|chosen|chosen:[a-z][a-z0-9-]{0,31}|pool:[a-z][a-z0-9-]{0,31}|lottery:[a-z][a-z0-9-]{0,31}|farm:[a-z][a-z0-9-]{0,31}|wallet:[1-9A-HJ-NP-Za-km-z]{32,44}|account:[1-9A-HJ-NP-Za-km-z]{32,44}|holder:[1-9A-HJ-NP-Za-km-z]{32,44})$"
|
|
288
|
+
},
|
|
289
|
+
"share": {
|
|
290
|
+
"type": "object",
|
|
291
|
+
"required": [
|
|
292
|
+
"to",
|
|
293
|
+
"percent"
|
|
294
|
+
],
|
|
295
|
+
"additionalProperties": false,
|
|
296
|
+
"properties": {
|
|
297
|
+
"to": {
|
|
298
|
+
"$ref": "#/$defs/destination"
|
|
299
|
+
},
|
|
300
|
+
"percent": {
|
|
301
|
+
"$ref": "#/$defs/percent"
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
},
|
|
305
|
+
"split": {
|
|
306
|
+
"type": "array",
|
|
307
|
+
"items": {
|
|
308
|
+
"$ref": "#/$defs/share"
|
|
309
|
+
},
|
|
310
|
+
"description": "Up to four shares of each payment. What they leave goes to the game's treasury."
|
|
311
|
+
},
|
|
312
|
+
"rise": {
|
|
313
|
+
"type": "object",
|
|
314
|
+
"additionalProperties": false,
|
|
315
|
+
"description": "The price rises after every sale: price + step + price × growthPercent.",
|
|
316
|
+
"properties": {
|
|
317
|
+
"step": {
|
|
318
|
+
"$ref": "#/$defs/amount"
|
|
319
|
+
},
|
|
320
|
+
"growthPercent": {
|
|
321
|
+
"$ref": "#/$defs/percent"
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
},
|
|
325
|
+
"fall": {
|
|
326
|
+
"type": "object",
|
|
327
|
+
"required": [
|
|
328
|
+
"step",
|
|
329
|
+
"every"
|
|
330
|
+
],
|
|
331
|
+
"additionalProperties": false,
|
|
332
|
+
"description": "The price falls by `step` every `every`, from `start`, never below `floor`. A sale does not put the price back up: it stays at what was paid. By default (\"clock\": \"sale\") the next step comes `every` after that sale, so steady sales hold the price where it is. With \"clock\": \"shared\" the steps keep their own clock, sales or not: a Dutch drop that keeps falling however often it sells.",
|
|
333
|
+
"properties": {
|
|
334
|
+
"step": {
|
|
335
|
+
"$ref": "#/$defs/amount"
|
|
336
|
+
},
|
|
337
|
+
"every": {
|
|
338
|
+
"$ref": "#/$defs/duration"
|
|
339
|
+
},
|
|
340
|
+
"floor": {
|
|
341
|
+
"$ref": "#/$defs/amount"
|
|
342
|
+
},
|
|
343
|
+
"start": {
|
|
344
|
+
"$ref": "#/$defs/time"
|
|
345
|
+
},
|
|
346
|
+
"clock": {
|
|
347
|
+
"enum": [
|
|
348
|
+
"sale",
|
|
349
|
+
"shared"
|
|
350
|
+
],
|
|
351
|
+
"default": "sale"
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
"life": {
|
|
356
|
+
"type": "object",
|
|
357
|
+
"additionalProperties": false,
|
|
358
|
+
"description": "When a recipe may take a collectible of this item. The kit writes it into each recipe that takes the item, as needs and raises on the collectible (a recipe line that burns, uses, renews or takes it staked): `readyAfter` (its `made` time at least that long ago) and `lasts` (made less than that long ago) on every such line; `uses` (its `used` count raised by one, up to it: the craft is refused past it, MaxedOut) and `cooldown` (its `next_use` time passed, then set that far from now) on a line that uses it or takes it staked; a renew line counts its uses from zero again. 0 switches a rule off. A recipe can be edited at any time, and so can the life it carries.",
|
|
359
|
+
"properties": {
|
|
360
|
+
"readyAfter": {
|
|
361
|
+
"$ref": "#/$defs/duration"
|
|
362
|
+
},
|
|
363
|
+
"lasts": {
|
|
364
|
+
"$ref": "#/$defs/duration"
|
|
365
|
+
},
|
|
366
|
+
"uses": {
|
|
367
|
+
"type": "integer",
|
|
368
|
+
"minimum": 0,
|
|
369
|
+
"maximum": 4294967295
|
|
370
|
+
},
|
|
371
|
+
"cooldown": {
|
|
372
|
+
"$ref": "#/$defs/duration"
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
},
|
|
376
|
+
"token": {
|
|
377
|
+
"type": "object",
|
|
378
|
+
"required": [
|
|
379
|
+
"key",
|
|
380
|
+
"source"
|
|
381
|
+
],
|
|
382
|
+
"additionalProperties": false,
|
|
383
|
+
"description": "A currency. `sol`: SOL (players pay in wrapped SOL). `existing`: any mint by address, launched anywhere, classic or Token-2022, pump.fun included (games.fun takes no share of its fees). `project` (`game` is its older spelling): a token made when the economy goes live: the project mints it as its rules say (points, tickets, shards), or, with `supply`, a fixed supply minted once to the owner (a community token you keep).",
|
|
384
|
+
"properties": {
|
|
385
|
+
"key": {
|
|
386
|
+
"$ref": "#/$defs/key"
|
|
387
|
+
},
|
|
388
|
+
"source": {
|
|
389
|
+
"enum": [
|
|
390
|
+
"sol",
|
|
391
|
+
"existing",
|
|
392
|
+
"project",
|
|
393
|
+
"game"
|
|
394
|
+
],
|
|
395
|
+
"description": "`project` (`game` is its older spelling): a token made when the economy goes live, which the project mints. Such a token names no `mint`: the setup makes it."
|
|
396
|
+
},
|
|
397
|
+
"name": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"maxLength": 32
|
|
400
|
+
},
|
|
401
|
+
"symbol": {
|
|
402
|
+
"type": "string",
|
|
403
|
+
"maxLength": 10
|
|
404
|
+
},
|
|
405
|
+
"decimals": {
|
|
406
|
+
"type": "integer",
|
|
407
|
+
"minimum": 0,
|
|
408
|
+
"maximum": 18
|
|
409
|
+
},
|
|
410
|
+
"supply": {
|
|
411
|
+
"$ref": "#/$defs/amount",
|
|
412
|
+
"description": "`project` only: a fixed supply. Going live makes the token, mints all of it to the owner's wallet and turns minting off for good, so nobody (the project included) can ever make more. Pools are seeded from it. Leave it out for a token the project mints as its rules say (points, rewards, an emission)."
|
|
413
|
+
},
|
|
414
|
+
"program": {
|
|
415
|
+
"enum": [
|
|
416
|
+
"spl-token",
|
|
417
|
+
"token-2022"
|
|
418
|
+
],
|
|
419
|
+
"default": "spl-token"
|
|
420
|
+
},
|
|
421
|
+
"mint": {
|
|
422
|
+
"$ref": "#/$defs/address"
|
|
423
|
+
},
|
|
424
|
+
"venue": {
|
|
425
|
+
"enum": [
|
|
426
|
+
"games.fun",
|
|
427
|
+
"pump.fun",
|
|
428
|
+
"meteora",
|
|
429
|
+
"other"
|
|
430
|
+
],
|
|
431
|
+
"description": "Where the token trades, recorded for the app and not read or enforced by the tools: loot doesn't launch or trade tokens. A token launched elsewhere is `existing`, by its mint."
|
|
432
|
+
},
|
|
433
|
+
"uri": {
|
|
434
|
+
"$ref": "#/$defs/link"
|
|
435
|
+
},
|
|
436
|
+
"image": {
|
|
437
|
+
"$ref": "#/$defs/link",
|
|
438
|
+
"description": "A picture of it, recorded for the app: the tools don't read it, and the setup doesn't write it to the mint."
|
|
439
|
+
},
|
|
440
|
+
"powers": {
|
|
441
|
+
"type": "object",
|
|
442
|
+
"additionalProperties": false,
|
|
443
|
+
"description": "What the mint's own keys can do, as far as the creator knows. The checker warns about each one.",
|
|
444
|
+
"properties": {
|
|
445
|
+
"mintAuthority": {
|
|
446
|
+
"enum": [
|
|
447
|
+
"game",
|
|
448
|
+
"someone else",
|
|
449
|
+
"none",
|
|
450
|
+
"project"
|
|
451
|
+
]
|
|
452
|
+
},
|
|
453
|
+
"freeze": {
|
|
454
|
+
"type": "boolean"
|
|
455
|
+
},
|
|
456
|
+
"permanentDelegate": {
|
|
457
|
+
"type": "boolean"
|
|
458
|
+
},
|
|
459
|
+
"transferHook": {
|
|
460
|
+
"type": "boolean"
|
|
461
|
+
},
|
|
462
|
+
"transferFeePercent": {
|
|
463
|
+
"$ref": "#/$defs/percent"
|
|
464
|
+
},
|
|
465
|
+
"pausable": {
|
|
466
|
+
"type": "boolean"
|
|
467
|
+
},
|
|
468
|
+
"defaultFrozen": {
|
|
469
|
+
"type": "boolean"
|
|
470
|
+
},
|
|
471
|
+
"defaultState": {
|
|
472
|
+
"type": "boolean",
|
|
473
|
+
"description": "The mint carries Token-2022's DefaultAccountState, whatever it is set to. With a freeze authority it can be switched to frozen: auctions, contests, lotteries and sealed schedules refuse it."
|
|
474
|
+
},
|
|
475
|
+
"nonTransferable": {
|
|
476
|
+
"type": "boolean"
|
|
477
|
+
},
|
|
478
|
+
"confidentialTransfers": {
|
|
479
|
+
"type": "boolean",
|
|
480
|
+
"description": "Its holders can turn plain transfers away (Token-2022 confidential transfers): lotteries, contests and auctions refuse it."
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
"collection": {
|
|
487
|
+
"type": "object",
|
|
488
|
+
"required": [
|
|
489
|
+
"name"
|
|
490
|
+
],
|
|
491
|
+
"additionalProperties": false,
|
|
492
|
+
"description": "The Metaplex Core collection the game's collectibles are minted into.",
|
|
493
|
+
"properties": {
|
|
494
|
+
"name": {
|
|
495
|
+
"type": "string",
|
|
496
|
+
"maxLength": 32
|
|
497
|
+
},
|
|
498
|
+
"description": {
|
|
499
|
+
"$ref": "#/$defs/words"
|
|
500
|
+
},
|
|
501
|
+
"royaltyPercent": {
|
|
502
|
+
"type": "number",
|
|
503
|
+
"minimum": 0,
|
|
504
|
+
"maximum": 25,
|
|
505
|
+
"default": 5
|
|
506
|
+
},
|
|
507
|
+
"uri": {
|
|
508
|
+
"$ref": "#/$defs/link"
|
|
509
|
+
},
|
|
510
|
+
"image": {
|
|
511
|
+
"$ref": "#/$defs/link",
|
|
512
|
+
"description": "A picture of it, recorded for the app: the tools don't read it, and the setup doesn't write it to the collection (its `uri` is what it gets)."
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
"item": {
|
|
517
|
+
"type": "object",
|
|
518
|
+
"required": [
|
|
519
|
+
"key",
|
|
520
|
+
"name"
|
|
521
|
+
],
|
|
522
|
+
"additionalProperties": false,
|
|
523
|
+
"properties": {
|
|
524
|
+
"key": {
|
|
525
|
+
"$ref": "#/$defs/key"
|
|
526
|
+
},
|
|
527
|
+
"id": {
|
|
528
|
+
"type": "integer",
|
|
529
|
+
"minimum": 1,
|
|
530
|
+
"maximum": 4294967295,
|
|
531
|
+
"description": "The program's number for it. Written when it goes live; never change it after."
|
|
532
|
+
},
|
|
533
|
+
"name": {
|
|
534
|
+
"type": "string"
|
|
535
|
+
},
|
|
536
|
+
"description": {
|
|
537
|
+
"$ref": "#/$defs/words"
|
|
538
|
+
},
|
|
539
|
+
"kind": {
|
|
540
|
+
"enum": [
|
|
541
|
+
"collectible",
|
|
542
|
+
"normal"
|
|
543
|
+
],
|
|
544
|
+
"default": "collectible",
|
|
545
|
+
"description": "A collectible is minted to the player's wallet; a normal item lives in the project's own backend and the chain records the sale."
|
|
546
|
+
},
|
|
547
|
+
"rarity": {
|
|
548
|
+
"anyOf": [
|
|
549
|
+
{
|
|
550
|
+
"enum": [
|
|
551
|
+
"Common",
|
|
552
|
+
"Uncommon",
|
|
553
|
+
"Rare",
|
|
554
|
+
"Epic",
|
|
555
|
+
"Legendary",
|
|
556
|
+
"Mythic"
|
|
557
|
+
]
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
"type": "integer",
|
|
561
|
+
"minimum": 0,
|
|
562
|
+
"maximum": 255
|
|
563
|
+
}
|
|
564
|
+
],
|
|
565
|
+
"default": "Common"
|
|
566
|
+
},
|
|
567
|
+
"soulbound": {
|
|
568
|
+
"type": "boolean",
|
|
569
|
+
"default": false
|
|
570
|
+
},
|
|
571
|
+
"burnable": {
|
|
572
|
+
"type": "boolean",
|
|
573
|
+
"default": false,
|
|
574
|
+
"description": "The authority may burn it later (a decision that unmakes)."
|
|
575
|
+
},
|
|
576
|
+
"supply": {
|
|
577
|
+
"type": "integer",
|
|
578
|
+
"minimum": 0,
|
|
579
|
+
"maximum": 4294967295,
|
|
580
|
+
"default": 0,
|
|
581
|
+
"description": "0 is unlimited."
|
|
582
|
+
},
|
|
583
|
+
"price": {
|
|
584
|
+
"$ref": "#/$defs/amount",
|
|
585
|
+
"description": "In the game's currency: puts the item in the shop (a box of one entry). 0 keeps it out of the shop unless `free` is true."
|
|
586
|
+
},
|
|
587
|
+
"rise": {
|
|
588
|
+
"$ref": "#/$defs/rise"
|
|
589
|
+
},
|
|
590
|
+
"fall": {
|
|
591
|
+
"$ref": "#/$defs/fall"
|
|
592
|
+
},
|
|
593
|
+
"life": {
|
|
594
|
+
"$ref": "#/$defs/life"
|
|
595
|
+
},
|
|
596
|
+
"active": {
|
|
597
|
+
"type": "boolean",
|
|
598
|
+
"default": true
|
|
599
|
+
},
|
|
600
|
+
"split": {
|
|
601
|
+
"$ref": "#/$defs/split"
|
|
602
|
+
},
|
|
603
|
+
"value": {
|
|
604
|
+
"$ref": "#/$defs/amount",
|
|
605
|
+
"description": "What the creator thinks one is worth in the game's currency, for the simulation only."
|
|
606
|
+
},
|
|
607
|
+
"uri": {
|
|
608
|
+
"$ref": "#/$defs/link",
|
|
609
|
+
"description": "Its metadata. `{serial}` in it is each unit's serial, so each unit can have its own art (`https://…/hero/{serial}.json`)."
|
|
610
|
+
},
|
|
611
|
+
"image": {
|
|
612
|
+
"$ref": "#/$defs/link",
|
|
613
|
+
"description": "A picture of it, recorded for the app: the tools don't read it, and the program keeps only `uri`."
|
|
614
|
+
},
|
|
615
|
+
"look": {
|
|
616
|
+
"type": "object",
|
|
617
|
+
"description": "What owning it changes in a game (free-form), recorded for the game to read: the tools don't read or enforce it."
|
|
618
|
+
},
|
|
619
|
+
"free": {
|
|
620
|
+
"type": "boolean",
|
|
621
|
+
"default": false,
|
|
622
|
+
"description": "List it in the shop at price 0: players pay only the network and platform fees."
|
|
623
|
+
},
|
|
624
|
+
"gate": {
|
|
625
|
+
"$ref": "#/$defs/gate"
|
|
626
|
+
},
|
|
627
|
+
"shopBox": {
|
|
628
|
+
"type": "integer",
|
|
629
|
+
"minimum": 1,
|
|
630
|
+
"maximum": 4294967295,
|
|
631
|
+
"description": "The program's number for its shop listing (a box). Written when it goes live; never change it after."
|
|
632
|
+
},
|
|
633
|
+
"opens": {
|
|
634
|
+
"$ref": "#/$defs/time",
|
|
635
|
+
"description": "When it starts selling (or crafting). Default: at once."
|
|
636
|
+
},
|
|
637
|
+
"closes": {
|
|
638
|
+
"$ref": "#/$defs/time",
|
|
639
|
+
"description": "When it stops. Default: never."
|
|
640
|
+
},
|
|
641
|
+
"perWallet": {
|
|
642
|
+
"type": "integer",
|
|
643
|
+
"minimum": 0,
|
|
644
|
+
"maximum": 4294967295,
|
|
645
|
+
"description": "How many one wallet may buy (or craft) in all. 0 or absent: no limit. A wallet's first purchase pays a little rent for its count."
|
|
646
|
+
},
|
|
647
|
+
"perWalletEach": {
|
|
648
|
+
"$ref": "#/$defs/perWalletEach"
|
|
649
|
+
},
|
|
650
|
+
"collection": {
|
|
651
|
+
"$ref": "#/$defs/address",
|
|
652
|
+
"description": "A collectible's collection: one of `collections`. Default: the one the setup makes."
|
|
653
|
+
},
|
|
654
|
+
"drawn": {
|
|
655
|
+
"type": "array",
|
|
656
|
+
"description": "A fresh collectible: at most 64 traits drawn for each unit, in order, written on it, each attribute's name at most 64 bytes. Each from a table (`\"table\": key`, a row by weight among those in stock, drawn atomically with the box's roll) or a range (`\"min\"`/`\"max\"`, every whole number as likely, drawn at the mint from the same answer). Its name and link may contain `{attribute}` for each, beside `{serial}`. A fresh item is given only by a box's roll.",
|
|
657
|
+
"items": {
|
|
658
|
+
"type": "object",
|
|
659
|
+
"additionalProperties": false,
|
|
660
|
+
"required": [
|
|
661
|
+
"attribute"
|
|
662
|
+
],
|
|
663
|
+
"properties": {
|
|
664
|
+
"attribute": {
|
|
665
|
+
"type": "string",
|
|
666
|
+
"minLength": 1
|
|
667
|
+
},
|
|
668
|
+
"table": {
|
|
669
|
+
"$ref": "#/$defs/key"
|
|
670
|
+
},
|
|
671
|
+
"min": {
|
|
672
|
+
"type": "integer",
|
|
673
|
+
"minimum": 0
|
|
674
|
+
},
|
|
675
|
+
"max": {
|
|
676
|
+
"type": "integer",
|
|
677
|
+
"minimum": 0
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
}
|
|
682
|
+
}
|
|
683
|
+
},
|
|
684
|
+
"pool": {
|
|
685
|
+
"type": "object",
|
|
686
|
+
"required": [
|
|
687
|
+
"key",
|
|
688
|
+
"currency"
|
|
689
|
+
],
|
|
690
|
+
"additionalProperties": false,
|
|
691
|
+
"description": "A vault only the game can spend from: a prize pool, a lottery's pot, stakers' rewards.",
|
|
692
|
+
"properties": {
|
|
693
|
+
"key": {
|
|
694
|
+
"$ref": "#/$defs/key"
|
|
695
|
+
},
|
|
696
|
+
"index": {
|
|
697
|
+
"type": "integer",
|
|
698
|
+
"minimum": 0,
|
|
699
|
+
"maximum": 255,
|
|
700
|
+
"description": "The program's number for it. Written when it goes live."
|
|
701
|
+
},
|
|
702
|
+
"currency": {
|
|
703
|
+
"$ref": "#/$defs/key"
|
|
704
|
+
},
|
|
705
|
+
"seed": {
|
|
706
|
+
"$ref": "#/$defs/amount",
|
|
707
|
+
"description": "What the creator puts in when it goes live."
|
|
708
|
+
},
|
|
709
|
+
"about": {
|
|
710
|
+
"$ref": "#/$defs/words"
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
"outcome": {
|
|
715
|
+
"type": "object",
|
|
716
|
+
"required": [
|
|
717
|
+
"gives"
|
|
718
|
+
],
|
|
719
|
+
"additionalProperties": false,
|
|
720
|
+
"description": "One way a box can land: an item, a fixed amount of tokens from a pool (`pay`) or minted (`tokens`), all of it or none, an NFT of a stash at random (`stash`) or a named one (`nft`), a roll of another box (`roll`), any number of them together (`bundle`), or nothing. Give every outcome a `chance` (percents that add up to 100) or every one a `weight`. In a box that rolls on an NFT (`rollsOn`), an outcome can also move numbers on it (`shifts`) and say where it goes (`then`). A box of one outcome that needs no chance sells in one step (`buy`): no order, no settle. A box burns its price with a \"burn\" share in its `split`, whatever the roll gives.",
|
|
721
|
+
"properties": {
|
|
722
|
+
"gives": {
|
|
723
|
+
"enum": [
|
|
724
|
+
"item",
|
|
725
|
+
"pay",
|
|
726
|
+
"stash",
|
|
727
|
+
"tokens",
|
|
728
|
+
"nft",
|
|
729
|
+
"roll",
|
|
730
|
+
"bundle",
|
|
731
|
+
"nothing"
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
"chance": {
|
|
735
|
+
"type": "number",
|
|
736
|
+
"exclusiveMinimum": 0,
|
|
737
|
+
"maximum": 100
|
|
738
|
+
},
|
|
739
|
+
"weight": {
|
|
740
|
+
"type": "integer",
|
|
741
|
+
"minimum": 1,
|
|
742
|
+
"maximum": 4294967295
|
|
743
|
+
},
|
|
744
|
+
"item": {
|
|
745
|
+
"$ref": "#/$defs/key"
|
|
746
|
+
},
|
|
747
|
+
"pool": {
|
|
748
|
+
"$ref": "#/$defs/key"
|
|
749
|
+
},
|
|
750
|
+
"amount": {
|
|
751
|
+
"$ref": "#/$defs/amount"
|
|
752
|
+
},
|
|
753
|
+
"shifts": {
|
|
754
|
+
"type": "array",
|
|
755
|
+
"description": "For a box that rolls on an NFT (`rollsOn`): numbers this outcome moves on it (+1 level, -2 affection), never below 0, and never above `upTo` when raising. Written on the NFT when the game has authority over it, in its Sheet otherwise. With `fromNow`, a time: a day in jail from now.",
|
|
756
|
+
"items": {
|
|
757
|
+
"type": "object",
|
|
758
|
+
"additionalProperties": false,
|
|
759
|
+
"required": [
|
|
760
|
+
"attribute",
|
|
761
|
+
"by"
|
|
762
|
+
],
|
|
763
|
+
"properties": {
|
|
764
|
+
"attribute": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"minLength": 1
|
|
767
|
+
},
|
|
768
|
+
"by": {
|
|
769
|
+
"anyOf": [
|
|
770
|
+
{
|
|
771
|
+
"type": "integer",
|
|
772
|
+
"minimum": -2147483648,
|
|
773
|
+
"maximum": 2147483647,
|
|
774
|
+
"not": {
|
|
775
|
+
"const": 0
|
|
776
|
+
}
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"type": "string",
|
|
780
|
+
"pattern": "^-?[0-9]+(\\.[0-9]+)?(s|m|h|d|w)$"
|
|
781
|
+
}
|
|
782
|
+
],
|
|
783
|
+
"description": "How much more (or, below 0, less). With `fromNow`, a duration: \"1d\"."
|
|
784
|
+
},
|
|
785
|
+
"upTo": {
|
|
786
|
+
"anyOf": [
|
|
787
|
+
{
|
|
788
|
+
"type": "integer",
|
|
789
|
+
"minimum": 1,
|
|
790
|
+
"maximum": 4294967295
|
|
791
|
+
},
|
|
792
|
+
{
|
|
793
|
+
"$ref": "#/$defs/duration"
|
|
794
|
+
}
|
|
795
|
+
],
|
|
796
|
+
"description": "The most it reaches when raising; left out, no cap. With `fromNow`, how far past now."
|
|
797
|
+
},
|
|
798
|
+
"fromNow": {
|
|
799
|
+
"type": "boolean",
|
|
800
|
+
"default": false,
|
|
801
|
+
"description": "The attribute is a time: moved from now when it is already past, and raised no further than `upTo` past now (a day in jail: \"by\": \"1d\", \"upTo\": \"1d\")."
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
},
|
|
806
|
+
"then": {
|
|
807
|
+
"description": "For a box that rolls on an NFT: where the NFT goes after this outcome. \"back\" (the default) to whoever brought it; \"burn\" (a Core asset burned; any other kind sent to the incinerator's address, where nobody can move it); \"treasury\" to the game's treasury wallet; { \"giveTo\": \"<wallet>\" } to that wallet. A box with any outcome that burns or gives the NFT away takes it into the game's hands when it is rolled, until the roll is settled (a custodial route). { \"stash\": \"<key>\" }: into one of the spec's stashes, a trade-in that becomes another player's prize.",
|
|
808
|
+
"anyOf": [
|
|
809
|
+
{
|
|
810
|
+
"enum": [
|
|
811
|
+
"back",
|
|
812
|
+
"burn",
|
|
813
|
+
"treasury"
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
"type": "object",
|
|
818
|
+
"additionalProperties": false,
|
|
819
|
+
"required": [
|
|
820
|
+
"giveTo"
|
|
821
|
+
],
|
|
822
|
+
"properties": {
|
|
823
|
+
"giveTo": {
|
|
824
|
+
"$ref": "#/$defs/address"
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
"type": "object",
|
|
830
|
+
"additionalProperties": false,
|
|
831
|
+
"required": [
|
|
832
|
+
"stash"
|
|
833
|
+
],
|
|
834
|
+
"properties": {
|
|
835
|
+
"stash": {
|
|
836
|
+
"$ref": "#/$defs/key"
|
|
837
|
+
}
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
]
|
|
841
|
+
},
|
|
842
|
+
"stash": {
|
|
843
|
+
"$ref": "#/$defs/key",
|
|
844
|
+
"description": "For stash: the stash one NFT of which this outcome gives, picked at random when the box is rolled (a box of one such outcome is still rolled by the oracle). For nft: the stash that lists `nft`."
|
|
845
|
+
},
|
|
846
|
+
"from": {
|
|
847
|
+
"type": "string",
|
|
848
|
+
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$",
|
|
849
|
+
"description": "For tokens: \"mint\" (minted, in `currency`, a token the project mints) or \"pool:<key>\"."
|
|
850
|
+
},
|
|
851
|
+
"currency": {
|
|
852
|
+
"$ref": "#/$defs/key",
|
|
853
|
+
"description": "For tokens minted: the token. Default: the project's currency."
|
|
854
|
+
},
|
|
855
|
+
"nft": {
|
|
856
|
+
"$ref": "#/$defs/address",
|
|
857
|
+
"description": "For nft: the NFT, which the stash `stash` lists."
|
|
858
|
+
},
|
|
859
|
+
"box": {
|
|
860
|
+
"$ref": "#/$defs/key",
|
|
861
|
+
"description": "For roll: the box rolled for the player when the order settles."
|
|
862
|
+
},
|
|
863
|
+
"prizes": {
|
|
864
|
+
"type": "array",
|
|
865
|
+
"minItems": 1,
|
|
866
|
+
"description": "For bundle: what it gives together, any number: each { gives: item | pay | share | stash | tokens | nft | roll, … } as an outcome of one says.",
|
|
867
|
+
"items": {
|
|
868
|
+
"type": "object",
|
|
869
|
+
"required": [
|
|
870
|
+
"gives"
|
|
871
|
+
],
|
|
872
|
+
"additionalProperties": false,
|
|
873
|
+
"properties": {
|
|
874
|
+
"item": {
|
|
875
|
+
"$ref": "#/$defs/key"
|
|
876
|
+
},
|
|
877
|
+
"pool": {
|
|
878
|
+
"$ref": "#/$defs/key"
|
|
879
|
+
},
|
|
880
|
+
"amount": {
|
|
881
|
+
"$ref": "#/$defs/amount"
|
|
882
|
+
},
|
|
883
|
+
"stash": {
|
|
884
|
+
"$ref": "#/$defs/key",
|
|
885
|
+
"description": "For stash: the stash one NFT of which this outcome gives, picked at random when the box is rolled (a box of one such outcome is still rolled by the oracle). For nft: the stash that lists `nft`."
|
|
886
|
+
},
|
|
887
|
+
"from": {
|
|
888
|
+
"type": "string",
|
|
889
|
+
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$",
|
|
890
|
+
"description": "For tokens: \"mint\" (minted, in `currency`, a token the project mints) or \"pool:<key>\"."
|
|
891
|
+
},
|
|
892
|
+
"currency": {
|
|
893
|
+
"$ref": "#/$defs/key",
|
|
894
|
+
"description": "For tokens minted: the token. Default: the project's currency."
|
|
895
|
+
},
|
|
896
|
+
"nft": {
|
|
897
|
+
"$ref": "#/$defs/address",
|
|
898
|
+
"description": "For nft: the NFT, which the stash `stash` lists."
|
|
899
|
+
},
|
|
900
|
+
"box": {
|
|
901
|
+
"$ref": "#/$defs/key",
|
|
902
|
+
"description": "For roll: the box rolled for the player when the order settles."
|
|
903
|
+
},
|
|
904
|
+
"gives": {
|
|
905
|
+
"enum": [
|
|
906
|
+
"item",
|
|
907
|
+
"pay",
|
|
908
|
+
"stash",
|
|
909
|
+
"tokens",
|
|
910
|
+
"nft",
|
|
911
|
+
"roll"
|
|
912
|
+
]
|
|
913
|
+
},
|
|
914
|
+
"compressed": {
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted at the settle into the project's tree (`compressedTree`) instead of a Core asset. A plain one holds no collectible's rent; a fresh one's drawn traits are written in the project's Sheet for it, its rent held by the order until the settle."
|
|
917
|
+
}
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
},
|
|
921
|
+
"compressed": {
|
|
922
|
+
"type": "boolean",
|
|
923
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted at the settle into the project's tree (`compressedTree`) instead of a Core asset. A plain one holds no collectible's rent; a fresh one's drawn traits are written in the project's Sheet for it, its rent held by the order until the settle."
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
"box": {
|
|
928
|
+
"type": "object",
|
|
929
|
+
"required": [
|
|
930
|
+
"key",
|
|
931
|
+
"name",
|
|
932
|
+
"price",
|
|
933
|
+
"outcomes"
|
|
934
|
+
],
|
|
935
|
+
"additionalProperties": false,
|
|
936
|
+
"properties": {
|
|
937
|
+
"key": {
|
|
938
|
+
"$ref": "#/$defs/key"
|
|
939
|
+
},
|
|
940
|
+
"id": {
|
|
941
|
+
"type": "integer",
|
|
942
|
+
"minimum": 1,
|
|
943
|
+
"maximum": 4294967295
|
|
944
|
+
},
|
|
945
|
+
"name": {
|
|
946
|
+
"type": "string",
|
|
947
|
+
"maxLength": 40
|
|
948
|
+
},
|
|
949
|
+
"price": {
|
|
950
|
+
"$ref": "#/$defs/amount",
|
|
951
|
+
"description": "0 is a free box: players pay only the fees."
|
|
952
|
+
},
|
|
953
|
+
"currency": {
|
|
954
|
+
"$ref": "#/$defs/key",
|
|
955
|
+
"description": "Default: the project's currency. In another one, what the split leaves goes to the treasury wallet in that currency."
|
|
956
|
+
},
|
|
957
|
+
"rise": {
|
|
958
|
+
"$ref": "#/$defs/rise"
|
|
959
|
+
},
|
|
960
|
+
"fall": {
|
|
961
|
+
"$ref": "#/$defs/fall"
|
|
962
|
+
},
|
|
963
|
+
"stockOdds": {
|
|
964
|
+
"type": "boolean",
|
|
965
|
+
"default": false,
|
|
966
|
+
"description": "Each item's chance shrinks with what is left of its supply."
|
|
967
|
+
},
|
|
968
|
+
"whenOut": {
|
|
969
|
+
"enum": [
|
|
970
|
+
"stopSales",
|
|
971
|
+
"drawLeft"
|
|
972
|
+
],
|
|
973
|
+
"default": "stopSales",
|
|
974
|
+
"description": "What a box that rolls does once an outcome can't be given (an item sold out, a pool short of its prize, a stash empty). \"stopSales\" (the default): it isn't sold while any outcome couldn't cover this purchase's draws and those of purchases still waiting for their answer, so every roll is on the odds written, and the project restocks or edits the box to sell again. \"drawLeft\": it keeps selling, and a roll draws among the outcomes still there by their written weights, so the others' chances rise as one runs out: a player can empty a common outcome to make a rare one likelier. A box selling a rare prize keeps \"stopSales\"."
|
|
975
|
+
},
|
|
976
|
+
"active": {
|
|
977
|
+
"type": "boolean",
|
|
978
|
+
"default": true,
|
|
979
|
+
"description": "Switched off, nobody opens it: a box only missions, recipes or prizes (a grant, a lottery's place, a contest, an auction) roll."
|
|
980
|
+
},
|
|
981
|
+
"split": {
|
|
982
|
+
"$ref": "#/$defs/split"
|
|
983
|
+
},
|
|
984
|
+
"outcomes": {
|
|
985
|
+
"type": "array",
|
|
986
|
+
"minItems": 1,
|
|
987
|
+
"items": {
|
|
988
|
+
"$ref": "#/$defs/outcome"
|
|
989
|
+
}
|
|
990
|
+
},
|
|
991
|
+
"gate": {
|
|
992
|
+
"$ref": "#/$defs/gate",
|
|
993
|
+
"description": "Only players who show such a collectible can open it."
|
|
994
|
+
},
|
|
995
|
+
"odds": {
|
|
996
|
+
"type": "array",
|
|
997
|
+
"items": {
|
|
998
|
+
"$ref": "#/$defs/odds"
|
|
999
|
+
}
|
|
1000
|
+
},
|
|
1001
|
+
"opens": {
|
|
1002
|
+
"$ref": "#/$defs/time",
|
|
1003
|
+
"description": "When it starts selling (or crafting). Default: at once."
|
|
1004
|
+
},
|
|
1005
|
+
"closes": {
|
|
1006
|
+
"$ref": "#/$defs/time",
|
|
1007
|
+
"description": "When it stops. Default: never."
|
|
1008
|
+
},
|
|
1009
|
+
"perWallet": {
|
|
1010
|
+
"type": "integer",
|
|
1011
|
+
"minimum": 0,
|
|
1012
|
+
"maximum": 4294967295,
|
|
1013
|
+
"description": "How many one wallet may buy (or craft) in all. 0 or absent: no limit. A wallet's first purchase pays a little rent for its count."
|
|
1014
|
+
},
|
|
1015
|
+
"perWalletEach": {
|
|
1016
|
+
"$ref": "#/$defs/perWalletEach"
|
|
1017
|
+
},
|
|
1018
|
+
"rollsOn": {
|
|
1019
|
+
"$ref": "#/$defs/rule",
|
|
1020
|
+
"description": "The NFT the box rolls on: one the player brings (when it is opened), the NFT leaving a mission (a farm tier's `roll`) or one a recipe keeps (an output `roll`), which must pass this rule. Its outcomes' `shifts` and `then` act on it, and its `odds` read it. A box only missions or recipes roll is left `active: false`, so nobody opens it directly."
|
|
1021
|
+
},
|
|
1022
|
+
"then": {
|
|
1023
|
+
"description": "Where the NFT it rolls on goes after an outcome that names no `then` of its own: a box that takes an NFT as its price (`rollsOn` its rule, `then` \"burn\", \"treasury\", { giveTo } or { stash }).",
|
|
1024
|
+
"anyOf": [
|
|
1025
|
+
{
|
|
1026
|
+
"enum": [
|
|
1027
|
+
"back",
|
|
1028
|
+
"burn",
|
|
1029
|
+
"treasury"
|
|
1030
|
+
]
|
|
1031
|
+
},
|
|
1032
|
+
{
|
|
1033
|
+
"type": "object",
|
|
1034
|
+
"additionalProperties": false,
|
|
1035
|
+
"required": [
|
|
1036
|
+
"giveTo"
|
|
1037
|
+
],
|
|
1038
|
+
"properties": {
|
|
1039
|
+
"giveTo": {
|
|
1040
|
+
"$ref": "#/$defs/address"
|
|
1041
|
+
}
|
|
1042
|
+
}
|
|
1043
|
+
},
|
|
1044
|
+
{
|
|
1045
|
+
"type": "object",
|
|
1046
|
+
"additionalProperties": false,
|
|
1047
|
+
"required": [
|
|
1048
|
+
"stash"
|
|
1049
|
+
],
|
|
1050
|
+
"properties": {
|
|
1051
|
+
"stash": {
|
|
1052
|
+
"$ref": "#/$defs/key"
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
}
|
|
1056
|
+
]
|
|
1057
|
+
},
|
|
1058
|
+
"slots": {
|
|
1059
|
+
"type": "array",
|
|
1060
|
+
"description": "What one open draws: each slot `count` draws among the outcomes it names (`from`: their places in `outcomes`, from 0; all when left out), and with `distinct` no outcome twice in the open. Left out, an open is one draw among every outcome. A pack of five is `[{ \"count\": 5 }]`; a guaranteed rare `[{ \"count\": 4 }, { \"count\": 1, \"from\": [8, 9, 10] }]`. A player may open several packs in one purchase.",
|
|
1061
|
+
"items": {
|
|
1062
|
+
"type": "object",
|
|
1063
|
+
"additionalProperties": false,
|
|
1064
|
+
"required": [
|
|
1065
|
+
"count"
|
|
1066
|
+
],
|
|
1067
|
+
"properties": {
|
|
1068
|
+
"count": {
|
|
1069
|
+
"type": "integer",
|
|
1070
|
+
"minimum": 1
|
|
1071
|
+
},
|
|
1072
|
+
"from": {
|
|
1073
|
+
"type": "array",
|
|
1074
|
+
"items": {
|
|
1075
|
+
"type": "integer",
|
|
1076
|
+
"minimum": 0,
|
|
1077
|
+
"maximum": 65535
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
"distinct": {
|
|
1081
|
+
"type": "boolean"
|
|
1082
|
+
},
|
|
1083
|
+
"share": {
|
|
1084
|
+
"type": "number",
|
|
1085
|
+
"minimum": 0,
|
|
1086
|
+
"maximum": 100,
|
|
1087
|
+
"description": "What this slot's draws are worth, as a percent of an open's price. Needed on every slot of a box whose slots name outcomes (`from`), 100 together: a draw that can't be made (its slot sold out) gives this share back, so a guaranteed rare keeps its value when the commons run out. Leave it out when every slot draws among all the outcomes."
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
},
|
|
1094
|
+
"payment": {
|
|
1095
|
+
"type": "object",
|
|
1096
|
+
"required": [
|
|
1097
|
+
"key",
|
|
1098
|
+
"name",
|
|
1099
|
+
"amount"
|
|
1100
|
+
],
|
|
1101
|
+
"additionalProperties": false,
|
|
1102
|
+
"description": "A payment a player signs for something the game gives off chain: an entry fee, an attempt at a level, a tip.",
|
|
1103
|
+
"properties": {
|
|
1104
|
+
"key": {
|
|
1105
|
+
"$ref": "#/$defs/key"
|
|
1106
|
+
},
|
|
1107
|
+
"name": {
|
|
1108
|
+
"type": "string",
|
|
1109
|
+
"maxLength": 40
|
|
1110
|
+
},
|
|
1111
|
+
"amount": {
|
|
1112
|
+
"$ref": "#/$defs/amount",
|
|
1113
|
+
"description": "What a player pays; with `any`, the least they may pay."
|
|
1114
|
+
},
|
|
1115
|
+
"any": {
|
|
1116
|
+
"type": "boolean",
|
|
1117
|
+
"description": "The player chooses the amount, at least `amount` (a tip, a donation, pay what you want). The page keeps the least; the chain takes any amount the player signs."
|
|
1118
|
+
},
|
|
1119
|
+
"currency": {
|
|
1120
|
+
"$ref": "#/$defs/key"
|
|
1121
|
+
},
|
|
1122
|
+
"split": {
|
|
1123
|
+
"$ref": "#/$defs/split"
|
|
1124
|
+
}
|
|
1125
|
+
}
|
|
1126
|
+
},
|
|
1127
|
+
"input": {
|
|
1128
|
+
"type": "object",
|
|
1129
|
+
"required": [
|
|
1130
|
+
"takes"
|
|
1131
|
+
],
|
|
1132
|
+
"additionalProperties": false,
|
|
1133
|
+
"description": "burn: `count` collectibles of `item`, burned. use: one collectible of `item`, kept (counts a use of its life). renew: one kept, its uses counted from zero again (its `used` count). staked: one collectible of `item`, kept as `use` keeps it, that must be staked in `farm`: on its own seat in that farm of this spec, which escrows or freezes it (a watched one could be sold). A set bound into a badge takes its pieces this way and moves that farm's `lockAttribute` far ahead, so they stay staked while the badge exists; a recipe that raises anything on a staked piece must raise its farm's `lockAttribute` (to raise a stat and leave the lock alone, use `use`). show: one NFT of `collection` the player holds, kept (any Core NFT, or a Token Metadata NFT verified in it; the game's own collection when left out), read with what the game wrote in its Sheet. pay: `amount` of `currency`, sent `to` a destination. trade: one NFT of `collection` the player holds, any kind, traded in: burned, given on, or put in a stash (`then`).",
|
|
1134
|
+
"properties": {
|
|
1135
|
+
"takes": {
|
|
1136
|
+
"enum": [
|
|
1137
|
+
"burn",
|
|
1138
|
+
"use",
|
|
1139
|
+
"renew",
|
|
1140
|
+
"show",
|
|
1141
|
+
"staked",
|
|
1142
|
+
"pay",
|
|
1143
|
+
"trade"
|
|
1144
|
+
]
|
|
1145
|
+
},
|
|
1146
|
+
"item": {
|
|
1147
|
+
"$ref": "#/$defs/key"
|
|
1148
|
+
},
|
|
1149
|
+
"farm": {
|
|
1150
|
+
"$ref": "#/$defs/key",
|
|
1151
|
+
"description": "staked: the farm (its key) the collectible is staked in, a farm of collectibles that escrows or freezes it. Needed for a staked line."
|
|
1152
|
+
},
|
|
1153
|
+
"count": {
|
|
1154
|
+
"type": "integer",
|
|
1155
|
+
"minimum": 1,
|
|
1156
|
+
"maximum": 255
|
|
1157
|
+
},
|
|
1158
|
+
"amount": {
|
|
1159
|
+
"$ref": "#/$defs/amount"
|
|
1160
|
+
},
|
|
1161
|
+
"currency": {
|
|
1162
|
+
"$ref": "#/$defs/key"
|
|
1163
|
+
},
|
|
1164
|
+
"to": {
|
|
1165
|
+
"$ref": "#/$defs/destination"
|
|
1166
|
+
},
|
|
1167
|
+
"collection": {
|
|
1168
|
+
"$ref": "#/$defs/address",
|
|
1169
|
+
"description": "show, trade: the collection the NFT is of (a Core collection, or a Token Metadata collection's mint). Default: the project's own."
|
|
1170
|
+
},
|
|
1171
|
+
"then": {
|
|
1172
|
+
"$ref": "#/$defs/spend",
|
|
1173
|
+
"description": "trade: where the NFT traded in goes (default \"burn\")."
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
"output": {
|
|
1178
|
+
"type": "object",
|
|
1179
|
+
"required": [
|
|
1180
|
+
"gives"
|
|
1181
|
+
],
|
|
1182
|
+
"additionalProperties": false,
|
|
1183
|
+
"description": "A prize (see `prize`), or a roll on a collectible the recipe keeps: { \"gives\": \"roll\", \"box\": key, \"on\": place } (a risky upgrade; the player or the project’s keys ask the oracle and settle it). A craft refuses a prize it can't give (a pool that holds less, an item sold out or switched off, an NFT gone).",
|
|
1184
|
+
"properties": {
|
|
1185
|
+
"gives": {
|
|
1186
|
+
"enum": [
|
|
1187
|
+
"item",
|
|
1188
|
+
"tokens",
|
|
1189
|
+
"nft",
|
|
1190
|
+
"roll"
|
|
1191
|
+
]
|
|
1192
|
+
},
|
|
1193
|
+
"item": {
|
|
1194
|
+
"$ref": "#/$defs/key"
|
|
1195
|
+
},
|
|
1196
|
+
"compressed": {
|
|
1197
|
+
"type": "boolean",
|
|
1198
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted into the project's tree (`compressedTree`) instead of a Core asset. No rent for each one (a Core collectible's is about 0.003 SOL, paid by whoever sends the claim), so a badge or an airdrop can be given by the thousand. The item's collection must take compressed NFTs: the setup's collection does when the spec gives one before it goes live; one made without it never can. Not soulbound, and not in a box's outcomes. Once the tree is full, no more are given."
|
|
1199
|
+
},
|
|
1200
|
+
"amount": {
|
|
1201
|
+
"$ref": "#/$defs/amount"
|
|
1202
|
+
},
|
|
1203
|
+
"currency": {
|
|
1204
|
+
"$ref": "#/$defs/key",
|
|
1205
|
+
"description": "For tokens minted: the token. Default: the game's."
|
|
1206
|
+
},
|
|
1207
|
+
"from": {
|
|
1208
|
+
"type": "string",
|
|
1209
|
+
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
1210
|
+
},
|
|
1211
|
+
"box": {
|
|
1212
|
+
"$ref": "#/$defs/key",
|
|
1213
|
+
"description": "For `roll`: the box rolled, free, for the player."
|
|
1214
|
+
},
|
|
1215
|
+
"on": {
|
|
1216
|
+
"type": "integer",
|
|
1217
|
+
"minimum": 0,
|
|
1218
|
+
"maximum": 254,
|
|
1219
|
+
"description": "For `roll`: the collectible handed in and kept (its place, the first is 0) the box rolls on (a risky upgrade); left out, it rolls on nothing (a merge whose result is left to chance). One a recipe."
|
|
1220
|
+
},
|
|
1221
|
+
"stash": {
|
|
1222
|
+
"$ref": "#/$defs/key",
|
|
1223
|
+
"description": "For nft: the stash that lists it."
|
|
1224
|
+
},
|
|
1225
|
+
"nft": {
|
|
1226
|
+
"$ref": "#/$defs/address",
|
|
1227
|
+
"description": "For nft: the NFT's address (a Core asset, a Token Metadata NFT's mint)."
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
},
|
|
1231
|
+
"recipe": {
|
|
1232
|
+
"type": "object",
|
|
1233
|
+
"required": [
|
|
1234
|
+
"key",
|
|
1235
|
+
"name",
|
|
1236
|
+
"in"
|
|
1237
|
+
],
|
|
1238
|
+
"additionalProperties": false,
|
|
1239
|
+
"properties": {
|
|
1240
|
+
"key": {
|
|
1241
|
+
"$ref": "#/$defs/key"
|
|
1242
|
+
},
|
|
1243
|
+
"id": {
|
|
1244
|
+
"type": "integer",
|
|
1245
|
+
"minimum": 1,
|
|
1246
|
+
"maximum": 4294967295
|
|
1247
|
+
},
|
|
1248
|
+
"name": {
|
|
1249
|
+
"type": "string",
|
|
1250
|
+
"maxLength": 40
|
|
1251
|
+
},
|
|
1252
|
+
"active": {
|
|
1253
|
+
"type": "boolean",
|
|
1254
|
+
"default": true
|
|
1255
|
+
},
|
|
1256
|
+
"in": {
|
|
1257
|
+
"type": "array",
|
|
1258
|
+
"items": {
|
|
1259
|
+
"$ref": "#/$defs/input"
|
|
1260
|
+
}
|
|
1261
|
+
},
|
|
1262
|
+
"out": {
|
|
1263
|
+
"type": "array",
|
|
1264
|
+
"items": {
|
|
1265
|
+
"$ref": "#/$defs/output"
|
|
1266
|
+
}
|
|
1267
|
+
},
|
|
1268
|
+
"needs": {
|
|
1269
|
+
"type": "array",
|
|
1270
|
+
"items": {
|
|
1271
|
+
"type": "object",
|
|
1272
|
+
"required": [
|
|
1273
|
+
"place",
|
|
1274
|
+
"key",
|
|
1275
|
+
"atLeast"
|
|
1276
|
+
],
|
|
1277
|
+
"additionalProperties": false,
|
|
1278
|
+
"description": "The collectible handed in at `place` (the first is 0) must carry a number `key` the authority wrote of at least `atLeast`.",
|
|
1279
|
+
"properties": {
|
|
1280
|
+
"place": {
|
|
1281
|
+
"type": "integer",
|
|
1282
|
+
"minimum": 0,
|
|
1283
|
+
"maximum": 254
|
|
1284
|
+
},
|
|
1285
|
+
"key": {
|
|
1286
|
+
"type": "string",
|
|
1287
|
+
"minLength": 1
|
|
1288
|
+
},
|
|
1289
|
+
"atLeast": {
|
|
1290
|
+
"type": "integer",
|
|
1291
|
+
"minimum": 0,
|
|
1292
|
+
"maximum": 4294967295
|
|
1293
|
+
}
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
},
|
|
1297
|
+
"keeps": {
|
|
1298
|
+
"type": "array",
|
|
1299
|
+
"items": {
|
|
1300
|
+
"type": "object",
|
|
1301
|
+
"required": [
|
|
1302
|
+
"key",
|
|
1303
|
+
"from",
|
|
1304
|
+
"to"
|
|
1305
|
+
],
|
|
1306
|
+
"additionalProperties": false,
|
|
1307
|
+
"description": "The new collectible `to` (the first made is 0) takes attribute `key` from the one handed in at `from`.",
|
|
1308
|
+
"properties": {
|
|
1309
|
+
"key": {
|
|
1310
|
+
"type": "string",
|
|
1311
|
+
"minLength": 1
|
|
1312
|
+
},
|
|
1313
|
+
"from": {
|
|
1314
|
+
"type": "integer",
|
|
1315
|
+
"minimum": 0,
|
|
1316
|
+
"maximum": 254
|
|
1317
|
+
},
|
|
1318
|
+
"to": {
|
|
1319
|
+
"type": "integer",
|
|
1320
|
+
"minimum": 0,
|
|
1321
|
+
"maximum": 254
|
|
1322
|
+
}
|
|
1323
|
+
}
|
|
1324
|
+
}
|
|
1325
|
+
},
|
|
1326
|
+
"raises": {
|
|
1327
|
+
"type": "array",
|
|
1328
|
+
"description": "Numbers the recipe moves on collectibles handed in and kept (use, renew, show): a level or a stat bought with the recipe's own payment, or one it costs (a negative `by`: a merge that costs a level, never below 0). Written on the NFT when the game has authority over it, in its Sheet otherwise. One already at `upTo` is refused (MaxedOut) when raising. With `fromNow`, it moves a time: fuel for a day more (\"by\": \"1d\", \"upTo\": \"3d\"), a day off a lock (\"by\": \"-1d\").",
|
|
1329
|
+
"items": {
|
|
1330
|
+
"type": "object",
|
|
1331
|
+
"required": [
|
|
1332
|
+
"place",
|
|
1333
|
+
"key",
|
|
1334
|
+
"by"
|
|
1335
|
+
],
|
|
1336
|
+
"additionalProperties": false,
|
|
1337
|
+
"properties": {
|
|
1338
|
+
"place": {
|
|
1339
|
+
"type": "integer",
|
|
1340
|
+
"minimum": 0,
|
|
1341
|
+
"maximum": 254,
|
|
1342
|
+
"description": "Which collectible handed in (the first is 0); one that is kept."
|
|
1343
|
+
},
|
|
1344
|
+
"key": {
|
|
1345
|
+
"type": "string",
|
|
1346
|
+
"minLength": 1
|
|
1347
|
+
},
|
|
1348
|
+
"by": {
|
|
1349
|
+
"anyOf": [
|
|
1350
|
+
{
|
|
1351
|
+
"type": "integer",
|
|
1352
|
+
"minimum": -2147483648,
|
|
1353
|
+
"maximum": 2147483647,
|
|
1354
|
+
"not": {
|
|
1355
|
+
"const": 0
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"type": "string",
|
|
1360
|
+
"pattern": "^-?[0-9]+(\\.[0-9]+)?(s|m|h|d|w)$"
|
|
1361
|
+
}
|
|
1362
|
+
],
|
|
1363
|
+
"description": "How much more (or, below 0, less). A duration (\"1d\", \"-6h\") on a time: with `fromNow`, or on a farm's `lockAttribute` or `upkeepAttribute`."
|
|
1364
|
+
},
|
|
1365
|
+
"upTo": {
|
|
1366
|
+
"anyOf": [
|
|
1367
|
+
{
|
|
1368
|
+
"type": "integer",
|
|
1369
|
+
"minimum": 1,
|
|
1370
|
+
"maximum": 4294967295
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
"$ref": "#/$defs/duration"
|
|
1374
|
+
}
|
|
1375
|
+
],
|
|
1376
|
+
"description": "The most it reaches; left out, no cap. With `fromNow`, how far past now: \"3d\"."
|
|
1377
|
+
},
|
|
1378
|
+
"fromNow": {
|
|
1379
|
+
"type": "boolean",
|
|
1380
|
+
"default": false,
|
|
1381
|
+
"description": "The attribute is a time (Unix seconds: a lock's end, fuel that lasts until then): moved from now when it is already past (a dry tank fills from now, not from when it ran out), and raised no further than `upTo` past now."
|
|
1382
|
+
}
|
|
1383
|
+
}
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
"opens": {
|
|
1387
|
+
"$ref": "#/$defs/time",
|
|
1388
|
+
"description": "When it starts selling (or crafting). Default: at once."
|
|
1389
|
+
},
|
|
1390
|
+
"closes": {
|
|
1391
|
+
"$ref": "#/$defs/time",
|
|
1392
|
+
"description": "When it stops. Default: never."
|
|
1393
|
+
},
|
|
1394
|
+
"perWallet": {
|
|
1395
|
+
"type": "integer",
|
|
1396
|
+
"minimum": 0,
|
|
1397
|
+
"maximum": 4294967295,
|
|
1398
|
+
"description": "How many one wallet may buy (or craft) in all. 0 or absent: no limit. A wallet's first purchase pays a little rent for its count."
|
|
1399
|
+
},
|
|
1400
|
+
"perWalletEach": {
|
|
1401
|
+
"$ref": "#/$defs/perWalletEach"
|
|
1402
|
+
}
|
|
1403
|
+
}
|
|
1404
|
+
},
|
|
1405
|
+
"schedule": {
|
|
1406
|
+
"type": "object",
|
|
1407
|
+
"required": [
|
|
1408
|
+
"key",
|
|
1409
|
+
"does",
|
|
1410
|
+
"every"
|
|
1411
|
+
],
|
|
1412
|
+
"additionalProperties": false,
|
|
1413
|
+
"description": "issue: mint `amount` of a game token into `pool`, halving every `halveEvery` runs. burn: burn `percent` (or `amount`) of what `pool` holds. move: move `percent` (or `amount`) of what pool `from` holds into pool `to`. pay: pay `amount` (or `percent`) from pool `from` `to` a wallet (\"wallet:<address>\"), a token account (\"account:<token account>\") or a collectible's holder (\"holder:<asset>\") on each run: a payroll, a vesting drip, a landlord's rent. Anyone may run it when it is due.",
|
|
1414
|
+
"properties": {
|
|
1415
|
+
"key": {
|
|
1416
|
+
"$ref": "#/$defs/key"
|
|
1417
|
+
},
|
|
1418
|
+
"id": {
|
|
1419
|
+
"type": "integer",
|
|
1420
|
+
"minimum": 1,
|
|
1421
|
+
"maximum": 4294967295
|
|
1422
|
+
},
|
|
1423
|
+
"name": {
|
|
1424
|
+
"type": "string",
|
|
1425
|
+
"maxLength": 40
|
|
1426
|
+
},
|
|
1427
|
+
"does": {
|
|
1428
|
+
"enum": [
|
|
1429
|
+
"issue",
|
|
1430
|
+
"burn",
|
|
1431
|
+
"move",
|
|
1432
|
+
"pay"
|
|
1433
|
+
]
|
|
1434
|
+
},
|
|
1435
|
+
"currency": {
|
|
1436
|
+
"$ref": "#/$defs/key"
|
|
1437
|
+
},
|
|
1438
|
+
"pool": {
|
|
1439
|
+
"$ref": "#/$defs/key"
|
|
1440
|
+
},
|
|
1441
|
+
"from": {
|
|
1442
|
+
"$ref": "#/$defs/key"
|
|
1443
|
+
},
|
|
1444
|
+
"to": {
|
|
1445
|
+
"anyOf": [
|
|
1446
|
+
{
|
|
1447
|
+
"$ref": "#/$defs/key"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"$ref": "#/$defs/destination"
|
|
1451
|
+
}
|
|
1452
|
+
],
|
|
1453
|
+
"description": "move: the pool it fills. issue: \"farm:<key>\" to mint into that farm's rewards vault instead of a `pool` (an emission its stakers share). pay: \"wallet:<address>\", \"account:<token account address>\" or \"holder:<asset address>\", \"lottery:<key>\" (that lottery's pot: a sponsored or no-loss prize stream) or \"farm:<key>\" (that farm's rewards vault). A sealed one pays only \"wallet:<address>\", \"treasury\" or \"burn\"."
|
|
1454
|
+
},
|
|
1455
|
+
"amount": {
|
|
1456
|
+
"$ref": "#/$defs/amount"
|
|
1457
|
+
},
|
|
1458
|
+
"halveEvery": {
|
|
1459
|
+
"type": "integer",
|
|
1460
|
+
"minimum": 0,
|
|
1461
|
+
"maximum": 4294967295,
|
|
1462
|
+
"description": "The amount (or the percent) halves after every this many runs (0: never): with `every: \"7d\"`, 52 halves it each year. With `maxRuns`, the total it can ever move or mint is fixed in advance (a capped emission)."
|
|
1463
|
+
},
|
|
1464
|
+
"percent": {
|
|
1465
|
+
"$ref": "#/$defs/percent"
|
|
1466
|
+
},
|
|
1467
|
+
"every": {
|
|
1468
|
+
"$ref": "#/$defs/duration"
|
|
1469
|
+
},
|
|
1470
|
+
"start": {
|
|
1471
|
+
"$ref": "#/$defs/time",
|
|
1472
|
+
"description": "When the first run is due (\"publish+365d\": a one-year cliff); left out, one `every` after it goes live."
|
|
1473
|
+
},
|
|
1474
|
+
"maxRuns": {
|
|
1475
|
+
"type": "integer",
|
|
1476
|
+
"minimum": 0,
|
|
1477
|
+
"maximum": 4294967295,
|
|
1478
|
+
"default": 0,
|
|
1479
|
+
"description": "It stops after this many runs (0: never): 12 monthly runs is a year of vesting; with `halveEvery`, a cap on the total."
|
|
1480
|
+
},
|
|
1481
|
+
"active": {
|
|
1482
|
+
"type": "boolean",
|
|
1483
|
+
"default": true
|
|
1484
|
+
},
|
|
1485
|
+
"sealed": {
|
|
1486
|
+
"type": "boolean",
|
|
1487
|
+
"description": "A sealed schedule (does \"pay\", in `currency`): it pays from a vault of its own that nothing else can touch, and once written nobody, the owner included, can change it, switch it off or take its tokens back. It needs `maxRuns`; its last run pays whatever is left. It pays a wallet, the treasury or a burn (a stream into a pool, a pot or a farm is only as safe as where it lands: leave it unsealed). Vesting, an unlock."
|
|
1488
|
+
},
|
|
1489
|
+
"fund": {
|
|
1490
|
+
"$ref": "#/$defs/amount",
|
|
1491
|
+
"description": "For a sealed schedule: what goes into its vault at go-live (anyone may add more later)."
|
|
1492
|
+
},
|
|
1493
|
+
"fundFrom": {
|
|
1494
|
+
"type": "string",
|
|
1495
|
+
"pattern": "^(wallet|mint|pool:[a-z][a-z0-9-]{0,31})$",
|
|
1496
|
+
"default": "wallet",
|
|
1497
|
+
"description": "Where `fund` comes from: the owner's wallet (default), minted (a token the project mints), or a pool (\"pool:<key>\")."
|
|
1498
|
+
}
|
|
1499
|
+
}
|
|
1500
|
+
},
|
|
1501
|
+
"lottery": {
|
|
1502
|
+
"type": "object",
|
|
1503
|
+
"required": [
|
|
1504
|
+
"key",
|
|
1505
|
+
"name"
|
|
1506
|
+
],
|
|
1507
|
+
"additionalProperties": false,
|
|
1508
|
+
"properties": {
|
|
1509
|
+
"key": {
|
|
1510
|
+
"$ref": "#/$defs/key"
|
|
1511
|
+
},
|
|
1512
|
+
"id": {
|
|
1513
|
+
"type": "integer",
|
|
1514
|
+
"minimum": 1,
|
|
1515
|
+
"maximum": 4294967295
|
|
1516
|
+
},
|
|
1517
|
+
"name": {
|
|
1518
|
+
"type": "string",
|
|
1519
|
+
"maxLength": 40
|
|
1520
|
+
},
|
|
1521
|
+
"price": {
|
|
1522
|
+
"$ref": "#/$defs/amount",
|
|
1523
|
+
"description": "One ticket, in the pot's currency (or in `ticketCurrency`). Leave it out for a lottery whose tickets cost an NFT (`ticketNft`)."
|
|
1524
|
+
},
|
|
1525
|
+
"ticketCurrency": {
|
|
1526
|
+
"$ref": "#/$defs/key",
|
|
1527
|
+
"description": "Tickets paid in another token are burned, and the pot is filled from elsewhere."
|
|
1528
|
+
},
|
|
1529
|
+
"cutPercent": {
|
|
1530
|
+
"$ref": "#/$defs/percent",
|
|
1531
|
+
"description": "The share of ticket money that goes to the treasury instead of the pot (the same as a split share to \"treasury\")."
|
|
1532
|
+
},
|
|
1533
|
+
"places": {
|
|
1534
|
+
"type": "array",
|
|
1535
|
+
"minItems": 1,
|
|
1536
|
+
"items": {
|
|
1537
|
+
"anyOf": [
|
|
1538
|
+
{
|
|
1539
|
+
"type": "number",
|
|
1540
|
+
"exclusiveMinimum": 0,
|
|
1541
|
+
"maximum": 100
|
|
1542
|
+
},
|
|
1543
|
+
{
|
|
1544
|
+
"type": "object",
|
|
1545
|
+
"additionalProperties": false,
|
|
1546
|
+
"properties": {
|
|
1547
|
+
"percent": {
|
|
1548
|
+
"type": "number",
|
|
1549
|
+
"minimum": 0,
|
|
1550
|
+
"maximum": 100
|
|
1551
|
+
},
|
|
1552
|
+
"prize": {
|
|
1553
|
+
"$ref": "#/$defs/prize",
|
|
1554
|
+
"description": "What its winner gets besides its share of the pot: a raffled NFT, a collectible, tokens, a roll of a box."
|
|
1555
|
+
},
|
|
1556
|
+
"times": {
|
|
1557
|
+
"type": "integer",
|
|
1558
|
+
"minimum": 1,
|
|
1559
|
+
"maximum": 40960,
|
|
1560
|
+
"description": "How many places in a row are alike (a run): \"places 2 to 201 each take 1%\" is one { \"percent\": 1, \"times\": 200 }. Not for a named NFT or a roll, which one place gives. Default 1."
|
|
1561
|
+
}
|
|
1562
|
+
}
|
|
1563
|
+
}
|
|
1564
|
+
]
|
|
1565
|
+
},
|
|
1566
|
+
"description": "What each place wins, first place first: a percent of the pot, or { \"percent\", \"prize\", \"times\" }: a share of the pot and a prize for its winner (either, or both), for `times` places in a row. Default: one winner takes all."
|
|
1567
|
+
},
|
|
1568
|
+
"every": {
|
|
1569
|
+
"$ref": "#/$defs/duration",
|
|
1570
|
+
"description": "How often it draws. Leave it out for a lottery that draws once, at `firstDraw`, and ends."
|
|
1571
|
+
},
|
|
1572
|
+
"firstDraw": {
|
|
1573
|
+
"$ref": "#/$defs/time"
|
|
1574
|
+
},
|
|
1575
|
+
"gate": {
|
|
1576
|
+
"$ref": "#/$defs/gate"
|
|
1577
|
+
},
|
|
1578
|
+
"currency": {
|
|
1579
|
+
"$ref": "#/$defs/key",
|
|
1580
|
+
"description": "The pot's token. Default: the game's currency."
|
|
1581
|
+
},
|
|
1582
|
+
"seed": {
|
|
1583
|
+
"$ref": "#/$defs/amount",
|
|
1584
|
+
"description": "What the owner puts in the pot at go-live."
|
|
1585
|
+
},
|
|
1586
|
+
"roundRent": {
|
|
1587
|
+
"$ref": "#/$defs/amount",
|
|
1588
|
+
"description": "SOL the owner puts in the lottery at go-live to pay each round's record, its token accounts and every purchase's entry (lent to the round, back to the lottery when it closes): buyers then pay no program rent for a ticket. On by default, sized from `expect` (its rounds open or paying out at once, and a round's purchases); give an amount to set it, 0 to turn it off. When it runs short, a round's first buyer fronts its record, back to them at the close, and each buyer pays their own entry's bytes."
|
|
1589
|
+
},
|
|
1590
|
+
"expect": {
|
|
1591
|
+
"type": "object",
|
|
1592
|
+
"additionalProperties": false,
|
|
1593
|
+
"description": "What the default `roundRent` is sized for: `rounds`, the rounds open or still paying out at once (default 2 for a lottery that draws again, 1 for one that draws once), and `entries`, the purchases a round takes (default: the scenario's purchases a day over a round, else 100).",
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"rounds": {
|
|
1596
|
+
"type": "integer",
|
|
1597
|
+
"minimum": 1,
|
|
1598
|
+
"maximum": 100
|
|
1599
|
+
},
|
|
1600
|
+
"entries": {
|
|
1601
|
+
"type": "integer",
|
|
1602
|
+
"minimum": 0,
|
|
1603
|
+
"maximum": 262000
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1607
|
+
"split": {
|
|
1608
|
+
"$ref": "#/$defs/split",
|
|
1609
|
+
"description": "Where ticket money goes before the pot (the rest goes into the pot): a charity, a referrer the buyer names (\"chosen\"), the treasury."
|
|
1610
|
+
},
|
|
1611
|
+
"perWallet": {
|
|
1612
|
+
"type": "integer",
|
|
1613
|
+
"minimum": 0,
|
|
1614
|
+
"maximum": 4294967295,
|
|
1615
|
+
"description": "The most tickets one wallet holds in a round (0 or absent: no limit)."
|
|
1616
|
+
},
|
|
1617
|
+
"ticketNft": {
|
|
1618
|
+
"$ref": "#/$defs/nftPrice",
|
|
1619
|
+
"description": "A ticket costs one NFT that passes the rule, in place of tokens: held until the draw, then burned, given on or stashed; back to its buyer if the draw is cancelled. Such a lottery has no price and no split; its pot is what the owner and its places' prizes put in."
|
|
1620
|
+
},
|
|
1621
|
+
"noLoss": {
|
|
1622
|
+
"type": "boolean",
|
|
1623
|
+
"description": "A no-loss lottery: every ticket goes back to its buyer once the round is drawn, and the winners take only the pot, what is paid into it (`seed`, a sponsor, a share of other sales: \"lottery:<key>\"). No split, no cut and no `ticketCurrency`; NFT tickets come back too."
|
|
1624
|
+
},
|
|
1625
|
+
"minSold": {
|
|
1626
|
+
"type": "integer",
|
|
1627
|
+
"minimum": 0,
|
|
1628
|
+
"maximum": 4294967295,
|
|
1629
|
+
"description": "The least tickets a round must sell: a round that sold fewer is cancelled at its draw (no oracle) and every ticket refunded. 0 or absent: none. A raffle of a 1-of-1 sets it so the NFT isn't given away for a few tickets."
|
|
1630
|
+
},
|
|
1631
|
+
"raffle": {
|
|
1632
|
+
"anyOf": [
|
|
1633
|
+
{
|
|
1634
|
+
"$ref": "#/$defs/address"
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"type": "object",
|
|
1638
|
+
"additionalProperties": false,
|
|
1639
|
+
"required": [
|
|
1640
|
+
"nft"
|
|
1641
|
+
],
|
|
1642
|
+
"properties": {
|
|
1643
|
+
"nft": {
|
|
1644
|
+
"$ref": "#/$defs/address"
|
|
1645
|
+
},
|
|
1646
|
+
"collection": {
|
|
1647
|
+
"$ref": "#/$defs/address",
|
|
1648
|
+
"description": "Its Core collection, when it is not the game's own."
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
],
|
|
1653
|
+
"description": "A raffle: this NFT (one the owner holds, put in the lottery's own stash at go-live) is first place's prize, held so that nothing but the draw can give it, and the lottery draws once. The same as a first place { \"prize\": { \"gives\": \"nft\", \"nft\": <address>, \"held\": true } }. An NFT of another collection is { \"nft\", \"collection\" }."
|
|
1654
|
+
},
|
|
1655
|
+
"nfts": {
|
|
1656
|
+
"type": "array",
|
|
1657
|
+
"maxItems": 500,
|
|
1658
|
+
"items": {
|
|
1659
|
+
"anyOf": [
|
|
1660
|
+
{
|
|
1661
|
+
"$ref": "#/$defs/address"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"type": "object",
|
|
1665
|
+
"additionalProperties": false,
|
|
1666
|
+
"required": [
|
|
1667
|
+
"nft"
|
|
1668
|
+
],
|
|
1669
|
+
"properties": {
|
|
1670
|
+
"nft": {
|
|
1671
|
+
"$ref": "#/$defs/address"
|
|
1672
|
+
},
|
|
1673
|
+
"collection": {
|
|
1674
|
+
"$ref": "#/$defs/address"
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
]
|
|
1679
|
+
},
|
|
1680
|
+
"description": "NFTs the lottery's own stash holds for its places that give { \"gives\": \"raffled\" } (each draws one at random with the round's answer): a raffle of many NFTs. Your wallet puts them in at go-live, a group a transaction, before the lottery is written; at least as many as such places. The lottery draws once."
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
"description": "Tickets into a pot of the lottery's own, one random draw, the winners paid. Nothing but its winners' payouts takes from the pot: not the authority, a schedule, a farm or a recipe. Anything sold or paid can send it a share (\"lottery:<key>\" in a split); a schedule can't pay a lottery."
|
|
1684
|
+
},
|
|
1685
|
+
"contest": {
|
|
1686
|
+
"type": "object",
|
|
1687
|
+
"required": [
|
|
1688
|
+
"key",
|
|
1689
|
+
"name",
|
|
1690
|
+
"sides"
|
|
1691
|
+
],
|
|
1692
|
+
"additionalProperties": false,
|
|
1693
|
+
"description": "Players put money on a side; the side that wins shares the pot. The authority opens each one while the game runs, and the authority or one of its `deciders` (a results server's key) names the side that won. One side and a `minPot` is an all-or-nothing crowdfund; a wallet gate and a `stake` is a duel.",
|
|
1694
|
+
"properties": {
|
|
1695
|
+
"key": {
|
|
1696
|
+
"$ref": "#/$defs/key"
|
|
1697
|
+
},
|
|
1698
|
+
"name": {
|
|
1699
|
+
"type": "string",
|
|
1700
|
+
"maxLength": 40
|
|
1701
|
+
},
|
|
1702
|
+
"currency": {
|
|
1703
|
+
"$ref": "#/$defs/key"
|
|
1704
|
+
},
|
|
1705
|
+
"sides": {
|
|
1706
|
+
"type": "integer",
|
|
1707
|
+
"minimum": 1,
|
|
1708
|
+
"maximum": 1024
|
|
1709
|
+
},
|
|
1710
|
+
"sideNames": {
|
|
1711
|
+
"type": "array",
|
|
1712
|
+
"maxItems": 1024,
|
|
1713
|
+
"items": {
|
|
1714
|
+
"type": "string",
|
|
1715
|
+
"maxLength": 40
|
|
1716
|
+
}
|
|
1717
|
+
},
|
|
1718
|
+
"entriesClose": {
|
|
1719
|
+
"$ref": "#/$defs/duration",
|
|
1720
|
+
"description": "How long after opening entries stop."
|
|
1721
|
+
},
|
|
1722
|
+
"resultDue": {
|
|
1723
|
+
"$ref": "#/$defs/duration",
|
|
1724
|
+
"description": "How long after opening the result must be named. After it anyone can call the contest off and every entry gets its money back."
|
|
1725
|
+
},
|
|
1726
|
+
"every": {
|
|
1727
|
+
"$ref": "#/$defs/duration",
|
|
1728
|
+
"description": "How often the authority opens one, for the simulation."
|
|
1729
|
+
},
|
|
1730
|
+
"split": {
|
|
1731
|
+
"$ref": "#/$defs/split"
|
|
1732
|
+
},
|
|
1733
|
+
"decidedBy": {
|
|
1734
|
+
"$ref": "#/$defs/words",
|
|
1735
|
+
"description": "Who or what decides it, in words, recorded for the app and the server: the tools don't read or enforce it."
|
|
1736
|
+
},
|
|
1737
|
+
"gate": {
|
|
1738
|
+
"$ref": "#/$defs/gate"
|
|
1739
|
+
},
|
|
1740
|
+
"deciders": {
|
|
1741
|
+
"type": "array",
|
|
1742
|
+
"items": {
|
|
1743
|
+
"$ref": "#/$defs/address"
|
|
1744
|
+
},
|
|
1745
|
+
"description": "Up to three public keys whose signed verdict decides it (a results server), so the authority's key never sits on a server."
|
|
1746
|
+
},
|
|
1747
|
+
"minPot": {
|
|
1748
|
+
"$ref": "#/$defs/amount",
|
|
1749
|
+
"description": "The least its sides must hold when entries close; below it the contest is off and everyone takes their money back."
|
|
1750
|
+
},
|
|
1751
|
+
"stake": {
|
|
1752
|
+
"$ref": "#/$defs/amount",
|
|
1753
|
+
"description": "Every entry puts in exactly this, once per player and side (an equal-stakes wager)."
|
|
1754
|
+
},
|
|
1755
|
+
"prize": {
|
|
1756
|
+
"$ref": "#/$defs/prize",
|
|
1757
|
+
"description": "What each winning entry gets when it is claimed, besides its part of the pot. Something scarce (one NFT, an item's last units, a pool's tokens) goes to the entries claimed first."
|
|
1758
|
+
},
|
|
1759
|
+
"stakeNft": {
|
|
1760
|
+
"$ref": "#/$defs/rule",
|
|
1761
|
+
"description": "Each entry stakes one NFT that passes this rule, in place of tokens, and the NFTs are the pot: each winning entry takes its own back and one of the losers', in the order they are claimed; what the winners leave goes to whoever opened it. Called off, each takes its own back. No split and no stake."
|
|
1762
|
+
},
|
|
1763
|
+
"losersEach": {
|
|
1764
|
+
"type": "integer",
|
|
1765
|
+
"minimum": 1,
|
|
1766
|
+
"description": "In a contest of NFTs (`stakeNft`), the most losers' NFTs one winner takes; what the winners leave goes to whoever opened it. Default: no cap, the winners share every loser's NFT (the first to enter on the winning side take one more when they don't divide evenly), each picking which."
|
|
1767
|
+
}
|
|
1768
|
+
}
|
|
1769
|
+
},
|
|
1770
|
+
"auction": {
|
|
1771
|
+
"type": "object",
|
|
1772
|
+
"required": [
|
|
1773
|
+
"key",
|
|
1774
|
+
"name",
|
|
1775
|
+
"lot",
|
|
1776
|
+
"runs"
|
|
1777
|
+
],
|
|
1778
|
+
"additionalProperties": false,
|
|
1779
|
+
"description": "An English auction, opened when the economy goes live: the highest bid when the time runs out wins the lot. Each bid must reach the reserve and top the last by the least raise; a bid that is topped goes back to its bidder at once. A late bid moves the end. With no bid the lot goes home.",
|
|
1780
|
+
"properties": {
|
|
1781
|
+
"key": {
|
|
1782
|
+
"$ref": "#/$defs/key"
|
|
1783
|
+
},
|
|
1784
|
+
"id": {
|
|
1785
|
+
"type": "integer",
|
|
1786
|
+
"minimum": 1,
|
|
1787
|
+
"maximum": 4294967295,
|
|
1788
|
+
"description": "The program's number for it. Written when it goes live; never change it after."
|
|
1789
|
+
},
|
|
1790
|
+
"seller": {
|
|
1791
|
+
"type": "string",
|
|
1792
|
+
"description": "Who put it up, and so is named in its address: the owner for a collectible it holds, the authority for a new unit of an item. Written when it goes live; never change it after."
|
|
1793
|
+
},
|
|
1794
|
+
"name": {
|
|
1795
|
+
"type": "string",
|
|
1796
|
+
"maxLength": 40
|
|
1797
|
+
},
|
|
1798
|
+
"currency": {
|
|
1799
|
+
"$ref": "#/$defs/key",
|
|
1800
|
+
"description": "The token bids are in. Default: the game's currency. In another token, what the split leaves goes to the treasury wallet in that token."
|
|
1801
|
+
},
|
|
1802
|
+
"lot": {
|
|
1803
|
+
"description": "What is sold: one new unit of an item (minted to the winner at the end), any Core NFT the owner's wallet holds, or a roll of one of the game's boxes ({ \"roll\": key }, a mystery lot).",
|
|
1804
|
+
"oneOf": [
|
|
1805
|
+
{
|
|
1806
|
+
"type": "object",
|
|
1807
|
+
"required": [
|
|
1808
|
+
"item"
|
|
1809
|
+
],
|
|
1810
|
+
"additionalProperties": false,
|
|
1811
|
+
"properties": {
|
|
1812
|
+
"item": {
|
|
1813
|
+
"$ref": "#/$defs/key"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"type": "object",
|
|
1819
|
+
"required": [
|
|
1820
|
+
"asset"
|
|
1821
|
+
],
|
|
1822
|
+
"additionalProperties": false,
|
|
1823
|
+
"properties": {
|
|
1824
|
+
"asset": {
|
|
1825
|
+
"$ref": "#/$defs/address"
|
|
1826
|
+
},
|
|
1827
|
+
"collection": {
|
|
1828
|
+
"$ref": "#/$defs/address",
|
|
1829
|
+
"description": "Its Core collection. Default: the game's, the one it has authority over."
|
|
1830
|
+
}
|
|
1831
|
+
}
|
|
1832
|
+
},
|
|
1833
|
+
{
|
|
1834
|
+
"type": "object",
|
|
1835
|
+
"required": [
|
|
1836
|
+
"roll"
|
|
1837
|
+
],
|
|
1838
|
+
"additionalProperties": false,
|
|
1839
|
+
"properties": {
|
|
1840
|
+
"roll": {
|
|
1841
|
+
"$ref": "#/$defs/key",
|
|
1842
|
+
"description": "A mystery lot: a roll of this box for the winner, made at the end. The price goes to the treasury."
|
|
1843
|
+
}
|
|
1844
|
+
}
|
|
1845
|
+
}
|
|
1846
|
+
]
|
|
1847
|
+
},
|
|
1848
|
+
"reserve": {
|
|
1849
|
+
"$ref": "#/$defs/amount",
|
|
1850
|
+
"description": "The least first bid. Default: the smallest unit."
|
|
1851
|
+
},
|
|
1852
|
+
"minRaise": {
|
|
1853
|
+
"$ref": "#/$defs/percent",
|
|
1854
|
+
"description": "How much each bid must top the last by, in percent (always at least the smallest unit). Default 5."
|
|
1855
|
+
},
|
|
1856
|
+
"start": {
|
|
1857
|
+
"$ref": "#/$defs/time",
|
|
1858
|
+
"description": "When bids open. Default: the moment it goes live."
|
|
1859
|
+
},
|
|
1860
|
+
"runs": {
|
|
1861
|
+
"$ref": "#/$defs/duration",
|
|
1862
|
+
"description": "How long bids stay open from the start, before any extension."
|
|
1863
|
+
},
|
|
1864
|
+
"extendBy": {
|
|
1865
|
+
"$ref": "#/$defs/duration",
|
|
1866
|
+
"description": "A bid in the last part of this long moves the end to this long after it. 0: no extension. Default \"10m\"."
|
|
1867
|
+
},
|
|
1868
|
+
"split": {
|
|
1869
|
+
"$ref": "#/$defs/split",
|
|
1870
|
+
"description": "Up to four shares of the winning bid (the seller's own account, a creator's, a pool, a burn). What they leave goes to the treasury."
|
|
1871
|
+
},
|
|
1872
|
+
"gate": {
|
|
1873
|
+
"$ref": "#/$defs/gate"
|
|
1874
|
+
},
|
|
1875
|
+
"bidNfts": {
|
|
1876
|
+
"$ref": "#/$defs/rule",
|
|
1877
|
+
"description": "A bid is a bundle of NFTs that pass this rule (up to four), in place of tokens: the bundle with the most NFTs wins, and `reserve` counts NFTs. A bundle that is topped goes back to its bidder at once; the winning NFTs go to the seller (the treasury, for the project's item or roll). No split."
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
},
|
|
1881
|
+
"hold": {
|
|
1882
|
+
"type": "object",
|
|
1883
|
+
"required": [
|
|
1884
|
+
"key",
|
|
1885
|
+
"name",
|
|
1886
|
+
"item"
|
|
1887
|
+
],
|
|
1888
|
+
"additionalProperties": false,
|
|
1889
|
+
"description": "A player hands a collectible to the game for a time they choose; until it is up the authority says where it goes, after it anyone can send it home.",
|
|
1890
|
+
"properties": {
|
|
1891
|
+
"key": {
|
|
1892
|
+
"$ref": "#/$defs/key"
|
|
1893
|
+
},
|
|
1894
|
+
"name": {
|
|
1895
|
+
"type": "string",
|
|
1896
|
+
"maxLength": 40
|
|
1897
|
+
},
|
|
1898
|
+
"item": {
|
|
1899
|
+
"$ref": "#/$defs/key"
|
|
1900
|
+
},
|
|
1901
|
+
"for": {
|
|
1902
|
+
"$ref": "#/$defs/duration",
|
|
1903
|
+
"description": "The time the game asks the player to choose."
|
|
1904
|
+
},
|
|
1905
|
+
"decidedBy": {
|
|
1906
|
+
"$ref": "#/$defs/words",
|
|
1907
|
+
"description": "Who or what decides it, in words, recorded for the app and the server: the tools don't read or enforce it."
|
|
1908
|
+
},
|
|
1909
|
+
"until": {
|
|
1910
|
+
"$ref": "#/$defs/time",
|
|
1911
|
+
"description": "When each hold ends, for holds that end at one time (a raid at 18:00): a hold's address names its end. Default: `for` from the moment it is made."
|
|
1912
|
+
}
|
|
1913
|
+
}
|
|
1914
|
+
},
|
|
1915
|
+
"decision": {
|
|
1916
|
+
"type": "object",
|
|
1917
|
+
"required": [
|
|
1918
|
+
"key",
|
|
1919
|
+
"when",
|
|
1920
|
+
"does"
|
|
1921
|
+
],
|
|
1922
|
+
"additionalProperties": false,
|
|
1923
|
+
"description": "A rule only the game can carry out, signed by the authority while the game runs.",
|
|
1924
|
+
"properties": {
|
|
1925
|
+
"key": {
|
|
1926
|
+
"$ref": "#/$defs/key"
|
|
1927
|
+
},
|
|
1928
|
+
"when": {
|
|
1929
|
+
"$ref": "#/$defs/words"
|
|
1930
|
+
},
|
|
1931
|
+
"does": {
|
|
1932
|
+
"enum": [
|
|
1933
|
+
"payout",
|
|
1934
|
+
"burn",
|
|
1935
|
+
"issue",
|
|
1936
|
+
"make",
|
|
1937
|
+
"unmake",
|
|
1938
|
+
"set",
|
|
1939
|
+
"award",
|
|
1940
|
+
"decide",
|
|
1941
|
+
"roll",
|
|
1942
|
+
"open_contest"
|
|
1943
|
+
]
|
|
1944
|
+
},
|
|
1945
|
+
"pool": {
|
|
1946
|
+
"$ref": "#/$defs/key"
|
|
1947
|
+
},
|
|
1948
|
+
"currency": {
|
|
1949
|
+
"$ref": "#/$defs/key"
|
|
1950
|
+
},
|
|
1951
|
+
"amount": {
|
|
1952
|
+
"$ref": "#/$defs/amount"
|
|
1953
|
+
},
|
|
1954
|
+
"percent": {
|
|
1955
|
+
"$ref": "#/$defs/percent",
|
|
1956
|
+
"description": "For a payout or a burn: a share of what the pool holds, instead of an amount."
|
|
1957
|
+
},
|
|
1958
|
+
"item": {
|
|
1959
|
+
"$ref": "#/$defs/key"
|
|
1960
|
+
},
|
|
1961
|
+
"contest": {
|
|
1962
|
+
"$ref": "#/$defs/key"
|
|
1963
|
+
},
|
|
1964
|
+
"hold": {
|
|
1965
|
+
"$ref": "#/$defs/key"
|
|
1966
|
+
},
|
|
1967
|
+
"to": {
|
|
1968
|
+
"$ref": "#/$defs/words"
|
|
1969
|
+
},
|
|
1970
|
+
"perDay": {
|
|
1971
|
+
"type": "number",
|
|
1972
|
+
"minimum": 0,
|
|
1973
|
+
"description": "How often it happens, for the simulation."
|
|
1974
|
+
},
|
|
1975
|
+
"signedBy": {
|
|
1976
|
+
"enum": [
|
|
1977
|
+
"page",
|
|
1978
|
+
"server"
|
|
1979
|
+
],
|
|
1980
|
+
"default": "page",
|
|
1981
|
+
"description": "page: the authority approves each one in its own wallet. server: a server you run holds the authority key (keys.authority is its public address)."
|
|
1982
|
+
},
|
|
1983
|
+
"proof": {
|
|
1984
|
+
"type": "object",
|
|
1985
|
+
"additionalProperties": false,
|
|
1986
|
+
"required": [
|
|
1987
|
+
"payment"
|
|
1988
|
+
],
|
|
1989
|
+
"description": "What a claim must show before the keeper or the page acts on it: a payment the receiver made on chain (an attempt), not claimed before, at least `after` and at most `within` before the claim. The game's word alone is never proof: it runs in the player's browser. The checker only checks that `payment` is one of the economy's payments; `after` and `within` are recorded for the server that acts on claims, and neither the tools nor the program enforce them.",
|
|
1990
|
+
"properties": {
|
|
1991
|
+
"payment": {
|
|
1992
|
+
"$ref": "#/$defs/key",
|
|
1993
|
+
"description": "The payment (one of \"payments\") a claim must name, paid by the receiver."
|
|
1994
|
+
},
|
|
1995
|
+
"after": {
|
|
1996
|
+
"$ref": "#/$defs/duration",
|
|
1997
|
+
"description": "The least time between that payment and the claim (no one clears it in less). Recorded for the server: not enforced by the tools."
|
|
1998
|
+
},
|
|
1999
|
+
"within": {
|
|
2000
|
+
"$ref": "#/$defs/duration",
|
|
2001
|
+
"description": "The most time between that payment and the claim. Recorded for the server: not enforced by the tools."
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
"caps": {
|
|
2006
|
+
"type": "object",
|
|
2007
|
+
"additionalProperties": false,
|
|
2008
|
+
"description": "Limits for the keeper and the page to keep, in whole units of the pool's (or the token's) currency. Recorded for the server that acts on decisions: neither the tools nor the program enforce them (the program trusts the authority).",
|
|
2009
|
+
"properties": {
|
|
2010
|
+
"each": {
|
|
2011
|
+
"$ref": "#/$defs/amount",
|
|
2012
|
+
"description": "The most one decision moves."
|
|
2013
|
+
},
|
|
2014
|
+
"perPlayerPerDay": {
|
|
2015
|
+
"$ref": "#/$defs/amount",
|
|
2016
|
+
"description": "The most one receiver gets in 24 hours."
|
|
2017
|
+
},
|
|
2018
|
+
"perDay": {
|
|
2019
|
+
"$ref": "#/$defs/amount",
|
|
2020
|
+
"description": "The most everyone together gets in 24 hours."
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
},
|
|
2026
|
+
"scenario": {
|
|
2027
|
+
"type": "object",
|
|
2028
|
+
"additionalProperties": false,
|
|
2029
|
+
"description": "What the quick simulation assumes: how often players do each thing.",
|
|
2030
|
+
"properties": {
|
|
2031
|
+
"days": {
|
|
2032
|
+
"type": "number",
|
|
2033
|
+
"minimum": 0,
|
|
2034
|
+
"maximum": 3650,
|
|
2035
|
+
"default": 30
|
|
2036
|
+
},
|
|
2037
|
+
"perDay": {
|
|
2038
|
+
"type": "object",
|
|
2039
|
+
"description": "Keys are \"<kind>:<key>\" (box:<key>, item:<key>, lottery:<key>, recipe:<key>, payment:<key>, farm:<key>, contest:<key>, auction:<key> (bids), hold:<key>, grant:<key>); values how many a day.",
|
|
2040
|
+
"propertyNames": {
|
|
2041
|
+
"pattern": "^(box|item|payment|recipe|lottery|farm|contest|auction|hold|grant):[a-z][a-z0-9-]{0,31}$"
|
|
2042
|
+
},
|
|
2043
|
+
"additionalProperties": {
|
|
2044
|
+
"type": "number",
|
|
2045
|
+
"minimum": 0,
|
|
2046
|
+
"maximum": 1000000
|
|
2047
|
+
}
|
|
2048
|
+
},
|
|
2049
|
+
"players": {
|
|
2050
|
+
"type": "integer",
|
|
2051
|
+
"minimum": 1
|
|
2052
|
+
},
|
|
2053
|
+
"staked": {
|
|
2054
|
+
"type": "object",
|
|
2055
|
+
"description": "Farm key → how much is staked (tokens, or a number of collectibles), for rewards per unit.",
|
|
2056
|
+
"additionalProperties": {
|
|
2057
|
+
"$ref": "#/$defs/amount"
|
|
2058
|
+
}
|
|
2059
|
+
}
|
|
2060
|
+
}
|
|
2061
|
+
},
|
|
2062
|
+
"live": {
|
|
2063
|
+
"type": "object",
|
|
2064
|
+
"additionalProperties": false,
|
|
2065
|
+
"description": "Written when the economy goes live: public addresses and signatures only.",
|
|
2066
|
+
"properties": {
|
|
2067
|
+
"program": {
|
|
2068
|
+
"$ref": "#/$defs/address",
|
|
2069
|
+
"description": "The loot program it runs on."
|
|
2070
|
+
},
|
|
2071
|
+
"project": {
|
|
2072
|
+
"$ref": "#/$defs/address",
|
|
2073
|
+
"description": "The project on it: [\"project\", owner, projectNumber]."
|
|
2074
|
+
},
|
|
2075
|
+
"collection": {
|
|
2076
|
+
"$ref": "#/$defs/address"
|
|
2077
|
+
},
|
|
2078
|
+
"tree": {
|
|
2079
|
+
"$ref": "#/$defs/address",
|
|
2080
|
+
"description": "The project's tree of compressed NFTs, once the setup opened it."
|
|
2081
|
+
},
|
|
2082
|
+
"tables": {
|
|
2083
|
+
"type": "array",
|
|
2084
|
+
"items": {
|
|
2085
|
+
"$ref": "#/$defs/address"
|
|
2086
|
+
},
|
|
2087
|
+
"description": "The project's standing lookup tables, made at go-live (the owner their authority): a transaction too big for a legacy one goes as v0 with them, in one approval."
|
|
2088
|
+
},
|
|
2089
|
+
"treasury": {
|
|
2090
|
+
"$ref": "#/$defs/address"
|
|
2091
|
+
},
|
|
2092
|
+
"authority": {
|
|
2093
|
+
"$ref": "#/$defs/address"
|
|
2094
|
+
},
|
|
2095
|
+
"at": {
|
|
2096
|
+
"type": "string",
|
|
2097
|
+
"maxLength": 40,
|
|
2098
|
+
"description": "When it went live. \"publish\" in the spec means this moment."
|
|
2099
|
+
},
|
|
2100
|
+
"published": {
|
|
2101
|
+
"type": "object",
|
|
2102
|
+
"description": "The spec as it is on chain: each part as it was when it landed. A change publishes only what differs from it."
|
|
2103
|
+
},
|
|
2104
|
+
"transactions": {
|
|
2105
|
+
"type": "array",
|
|
2106
|
+
"maxItems": 60,
|
|
2107
|
+
"description": "The latest transactions that set it up, newest last.",
|
|
2108
|
+
"items": {
|
|
2109
|
+
"type": "object",
|
|
2110
|
+
"additionalProperties": false,
|
|
2111
|
+
"properties": {
|
|
2112
|
+
"signature": {
|
|
2113
|
+
"type": "string",
|
|
2114
|
+
"pattern": "^[1-9A-HJ-NP-Za-km-z]{64,90}$"
|
|
2115
|
+
},
|
|
2116
|
+
"parts": {
|
|
2117
|
+
"type": "array",
|
|
2118
|
+
"items": {
|
|
2119
|
+
"type": "string",
|
|
2120
|
+
"maxLength": 80
|
|
2121
|
+
}
|
|
2122
|
+
}
|
|
2123
|
+
}
|
|
2124
|
+
}
|
|
2125
|
+
},
|
|
2126
|
+
"mints": {
|
|
2127
|
+
"type": "object",
|
|
2128
|
+
"description": "Token key → the mint made for it when it went live.",
|
|
2129
|
+
"additionalProperties": {
|
|
2130
|
+
"$ref": "#/$defs/address"
|
|
2131
|
+
}
|
|
2132
|
+
},
|
|
2133
|
+
"landed": {
|
|
2134
|
+
"type": "array",
|
|
2135
|
+
"maxItems": 512,
|
|
2136
|
+
"items": {
|
|
2137
|
+
"type": "string",
|
|
2138
|
+
"maxLength": 80
|
|
2139
|
+
},
|
|
2140
|
+
"description": "The setup steps that have landed (a setup cut short goes on from here)."
|
|
2141
|
+
},
|
|
2142
|
+
"partial": {
|
|
2143
|
+
"type": "boolean",
|
|
2144
|
+
"description": "True while a setup has landed only some of its steps."
|
|
2145
|
+
},
|
|
2146
|
+
"changing": {
|
|
2147
|
+
"type": "array",
|
|
2148
|
+
"maxItems": 512,
|
|
2149
|
+
"items": {
|
|
2150
|
+
"type": "string",
|
|
2151
|
+
"maxLength": 80
|
|
2152
|
+
},
|
|
2153
|
+
"description": "While a change to a live economy is landing: the parts it changes."
|
|
2154
|
+
},
|
|
2155
|
+
"pending": {
|
|
2156
|
+
"type": "array",
|
|
2157
|
+
"maxItems": 60,
|
|
2158
|
+
"description": "Transactions sent whose landing was not yet seen (a confirmation that timed out). Before anything is sent again, each is looked up on chain: recorded as landed when it did, dropped when it failed or expired.",
|
|
2159
|
+
"items": {
|
|
2160
|
+
"type": "object",
|
|
2161
|
+
"additionalProperties": false,
|
|
2162
|
+
"required": [
|
|
2163
|
+
"signature",
|
|
2164
|
+
"steps"
|
|
2165
|
+
],
|
|
2166
|
+
"properties": {
|
|
2167
|
+
"signature": {
|
|
2168
|
+
"type": "string",
|
|
2169
|
+
"pattern": "^[1-9A-HJ-NP-Za-km-z]{64,90}$"
|
|
2170
|
+
},
|
|
2171
|
+
"steps": {
|
|
2172
|
+
"type": "array",
|
|
2173
|
+
"maxItems": 512,
|
|
2174
|
+
"items": {
|
|
2175
|
+
"type": "string",
|
|
2176
|
+
"maxLength": 80
|
|
2177
|
+
}
|
|
2178
|
+
},
|
|
2179
|
+
"made": {
|
|
2180
|
+
"type": "object",
|
|
2181
|
+
"additionalProperties": false,
|
|
2182
|
+
"description": "What its steps make, to record when it landed.",
|
|
2183
|
+
"properties": {
|
|
2184
|
+
"project": {
|
|
2185
|
+
"$ref": "#/$defs/address"
|
|
2186
|
+
},
|
|
2187
|
+
"treasury": {
|
|
2188
|
+
"$ref": "#/$defs/address"
|
|
2189
|
+
},
|
|
2190
|
+
"authority": {
|
|
2191
|
+
"$ref": "#/$defs/address"
|
|
2192
|
+
},
|
|
2193
|
+
"collection": {
|
|
2194
|
+
"$ref": "#/$defs/address"
|
|
2195
|
+
},
|
|
2196
|
+
"tree": {
|
|
2197
|
+
"$ref": "#/$defs/address"
|
|
2198
|
+
},
|
|
2199
|
+
"mints": {
|
|
2200
|
+
"type": "object",
|
|
2201
|
+
"additionalProperties": {
|
|
2202
|
+
"$ref": "#/$defs/address"
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
},
|
|
2207
|
+
"lastValidBlockHeight": {
|
|
2208
|
+
"type": "integer",
|
|
2209
|
+
"minimum": 0,
|
|
2210
|
+
"description": "Past this block height it can no longer land."
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
}
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
},
|
|
2217
|
+
"rule": {
|
|
2218
|
+
"type": "object",
|
|
2219
|
+
"additionalProperties": false,
|
|
2220
|
+
"required": [],
|
|
2221
|
+
"description": "What an NFT the player shows must be: of an `item` the game mints, or of a `collection` (a Core collection, or a Token Metadata collection mint it is verified in; with neither, the game's own collection, the one it has authority over); and, when `attribute` is given, its attribute at least `atLeast`, equal to `equals`, a time still `ahead` or `passed` (`time`), or present. `{ \"item\": \"pass\" }` alone means \"holds a Member Pass\". An NFT's attributes are read as they are; for one the game has no authority over, what the game wrote about it in its Sheet counts over them.",
|
|
2222
|
+
"properties": {
|
|
2223
|
+
"item": {
|
|
2224
|
+
"$ref": "#/$defs/key",
|
|
2225
|
+
"description": "Which item the game mints it must be."
|
|
2226
|
+
},
|
|
2227
|
+
"collection": {
|
|
2228
|
+
"$ref": "#/$defs/address",
|
|
2229
|
+
"description": "Any NFT of this collection: a Metaplex Core collection, or the mint of a Token Metadata collection its NFTs are verified in (a print of a master, which its holder makes without the collection's authority, counts as in no collection). Leave it and `item` out for the game's own collection."
|
|
2230
|
+
},
|
|
2231
|
+
"attribute": {
|
|
2232
|
+
"type": "string",
|
|
2233
|
+
"minLength": 1
|
|
2234
|
+
},
|
|
2235
|
+
"atLeast": {
|
|
2236
|
+
"type": "integer",
|
|
2237
|
+
"minimum": 0,
|
|
2238
|
+
"maximum": 4294967295
|
|
2239
|
+
},
|
|
2240
|
+
"equals": {
|
|
2241
|
+
"type": "string"
|
|
2242
|
+
},
|
|
2243
|
+
"time": {
|
|
2244
|
+
"enum": [
|
|
2245
|
+
"ahead",
|
|
2246
|
+
"passed"
|
|
2247
|
+
],
|
|
2248
|
+
"description": "The attribute is a time (Unix seconds) still to come (\"ahead\": fuel left, a pass still good) or past, or missing (\"passed\": out of jail, no cooldown). In a farm's gate it is read as an NFT comes in; after that, the farm's `upkeepAttribute` says how long it earns."
|
|
2249
|
+
}
|
|
2250
|
+
}
|
|
2251
|
+
},
|
|
2252
|
+
"boost": {
|
|
2253
|
+
"type": "number",
|
|
2254
|
+
"minimum": 0,
|
|
2255
|
+
"maximum": 10000,
|
|
2256
|
+
"description": "A percent added to a weight: 100 doubles it. At most 10,000 (101 times): enough for a stat that scales a rate, such as +100% a point of power up to 100."
|
|
2257
|
+
},
|
|
2258
|
+
"effect": {
|
|
2259
|
+
"type": "object",
|
|
2260
|
+
"additionalProperties": false,
|
|
2261
|
+
"description": "How much a collectible that passes the rule adds: a flat percent, or a percent per point of its attribute (up to `upTo` points).",
|
|
2262
|
+
"properties": {
|
|
2263
|
+
"addPercent": {
|
|
2264
|
+
"$ref": "#/$defs/boost"
|
|
2265
|
+
},
|
|
2266
|
+
"perPointPercent": {
|
|
2267
|
+
"$ref": "#/$defs/boost"
|
|
2268
|
+
},
|
|
2269
|
+
"upTo": {
|
|
2270
|
+
"type": "integer",
|
|
2271
|
+
"minimum": 1,
|
|
2272
|
+
"maximum": 4294967295
|
|
2273
|
+
}
|
|
2274
|
+
}
|
|
2275
|
+
},
|
|
2276
|
+
"odds": {
|
|
2277
|
+
"type": "object",
|
|
2278
|
+
"additionalProperties": false,
|
|
2279
|
+
"required": [
|
|
2280
|
+
"outcome",
|
|
2281
|
+
"when",
|
|
2282
|
+
"add"
|
|
2283
|
+
],
|
|
2284
|
+
"description": "A box outcome that grows more likely for a player who shows a collectible.",
|
|
2285
|
+
"properties": {
|
|
2286
|
+
"outcome": {
|
|
2287
|
+
"type": "integer",
|
|
2288
|
+
"minimum": 0,
|
|
2289
|
+
"maximum": 65535,
|
|
2290
|
+
"description": "Which outcome (0 is the first)."
|
|
2291
|
+
},
|
|
2292
|
+
"when": {
|
|
2293
|
+
"$ref": "#/$defs/rule"
|
|
2294
|
+
},
|
|
2295
|
+
"add": {
|
|
2296
|
+
"$ref": "#/$defs/effect"
|
|
2297
|
+
}
|
|
2298
|
+
}
|
|
2299
|
+
},
|
|
2300
|
+
"tier": {
|
|
2301
|
+
"type": "object",
|
|
2302
|
+
"additionalProperties": false,
|
|
2303
|
+
"required": [
|
|
2304
|
+
"lock"
|
|
2305
|
+
],
|
|
2306
|
+
"properties": {
|
|
2307
|
+
"lock": {
|
|
2308
|
+
"$ref": "#/$defs/duration",
|
|
2309
|
+
"description": "How long a stake at this tier is locked."
|
|
2310
|
+
},
|
|
2311
|
+
"multiplier": {
|
|
2312
|
+
"type": "number",
|
|
2313
|
+
"exclusiveMinimum": 0,
|
|
2314
|
+
"maximum": 11,
|
|
2315
|
+
"default": 1,
|
|
2316
|
+
"description": "Its weight: above 0 and up to 11 times what it stakes (below 1: a flexible tier that earns less)."
|
|
2317
|
+
},
|
|
2318
|
+
"prize": {
|
|
2319
|
+
"$ref": "#/$defs/prize",
|
|
2320
|
+
"description": "A mission's prize: what a collectible that leaves after this tier's lock has run (topped up, not forfeited) takes with it; tokens are grown by its boosts. A chest is { \"gives\": \"roll\", \"box\": key }. Only in a farm of collectibles, with a lock."
|
|
2321
|
+
},
|
|
2322
|
+
"roll": {
|
|
2323
|
+
"$ref": "#/$defs/key",
|
|
2324
|
+
"description": "A mission's result: a box with `rollsOn` the collectible leaving after this tier's lock is rolled on (success, failure, a stat lost, the NFT lost; its odds read the NFT's stats). Growth stops at the lock's end. Its player or the project’s keys ask for the roll and settle it; it is never refunded while it waits. A chest it brings back is its `prize` instead. Only in a farm of collectibles, with a lock."
|
|
2325
|
+
},
|
|
2326
|
+
"exitFee": {
|
|
2327
|
+
"$ref": "#/$defs/percent",
|
|
2328
|
+
"description": "A farm of tokens: a stake may leave before this tier's lock has run by leaving this percent of what it takes out (to the farm's `exitFeeTo`). Absent: no early exit. A farm of collectibles leaves early by a recipe that lowers its `lockAttribute`."
|
|
2329
|
+
},
|
|
2330
|
+
"earnsFor": {
|
|
2331
|
+
"$ref": "#/$defs/duration",
|
|
2332
|
+
"description": "A term: a seat at this tier earns and grows only this long after its lock started (a stake, or a booster put on, starts it again), however late it is touched; its prize is still given once its lock has run. Absent: no end."
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
},
|
|
2336
|
+
"farm": {
|
|
2337
|
+
"type": "object",
|
|
2338
|
+
"additionalProperties": false,
|
|
2339
|
+
"required": [
|
|
2340
|
+
"key",
|
|
2341
|
+
"name",
|
|
2342
|
+
"stakes"
|
|
2343
|
+
],
|
|
2344
|
+
"description": "Players stake a token or collectibles. Rewards are whatever lands in the farm's own rewards vault (\"farm:<key>\" in a split or a schedule, its `seed`), shared by weight (what they stake, times their lock tier, plus boosts from what a collectible says), or a fixed `rate`. A farm can also write points and levels on what is staked (`growth`), and pay a mission's `prize` to a collectible that stays its tier's lock. It cannot be edited once open. A farm of collectibles can keep two times on the NFT itself: its lock (`lockAttribute`) and an upkeep (`upkeepAttribute`), which recipes and rolls move like any number.",
|
|
2345
|
+
"properties": {
|
|
2346
|
+
"key": {
|
|
2347
|
+
"$ref": "#/$defs/key"
|
|
2348
|
+
},
|
|
2349
|
+
"id": {
|
|
2350
|
+
"type": "integer",
|
|
2351
|
+
"minimum": 1,
|
|
2352
|
+
"maximum": 4294967295
|
|
2353
|
+
},
|
|
2354
|
+
"name": {
|
|
2355
|
+
"type": "string",
|
|
2356
|
+
"maxLength": 40
|
|
2357
|
+
},
|
|
2358
|
+
"stakes": {
|
|
2359
|
+
"anyOf": [
|
|
2360
|
+
{
|
|
2361
|
+
"$ref": "#/$defs/key"
|
|
2362
|
+
},
|
|
2363
|
+
{
|
|
2364
|
+
"const": "collectibles"
|
|
2365
|
+
}
|
|
2366
|
+
],
|
|
2367
|
+
"description": "A token key, or \"collectibles\" for NFTs: the game's own, or, with a `gate` naming a `collection`, any Core or Token Metadata (legacy or pNFT) NFT of it."
|
|
2368
|
+
},
|
|
2369
|
+
"item": {
|
|
2370
|
+
"$ref": "#/$defs/key",
|
|
2371
|
+
"description": "For a farm of collectibles: only this item (leave out for any)."
|
|
2372
|
+
},
|
|
2373
|
+
"rewards": {
|
|
2374
|
+
"$ref": "#/$defs/key",
|
|
2375
|
+
"description": "The token its rewards are in (a token key). They land in the farm's own rewards vault: send it a share (\"farm:<key>\" in a split), pay it with a schedule (\"to\": \"farm:<key>\"), or `seed` it; with a minted `rate` nothing waits there. Left out: the staked token, or for a farm of collectibles the project's currency."
|
|
2376
|
+
},
|
|
2377
|
+
"seed": {
|
|
2378
|
+
"$ref": "#/$defs/amount",
|
|
2379
|
+
"description": "What the owner puts into its rewards vault at go-live, from their wallet (anyone may add more later, with a plain transfer)."
|
|
2380
|
+
},
|
|
2381
|
+
"rate": {
|
|
2382
|
+
"type": "object",
|
|
2383
|
+
"additionalProperties": false,
|
|
2384
|
+
"required": [
|
|
2385
|
+
"perDay"
|
|
2386
|
+
],
|
|
2387
|
+
"description": "A fixed rate instead of sharing what lands: for each seat whoever else is in, times its tier and boosts (most Solana NFT staking paid this way), or with `shared` the whole farm's a day, shared by weight.",
|
|
2388
|
+
"properties": {
|
|
2389
|
+
"perDay": {
|
|
2390
|
+
"$ref": "#/$defs/amount",
|
|
2391
|
+
"description": "Reward tokens a day for each collectible at x1; for a farm of tokens, for each whole token staked; with `shared`, for the whole farm. 0 pays nothing: a farm that only grows what is staked, or gives mission prizes."
|
|
2392
|
+
},
|
|
2393
|
+
"minted": {
|
|
2394
|
+
"type": "boolean",
|
|
2395
|
+
"default": false,
|
|
2396
|
+
"description": "Minted when a seat is paid (the rewards' token must be one the game mints), or paid from what its rewards vault holds free while it lasts (what it can't cover is not owed later)."
|
|
2397
|
+
},
|
|
2398
|
+
"shared": {
|
|
2399
|
+
"type": "boolean",
|
|
2400
|
+
"default": false,
|
|
2401
|
+
"description": "`perDay` is the whole farm's a day, shared by weight while anything is staked: an emission budget, each seat's share falling as more stake."
|
|
2402
|
+
},
|
|
2403
|
+
"halveEvery": {
|
|
2404
|
+
"$ref": "#/$defs/duration",
|
|
2405
|
+
"description": "The rate halves every this long from when the farm opens, again and again (a halving emission)."
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
},
|
|
2409
|
+
"custody": {
|
|
2410
|
+
"enum": [
|
|
2411
|
+
"freeze",
|
|
2412
|
+
"escrow",
|
|
2413
|
+
"watch"
|
|
2414
|
+
],
|
|
2415
|
+
"default": "escrow",
|
|
2416
|
+
"description": "For staked NFTs and token-seat boosters. escrow (default): the game holds them (Core NFTs only; issuer-controlled transfer rules can block return). freeze: they stay in the wallet, frozen (Core) or locked by Token Metadata (legacy NFTs and pNFTs), the game their delegate; Core's unfreeze can fail if the issuer later enlarges metadata or plugins. Select freeze explicitly for soulbound collectibles, which need no extra freeze. watch (a farm of collectibles only): they stay in the wallet, free: an NFT can be sold while staked, and its seat earns only while its staker holds it (a staker who no longer does collects nothing, their due going back to the farm, and the next holder can take the seat over). A Token Metadata NFT is frozen or watched, never escrowed. Staked tokens always go to the farm's vault."
|
|
2417
|
+
},
|
|
2418
|
+
"tiers": {
|
|
2419
|
+
"type": "array",
|
|
2420
|
+
"minItems": 1,
|
|
2421
|
+
"maxItems": 256,
|
|
2422
|
+
"items": {
|
|
2423
|
+
"$ref": "#/$defs/tier"
|
|
2424
|
+
},
|
|
2425
|
+
"description": "Lock tiers, at least one. One tier at multiplier 1 is plain staking."
|
|
2426
|
+
},
|
|
2427
|
+
"boosts": {
|
|
2428
|
+
"type": "array",
|
|
2429
|
+
"items": {
|
|
2430
|
+
"type": "object",
|
|
2431
|
+
"additionalProperties": false,
|
|
2432
|
+
"required": [
|
|
2433
|
+
"when",
|
|
2434
|
+
"add"
|
|
2435
|
+
],
|
|
2436
|
+
"properties": {
|
|
2437
|
+
"when": {
|
|
2438
|
+
"$ref": "#/$defs/rule"
|
|
2439
|
+
},
|
|
2440
|
+
"add": {
|
|
2441
|
+
"$ref": "#/$defs/effect"
|
|
2442
|
+
}
|
|
2443
|
+
}
|
|
2444
|
+
}
|
|
2445
|
+
},
|
|
2446
|
+
"maxBoostPercent": {
|
|
2447
|
+
"$ref": "#/$defs/boost",
|
|
2448
|
+
"description": "The most the boosts add together."
|
|
2449
|
+
},
|
|
2450
|
+
"gate": {
|
|
2451
|
+
"anyOf": [
|
|
2452
|
+
{
|
|
2453
|
+
"$ref": "#/$defs/rule"
|
|
2454
|
+
},
|
|
2455
|
+
{
|
|
2456
|
+
"type": "array",
|
|
2457
|
+
"minItems": 1,
|
|
2458
|
+
"items": {
|
|
2459
|
+
"$ref": "#/$defs/rule"
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
2462
|
+
],
|
|
2463
|
+
"description": "For a farm of collectibles: which NFTs it takes. One rule, or up to 4 that the NFT must all pass (\"level\" at least 100 and \"affection\" at least 6)."
|
|
2464
|
+
},
|
|
2465
|
+
"growth": {
|
|
2466
|
+
"anyOf": [
|
|
2467
|
+
{
|
|
2468
|
+
"$ref": "#/$defs/growth"
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
"type": "array",
|
|
2472
|
+
"minItems": 1,
|
|
2473
|
+
"items": {
|
|
2474
|
+
"$ref": "#/$defs/growth"
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
],
|
|
2478
|
+
"description": "What staying in grows on a collectible: one growth, or up to 4 (+1 \"level\" and +2 \"affection\" a day), each under names of its own. Points a collectible earns by staying in, written on it with the level they reach: on the NFT itself when the game has authority over it (its own collection, or a Core NFT whose Attributes plugin names the game), and in the game's Sheet of it otherwise. Anything that reads attributes reads them: this farm's boosts, a box's odds, a gate, a recipe's need, a grant's gate."
|
|
2479
|
+
},
|
|
2480
|
+
"runs": {
|
|
2481
|
+
"$ref": "#/$defs/duration",
|
|
2482
|
+
"description": "How long the farm runs from when it goes live (a mission open for a week: \"7d\"). It takes no seat whose lock would run past its end, and pays and grows nothing after it; seats leave as before. Left out: for good."
|
|
2483
|
+
},
|
|
2484
|
+
"lockAttribute": {
|
|
2485
|
+
"type": "string",
|
|
2486
|
+
"minLength": 1,
|
|
2487
|
+
"description": "For a farm of collectibles: the attribute the farm writes each staked collectible's lock under, as the time it ends (Unix seconds), and reads when it leaves. Whatever moves a number moves it: a recipe `raises` it by \"-1d\" with `fromNow` for a price (a way out early; the price can be burned, or paid into this farm's rewards vault (\"farm:<key>\"), shared by the seats there), a roll's `shifts` add a day (jail). A mission's prize still needs the tier's own lock to have run, and a tier that rolls rolls whenever the collectible leaves. A recipe reaches a collectible staked in escrow (the default) on its seat."
|
|
2488
|
+
},
|
|
2489
|
+
"upkeepAttribute": {
|
|
2490
|
+
"type": "string",
|
|
2491
|
+
"minLength": 1,
|
|
2492
|
+
"description": "For a farm of collectibles: an upkeep. The attribute that says until when (Unix seconds) a staked collectible earns and grows: fuel, food, a license. A recipe sells it (`raises` with `fromNow`: \"+1d\" for 10 FUEL, up to \"3d\" ahead), and it runs out by itself. Run dry, the seat earns and grows nothing more from that time, however late it is next touched. Fuel bought counts once the seat is refreshed (anyone sends `refresh`; the play page sends it with the recipe). A mission's prize needs the upkeep to last its tier's lock."
|
|
2493
|
+
},
|
|
2494
|
+
"exitFeeTo": {
|
|
2495
|
+
"type": "string",
|
|
2496
|
+
"pattern": "^(burn|rewards|pool:[a-z][a-z0-9-]{0,31})$",
|
|
2497
|
+
"description": "Where early-exit fees go: \"burn\", \"rewards\" (the farm's own rewards vault, shared by the stakers who stay: a farm whose rewards are its staked token), or \"pool:<key>\". Needed when a tier has `exitFee`."
|
|
2498
|
+
}
|
|
2499
|
+
}
|
|
2500
|
+
},
|
|
2501
|
+
"grant": {
|
|
2502
|
+
"type": "object",
|
|
2503
|
+
"additionalProperties": false,
|
|
2504
|
+
"required": [
|
|
2505
|
+
"key",
|
|
2506
|
+
"name"
|
|
2507
|
+
],
|
|
2508
|
+
"description": "A reward handed out to wallets that earned it: one collectible of an item, a fixed amount from a pool, or a roll of a box (any random prize). A voucher key signs who earned it (one of `vouchers`, or of `keys`), or the wallet is on an approved list. With none of them the grant is open: any wallet claims, within its limits (with a gate, a collectible shown claims once too). The program keeps every claim within the limits. Each wallet can receive at most 256 distinct voucher rounds per grant incarnation, retained permanently; open claims do not consume round slots, and a list written in xsolana.json pays each wallet once. Closing and recreating starts a new incarnation with separate vouchers and receipts.",
|
|
2509
|
+
"properties": {
|
|
2510
|
+
"key": {
|
|
2511
|
+
"$ref": "#/$defs/key"
|
|
2512
|
+
},
|
|
2513
|
+
"id": {
|
|
2514
|
+
"type": "integer",
|
|
2515
|
+
"minimum": 1,
|
|
2516
|
+
"maximum": 65535
|
|
2517
|
+
},
|
|
2518
|
+
"name": {
|
|
2519
|
+
"type": "string",
|
|
2520
|
+
"maxLength": 40
|
|
2521
|
+
},
|
|
2522
|
+
"gives": {
|
|
2523
|
+
"type": "object",
|
|
2524
|
+
"additionalProperties": false,
|
|
2525
|
+
"properties": {
|
|
2526
|
+
"item": {
|
|
2527
|
+
"$ref": "#/$defs/key"
|
|
2528
|
+
},
|
|
2529
|
+
"pool": {
|
|
2530
|
+
"$ref": "#/$defs/key"
|
|
2531
|
+
},
|
|
2532
|
+
"amount": {
|
|
2533
|
+
"$ref": "#/$defs/amount"
|
|
2534
|
+
},
|
|
2535
|
+
"roll": {
|
|
2536
|
+
"$ref": "#/$defs/key",
|
|
2537
|
+
"description": "A box the wallet gets a roll of: whatever it gives, at random (a quest chest, a daily spin, a stash's NFT). The grant's funds pay its order."
|
|
2538
|
+
}
|
|
2539
|
+
},
|
|
2540
|
+
"description": "An older way to write the prize: {\"item\": key}, {\"pool\": key, \"amount\": n} or {\"roll\": box key}. Prefer \"prize\"."
|
|
2541
|
+
},
|
|
2542
|
+
"vouchers": {
|
|
2543
|
+
"type": "array",
|
|
2544
|
+
"maxItems": 3,
|
|
2545
|
+
"items": {
|
|
2546
|
+
"$ref": "#/$defs/address"
|
|
2547
|
+
},
|
|
2548
|
+
"description": "Up to three public keys whose signature says a wallet earned it (a server you run, a play host). Never a private key."
|
|
2549
|
+
},
|
|
2550
|
+
"list": {
|
|
2551
|
+
"type": "array",
|
|
2552
|
+
"maxItems": 100000,
|
|
2553
|
+
"items": {
|
|
2554
|
+
"anyOf": [
|
|
2555
|
+
{
|
|
2556
|
+
"$ref": "#/$defs/address"
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
"type": "object",
|
|
2560
|
+
"additionalProperties": false,
|
|
2561
|
+
"required": [
|
|
2562
|
+
"wallet"
|
|
2563
|
+
],
|
|
2564
|
+
"properties": {
|
|
2565
|
+
"wallet": {
|
|
2566
|
+
"$ref": "#/$defs/address"
|
|
2567
|
+
},
|
|
2568
|
+
"amount": {
|
|
2569
|
+
"$ref": "#/$defs/amount",
|
|
2570
|
+
"description": "What this wallet claims (tokens, up to the grant's own amount); absent: the grant's amount."
|
|
2571
|
+
},
|
|
2572
|
+
"round": {
|
|
2573
|
+
"type": "integer",
|
|
2574
|
+
"minimum": 0,
|
|
2575
|
+
"maximum": 4294967295,
|
|
2576
|
+
"description": "A round of its own: the same wallet listed again under another round claims again (monthly vesting, a season's airdrop)."
|
|
2577
|
+
}
|
|
2578
|
+
}
|
|
2579
|
+
}
|
|
2580
|
+
]
|
|
2581
|
+
},
|
|
2582
|
+
"description": "Wallets approved in advance (an allow list): an address, or { \"wallet\", \"amount\", \"round\" } for an amount of its own and a round. Kept in this file; only its Merkle root goes on chain."
|
|
2583
|
+
},
|
|
2584
|
+
"limits": {
|
|
2585
|
+
"type": "object",
|
|
2586
|
+
"additionalProperties": false,
|
|
2587
|
+
"properties": {
|
|
2588
|
+
"perWallet": {
|
|
2589
|
+
"type": "integer",
|
|
2590
|
+
"minimum": 0,
|
|
2591
|
+
"maximum": 4294967295
|
|
2592
|
+
},
|
|
2593
|
+
"perPerson": {
|
|
2594
|
+
"type": "integer",
|
|
2595
|
+
"minimum": 0,
|
|
2596
|
+
"maximum": 4294967295
|
|
2597
|
+
},
|
|
2598
|
+
"perDay": {
|
|
2599
|
+
"type": "integer",
|
|
2600
|
+
"minimum": 0,
|
|
2601
|
+
"maximum": 4294967295
|
|
2602
|
+
},
|
|
2603
|
+
"total": {
|
|
2604
|
+
"type": "integer",
|
|
2605
|
+
"minimum": 0,
|
|
2606
|
+
"maximum": 4294967295
|
|
2607
|
+
},
|
|
2608
|
+
"until": {
|
|
2609
|
+
"$ref": "#/$defs/time"
|
|
2610
|
+
},
|
|
2611
|
+
"perKey": {
|
|
2612
|
+
"type": "integer",
|
|
2613
|
+
"minimum": 0,
|
|
2614
|
+
"maximum": 4294967295,
|
|
2615
|
+
"description": "Claims one voucher key may sign (a promo code's key: 1)."
|
|
2616
|
+
},
|
|
2617
|
+
"perWalletEach": {
|
|
2618
|
+
"$ref": "#/$defs/perWalletEach"
|
|
2619
|
+
},
|
|
2620
|
+
"opens": {
|
|
2621
|
+
"$ref": "#/$defs/time"
|
|
2622
|
+
}
|
|
2623
|
+
},
|
|
2624
|
+
"description": "0 or left out is no limit."
|
|
2625
|
+
},
|
|
2626
|
+
"gate": {
|
|
2627
|
+
"$ref": "#/$defs/gate",
|
|
2628
|
+
"description": "The receiving wallet must hold such a collectible."
|
|
2629
|
+
},
|
|
2630
|
+
"fund": {
|
|
2631
|
+
"$ref": "#/$defs/amount",
|
|
2632
|
+
"description": "SOL put in the grant's funds when it goes live: every claim's rent and fee is paid from them."
|
|
2633
|
+
},
|
|
2634
|
+
"active": {
|
|
2635
|
+
"type": "boolean",
|
|
2636
|
+
"default": true
|
|
2637
|
+
},
|
|
2638
|
+
"keys": {
|
|
2639
|
+
"type": "array",
|
|
2640
|
+
"maxItems": 100000,
|
|
2641
|
+
"items": {
|
|
2642
|
+
"$ref": "#/$defs/address"
|
|
2643
|
+
},
|
|
2644
|
+
"description": "More voucher keys, any number: one per promo code, event host or door scanner. Kept in this file; only their Merkle root goes on chain. Set limits.perKey to 1 for codes that pay once each."
|
|
2645
|
+
},
|
|
2646
|
+
"prize": {
|
|
2647
|
+
"$ref": "#/$defs/prize",
|
|
2648
|
+
"description": "What each claim gives (a prize). The grant's funds pay what it opens."
|
|
2649
|
+
},
|
|
2650
|
+
"wallets": {
|
|
2651
|
+
"type": "integer",
|
|
2652
|
+
"minimum": 1,
|
|
2653
|
+
"description": "About how many wallets will claim it over its life (with `rounds`, how many rounds each): it sizes how its records are kept (one list up to ~100,000, more lists above). Default: its list's length."
|
|
2654
|
+
},
|
|
2655
|
+
"rounds": {
|
|
2656
|
+
"type": "integer",
|
|
2657
|
+
"minimum": 1,
|
|
2658
|
+
"description": "About how many rounds each wallet will be paid over its life. Default 1."
|
|
2659
|
+
}
|
|
2660
|
+
}
|
|
2661
|
+
},
|
|
2662
|
+
"gate": {
|
|
2663
|
+
"description": "Who may use it: players who show an NFT that passes a rule (`{ \"item\": \"pass\" }`, or `{ \"collection\": address }` for any NFT of a collection, with an attribute test if you like), or a list of wallets (`{ \"wallets\": [address, …] }`, at most 16: a duel's two players, a tournament's entrants). Or a list of any size (`{ \"list\": [address, …] }`: an allowlist, a snapshot of holders): the program keeps its root, and each player passes their proof. Or a stake (`{ \"staked\": { \"farm\": key, \"atLeast\": n } }`): the wallet holds at least that much of the farm token staked in that farm of tokens, staked before the second it is used.",
|
|
2664
|
+
"anyOf": [
|
|
2665
|
+
{
|
|
2666
|
+
"$ref": "#/$defs/rule"
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
"type": "object",
|
|
2670
|
+
"additionalProperties": false,
|
|
2671
|
+
"required": [
|
|
2672
|
+
"wallets"
|
|
2673
|
+
],
|
|
2674
|
+
"properties": {
|
|
2675
|
+
"wallets": {
|
|
2676
|
+
"type": "array",
|
|
2677
|
+
"minItems": 0,
|
|
2678
|
+
"items": {
|
|
2679
|
+
"$ref": "#/$defs/address"
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
}
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
"type": "object",
|
|
2686
|
+
"additionalProperties": false,
|
|
2687
|
+
"required": [
|
|
2688
|
+
"list"
|
|
2689
|
+
],
|
|
2690
|
+
"properties": {
|
|
2691
|
+
"list": {
|
|
2692
|
+
"type": "array",
|
|
2693
|
+
"minItems": 1,
|
|
2694
|
+
"maxItems": 1048576,
|
|
2695
|
+
"uniqueItems": true,
|
|
2696
|
+
"items": {
|
|
2697
|
+
"$ref": "#/$defs/address"
|
|
2698
|
+
},
|
|
2699
|
+
"description": "The wallets that may: an allowlist of any size. The program keeps only its root; each player passes their proof."
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
"type": "object",
|
|
2705
|
+
"additionalProperties": false,
|
|
2706
|
+
"required": [
|
|
2707
|
+
"staked"
|
|
2708
|
+
],
|
|
2709
|
+
"properties": {
|
|
2710
|
+
"staked": {
|
|
2711
|
+
"type": "object",
|
|
2712
|
+
"additionalProperties": false,
|
|
2713
|
+
"required": [
|
|
2714
|
+
"farm",
|
|
2715
|
+
"atLeast"
|
|
2716
|
+
],
|
|
2717
|
+
"description": "A stake to enter: the wallet’s seat in `farm` (a farm of a token in this spec) holds at least `atLeast` of its token, staked before this second (launchpad tiers, stake to play).",
|
|
2718
|
+
"properties": {
|
|
2719
|
+
"farm": {
|
|
2720
|
+
"$ref": "#/$defs/key"
|
|
2721
|
+
},
|
|
2722
|
+
"atLeast": {
|
|
2723
|
+
"$ref": "#/$defs/amount",
|
|
2724
|
+
"description": "The least stake, in whole units of the farm’s token; above 0."
|
|
2725
|
+
}
|
|
2726
|
+
}
|
|
2727
|
+
}
|
|
2728
|
+
}
|
|
2729
|
+
}
|
|
2730
|
+
]
|
|
2731
|
+
},
|
|
2732
|
+
"perWalletEach": {
|
|
2733
|
+
"type": "object",
|
|
2734
|
+
"additionalProperties": false,
|
|
2735
|
+
"required": [
|
|
2736
|
+
"count"
|
|
2737
|
+
],
|
|
2738
|
+
"description": "How many one wallet may do in each window of time: `{ \"count\": 1, \"every\": \"1d\" }` is once a day (windows counted from the Unix epoch, a UTC day for \"1d\").",
|
|
2739
|
+
"properties": {
|
|
2740
|
+
"count": {
|
|
2741
|
+
"type": "integer",
|
|
2742
|
+
"minimum": 1,
|
|
2743
|
+
"maximum": 4294967295
|
|
2744
|
+
},
|
|
2745
|
+
"every": {
|
|
2746
|
+
"$ref": "#/$defs/duration",
|
|
2747
|
+
"default": "1d"
|
|
2748
|
+
}
|
|
2749
|
+
}
|
|
2750
|
+
},
|
|
2751
|
+
"growth": {
|
|
2752
|
+
"type": "object",
|
|
2753
|
+
"additionalProperties": false,
|
|
2754
|
+
"required": [
|
|
2755
|
+
"perDay"
|
|
2756
|
+
],
|
|
2757
|
+
"description": "Points a collectible earns by staying in, written under `attribute`, with the level they reach under `level` when there are `levels`. Without `levels` the points themselves can be the level: { \"attribute\": \"level\", \"perDay\": 1 } is a level a day.",
|
|
2758
|
+
"properties": {
|
|
2759
|
+
"attribute": {
|
|
2760
|
+
"type": "string",
|
|
2761
|
+
"minLength": 1,
|
|
2762
|
+
"default": "xp",
|
|
2763
|
+
"description": "The attribute the points are written under."
|
|
2764
|
+
},
|
|
2765
|
+
"perDay": {
|
|
2766
|
+
"type": "integer",
|
|
2767
|
+
"minimum": 1,
|
|
2768
|
+
"maximum": 4294967295,
|
|
2769
|
+
"description": "Points a day at x1; the seat's tier and boosts scale it."
|
|
2770
|
+
},
|
|
2771
|
+
"level": {
|
|
2772
|
+
"type": "string",
|
|
2773
|
+
"minLength": 1,
|
|
2774
|
+
"default": "level",
|
|
2775
|
+
"description": "The attribute the level is written under, when there are `levels`."
|
|
2776
|
+
},
|
|
2777
|
+
"levels": {
|
|
2778
|
+
"type": "array",
|
|
2779
|
+
"items": {
|
|
2780
|
+
"type": "integer",
|
|
2781
|
+
"minimum": 1,
|
|
2782
|
+
"maximum": 4294967295
|
|
2783
|
+
},
|
|
2784
|
+
"description": "The points each level needs, rising: [100, 300, 600] reaches level 1 at 100 points and level 3 at 600. Left out: points only."
|
|
2785
|
+
},
|
|
2786
|
+
"streak": {
|
|
2787
|
+
"type": "boolean",
|
|
2788
|
+
"default": false,
|
|
2789
|
+
"description": "The points go back to 0 when the collectible leaves this farm: a streak, not a lifetime. Not in a farm that watches (custody \"watch\")."
|
|
2790
|
+
}
|
|
2791
|
+
}
|
|
2792
|
+
},
|
|
2793
|
+
"stash": {
|
|
2794
|
+
"type": "object",
|
|
2795
|
+
"additionalProperties": false,
|
|
2796
|
+
"required": [
|
|
2797
|
+
"key",
|
|
2798
|
+
"name",
|
|
2799
|
+
"nfts"
|
|
2800
|
+
],
|
|
2801
|
+
"description": "A stash: NFTs of any collection the game holds until a prize names one or a roll gives one away. Any kind: a Core asset (with or without the game's authority), a Token Metadata NFT, a compressed NFT. A roll takes the one it picks out of the stash at once, so two winners never get the same one, and an empty stash can't be won. The game's owner or authority can put more in, or take one out, at any time (`loot.stashIx`).",
|
|
2802
|
+
"properties": {
|
|
2803
|
+
"key": {
|
|
2804
|
+
"$ref": "#/$defs/key"
|
|
2805
|
+
},
|
|
2806
|
+
"id": {
|
|
2807
|
+
"type": "integer",
|
|
2808
|
+
"minimum": 1,
|
|
2809
|
+
"maximum": 4294967295,
|
|
2810
|
+
"description": "The program's number for it. Written when it goes live; never change it after."
|
|
2811
|
+
},
|
|
2812
|
+
"name": {
|
|
2813
|
+
"type": "string",
|
|
2814
|
+
"maxLength": 40
|
|
2815
|
+
},
|
|
2816
|
+
"collection": {
|
|
2817
|
+
"$ref": "#/$defs/address",
|
|
2818
|
+
"description": "The Core collection its Core NFTs listed as plain addresses are in. Default: the game's own collection (which exists only once the economy is live)."
|
|
2819
|
+
},
|
|
2820
|
+
"nfts": {
|
|
2821
|
+
"type": "array",
|
|
2822
|
+
"items": {
|
|
2823
|
+
"anyOf": [
|
|
2824
|
+
{
|
|
2825
|
+
"$ref": "#/$defs/address"
|
|
2826
|
+
},
|
|
2827
|
+
{
|
|
2828
|
+
"type": "object",
|
|
2829
|
+
"additionalProperties": false,
|
|
2830
|
+
"required": [
|
|
2831
|
+
"asset"
|
|
2832
|
+
],
|
|
2833
|
+
"properties": {
|
|
2834
|
+
"asset": {
|
|
2835
|
+
"$ref": "#/$defs/address"
|
|
2836
|
+
},
|
|
2837
|
+
"collection": {
|
|
2838
|
+
"$ref": "#/$defs/address",
|
|
2839
|
+
"description": "Its Core collection, when it is not the stash's."
|
|
2840
|
+
},
|
|
2841
|
+
"weight": {
|
|
2842
|
+
"type": "integer",
|
|
2843
|
+
"minimum": 1,
|
|
2844
|
+
"maximum": 4294967295,
|
|
2845
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2846
|
+
}
|
|
2847
|
+
}
|
|
2848
|
+
},
|
|
2849
|
+
{
|
|
2850
|
+
"type": "object",
|
|
2851
|
+
"additionalProperties": false,
|
|
2852
|
+
"required": [
|
|
2853
|
+
"mint"
|
|
2854
|
+
],
|
|
2855
|
+
"properties": {
|
|
2856
|
+
"mint": {
|
|
2857
|
+
"$ref": "#/$defs/address"
|
|
2858
|
+
},
|
|
2859
|
+
"programmable": {
|
|
2860
|
+
"type": "boolean",
|
|
2861
|
+
"default": false,
|
|
2862
|
+
"description": "A pNFT."
|
|
2863
|
+
},
|
|
2864
|
+
"ruleSet": {
|
|
2865
|
+
"$ref": "#/$defs/address",
|
|
2866
|
+
"description": "A pNFT's rule set, when it has one."
|
|
2867
|
+
},
|
|
2868
|
+
"weight": {
|
|
2869
|
+
"type": "integer",
|
|
2870
|
+
"minimum": 1,
|
|
2871
|
+
"maximum": 4294967295,
|
|
2872
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2873
|
+
}
|
|
2874
|
+
}
|
|
2875
|
+
},
|
|
2876
|
+
{
|
|
2877
|
+
"type": "object",
|
|
2878
|
+
"additionalProperties": false,
|
|
2879
|
+
"required": [
|
|
2880
|
+
"compressed"
|
|
2881
|
+
],
|
|
2882
|
+
"properties": {
|
|
2883
|
+
"compressed": {
|
|
2884
|
+
"$ref": "#/$defs/address",
|
|
2885
|
+
"description": "A compressed NFT's asset id."
|
|
2886
|
+
},
|
|
2887
|
+
"weight": {
|
|
2888
|
+
"type": "integer",
|
|
2889
|
+
"minimum": 1,
|
|
2890
|
+
"maximum": 4294967295,
|
|
2891
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2892
|
+
}
|
|
2893
|
+
}
|
|
2894
|
+
}
|
|
2895
|
+
],
|
|
2896
|
+
"description": "A Core asset's address (in the stash's `collection`), { \"asset\", \"collection\" }, a Token Metadata NFT { \"mint\", \"programmable\", \"ruleSet\" }, or a compressed NFT { \"compressed\": asset id }."
|
|
2897
|
+
},
|
|
2898
|
+
"description": "The NFTs the owner's wallet puts in when the economy goes live (it must hold them then). Empty: a stash filled later with `loot.stashIx`."
|
|
2899
|
+
},
|
|
2900
|
+
"about": {
|
|
2901
|
+
"$ref": "#/$defs/words"
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
},
|
|
2905
|
+
"prize": {
|
|
2906
|
+
"type": "object",
|
|
2907
|
+
"required": [
|
|
2908
|
+
"gives"
|
|
2909
|
+
],
|
|
2910
|
+
"additionalProperties": false,
|
|
2911
|
+
"description": "A prize, given the same way on every route that gives one (a grant, a lottery's place, a contest's winners, a mission's tier, a recipe's line), in the transaction that wins it; only a roll is settled after, by the oracle. item: one of `item` (a collectible minted to the winner, or with `compressed` a compressed NFT of it; a normal item is the game's backend's to deliver). tokens: `amount`, minted (`from`: \"mint\", in `currency`, a token the game mints) or paid from a pool (\"pool:<key>\", in what it holds). share: `percent` of what `pool` holds then (a jackpot). nft: the NFT `nft`, which the stash `stash` lists (given once: the first winner takes it). roll: a roll of `box` for the winner: chance (a box can give a stash's NFT at random). raffled (a lottery's place only, of a lottery that draws once): one NFT drawn at random from the lottery's own stash (its `nfts`).",
|
|
2912
|
+
"properties": {
|
|
2913
|
+
"gives": {
|
|
2914
|
+
"enum": [
|
|
2915
|
+
"item",
|
|
2916
|
+
"tokens",
|
|
2917
|
+
"nft",
|
|
2918
|
+
"roll",
|
|
2919
|
+
"raffled"
|
|
2920
|
+
]
|
|
2921
|
+
},
|
|
2922
|
+
"item": {
|
|
2923
|
+
"$ref": "#/$defs/key"
|
|
2924
|
+
},
|
|
2925
|
+
"compressed": {
|
|
2926
|
+
"type": "boolean",
|
|
2927
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted into the project's tree (`compressedTree`) instead of a Core asset. No rent for each one (a Core collectible's is about 0.003 SOL, paid by whoever sends the claim), so a badge or an airdrop can be given by the thousand. The item's collection must take compressed NFTs: the setup's collection does when the spec gives one before it goes live; one made without it never can. Not soulbound, and not in a box's outcomes. Once the tree is full, no more are given."
|
|
2928
|
+
},
|
|
2929
|
+
"amount": {
|
|
2930
|
+
"$ref": "#/$defs/amount"
|
|
2931
|
+
},
|
|
2932
|
+
"currency": {
|
|
2933
|
+
"$ref": "#/$defs/key",
|
|
2934
|
+
"description": "For tokens minted: the token. Default: the game's."
|
|
2935
|
+
},
|
|
2936
|
+
"from": {
|
|
2937
|
+
"type": "string",
|
|
2938
|
+
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
2939
|
+
},
|
|
2940
|
+
"stash": {
|
|
2941
|
+
"$ref": "#/$defs/key",
|
|
2942
|
+
"description": "For nft: the stash that lists it."
|
|
2943
|
+
},
|
|
2944
|
+
"nft": {
|
|
2945
|
+
"$ref": "#/$defs/address",
|
|
2946
|
+
"description": "For nft: the NFT's address (a Core asset, a Token Metadata NFT's mint)."
|
|
2947
|
+
},
|
|
2948
|
+
"box": {
|
|
2949
|
+
"$ref": "#/$defs/key",
|
|
2950
|
+
"description": "For roll: the box rolled for the winner."
|
|
2951
|
+
},
|
|
2952
|
+
"held": {
|
|
2953
|
+
"type": "boolean",
|
|
2954
|
+
"description": "For nft, in a lottery's place only: the NFT waits in the lottery's own stash (no `stash`), which nothing but that place's prize can take out while the lottery runs; the winner gets it before any ticket money moves. The lottery draws once."
|
|
2955
|
+
},
|
|
2956
|
+
"split": {
|
|
2957
|
+
"type": "boolean",
|
|
2958
|
+
"description": "For tokens, as a contest's prize only: the whole amount is set aside when the contest is decided (or the decision is refused), and each winning entry takes its part in proportion to what it put in: a presale, a fair launch, a crowdfund that rewards backers by amount."
|
|
2959
|
+
},
|
|
2960
|
+
"collection": {
|
|
2961
|
+
"$ref": "#/$defs/address",
|
|
2962
|
+
"description": "For a held nft (a raffle's): the Core collection it is in. Default: the game's own."
|
|
2963
|
+
}
|
|
2964
|
+
}
|
|
2965
|
+
},
|
|
2966
|
+
"spend": {
|
|
2967
|
+
"description": "Where an NFT paid goes: \"burn\" (a Core asset burned, any other kind sent to the incinerator's address), \"treasury\" (the treasury wallet), { \"giveTo\": \"<wallet>\" }, or { \"stash\": \"<key>\" } (into one of this spec's stashes, to be given away as a prize).",
|
|
2968
|
+
"anyOf": [
|
|
2969
|
+
{
|
|
2970
|
+
"enum": [
|
|
2971
|
+
"burn",
|
|
2972
|
+
"treasury"
|
|
2973
|
+
]
|
|
2974
|
+
},
|
|
2975
|
+
{
|
|
2976
|
+
"type": "object",
|
|
2977
|
+
"additionalProperties": false,
|
|
2978
|
+
"required": [
|
|
2979
|
+
"giveTo"
|
|
2980
|
+
],
|
|
2981
|
+
"properties": {
|
|
2982
|
+
"giveTo": {
|
|
2983
|
+
"$ref": "#/$defs/address"
|
|
2984
|
+
}
|
|
2985
|
+
}
|
|
2986
|
+
},
|
|
2987
|
+
{
|
|
2988
|
+
"type": "object",
|
|
2989
|
+
"additionalProperties": false,
|
|
2990
|
+
"required": [
|
|
2991
|
+
"stash"
|
|
2992
|
+
],
|
|
2993
|
+
"properties": {
|
|
2994
|
+
"stash": {
|
|
2995
|
+
"$ref": "#/$defs/key"
|
|
2996
|
+
}
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
]
|
|
3000
|
+
},
|
|
3001
|
+
"nftPrice": {
|
|
3002
|
+
"type": "object",
|
|
3003
|
+
"additionalProperties": false,
|
|
3004
|
+
"required": [
|
|
3005
|
+
"rule"
|
|
3006
|
+
],
|
|
3007
|
+
"description": "An NFT as the price: one the player holds that passes `rule`, sent where `then` says (default \"burn\").",
|
|
3008
|
+
"properties": {
|
|
3009
|
+
"rule": {
|
|
3010
|
+
"$ref": "#/$defs/rule"
|
|
3011
|
+
},
|
|
3012
|
+
"then": {
|
|
3013
|
+
"$ref": "#/$defs/spend"
|
|
3014
|
+
}
|
|
3015
|
+
}
|
|
3016
|
+
},
|
|
3017
|
+
"table": {
|
|
3018
|
+
"type": "object",
|
|
3019
|
+
"additionalProperties": false,
|
|
3020
|
+
"required": [
|
|
3021
|
+
"key",
|
|
3022
|
+
"rows"
|
|
3023
|
+
],
|
|
3024
|
+
"description": "A table (`table.rs`): rows, each a weight and an optional stock, and a label (`\"labels\"`, up to 32 bytes each) or nothing (`\"numbers\"`: a row gives its own number, from 0). Sealed once written: its weights never change and its stock only goes down. A row with a stock leaves the draws once it is used up.",
|
|
3025
|
+
"properties": {
|
|
3026
|
+
"key": {
|
|
3027
|
+
"$ref": "#/$defs/key"
|
|
3028
|
+
},
|
|
3029
|
+
"id": {
|
|
3030
|
+
"type": "integer",
|
|
3031
|
+
"minimum": 1,
|
|
3032
|
+
"maximum": 4294967295
|
|
3033
|
+
},
|
|
3034
|
+
"kind": {
|
|
3035
|
+
"enum": [
|
|
3036
|
+
"labels",
|
|
3037
|
+
"numbers"
|
|
3038
|
+
],
|
|
3039
|
+
"default": "labels"
|
|
3040
|
+
},
|
|
3041
|
+
"rows": {
|
|
3042
|
+
"type": "array",
|
|
3043
|
+
"minItems": 1,
|
|
3044
|
+
"items": {
|
|
3045
|
+
"type": "object",
|
|
3046
|
+
"additionalProperties": false,
|
|
3047
|
+
"required": [
|
|
3048
|
+
"weight"
|
|
3049
|
+
],
|
|
3050
|
+
"properties": {
|
|
3051
|
+
"label": {
|
|
3052
|
+
"type": "string"
|
|
3053
|
+
},
|
|
3054
|
+
"weight": {
|
|
3055
|
+
"type": "integer",
|
|
3056
|
+
"minimum": 1,
|
|
3057
|
+
"maximum": 4294967295
|
|
3058
|
+
},
|
|
3059
|
+
"stock": {
|
|
3060
|
+
"type": "integer",
|
|
3061
|
+
"minimum": 1,
|
|
3062
|
+
"maximum": 4294967294,
|
|
3063
|
+
"description": "How many units may draw it: left out, never runs out."
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
3069
|
+
}
|
|
3070
|
+
}
|
|
3071
|
+
}
|