@xgamesfun/solana 0.20.1 → 0.25.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/README.md +95 -52
- package/bin/xsolana.mjs +23 -8
- package/examples/blind-forge.json +2 -4
- package/examples/coin-flip-arena.json +4 -12
- package/examples/duel-arena.json +1 -4
- package/examples/elements-set.json +2 -9
- package/examples/expedition-guild.json +1 -8
- package/examples/fair-presale.json +1 -3
- package/examples/guild-missions.json +3 -10
- package/examples/halving-seasons.json +4 -9
- package/examples/hero-trials.json +15 -6
- package/examples/holder-den.json +38 -0
- package/examples/holders-drop.json +105 -0
- package/examples/ideas.json +788 -788
- package/examples/match-predictions.json +24 -0
- package/examples/merge-2048.json +5 -5
- package/examples/nft-raffle.json +1 -0
- package/examples/pack-league.json +108 -0
- package/examples/paper-hands-farm.json +4 -16
- package/examples/partner-vault.json +20 -7
- package/examples/sacrifice-raffle.json +2 -10
- package/examples/shelter-fair.json +1 -0
- package/examples/stakers-draw.json +4 -15
- package/examples/star-fleet.json +1 -8
- package/examples/starforce.json +6 -6
- package/examples/stride-sneakers.json +164 -0
- package/examples/trade-in-shop.json +2 -3
- package/js/approve/details.mjs +122 -52
- package/js/approve/ed25519.mjs +5 -1
- package/js/approve/live-check.mjs +83 -26
- package/js/approve/page.html +217 -78
- package/js/approve/page.js +43 -15
- package/js/approve/server.mjs +290 -73
- package/js/chain/base58.js +7 -1
- package/js/chain/borsh.js +24 -11
- package/js/chain/bytes.js +11 -8
- package/js/chain/core.js +35 -7
- package/js/chain/curve.js +1 -1
- package/js/chain/lookup.js +124 -36
- package/js/chain/mint.js +6 -2
- package/js/chain/pda.js +2 -2
- package/js/chain/programs.js +6 -6
- package/js/chain/rpc.js +44 -16
- package/js/chain/token.js +13 -2
- package/js/chain/token2022.js +55 -16
- package/js/chain/tx.js +32 -22
- package/js/client/accounts.js +653 -131
- package/js/client/compressed.js +4 -3
- package/js/client/grant.js +267 -83
- package/js/client/idl/loot.js +1 -1
- package/js/client/idl/loot.json +2406 -2176
- package/js/client/index.js +1 -0
- package/js/client/ix.js +3059 -664
- package/js/client/pda.js +39 -33
- package/js/client/policy.js +52 -24
- package/js/client/random.js +70 -0
- package/js/client/sizes.js +414 -16
- package/js/client/traits.js +14 -5
- package/js/connect/connect.mjs +59 -17
- package/js/economy/check.mjs +4153 -725
- package/js/economy/cost.mjs +403 -64
- package/js/economy/examples.mjs +176 -35
- package/js/economy/explain.mjs +466 -111
- package/js/economy/guide.mjs +296 -72
- package/js/economy/legal.mjs +12 -6
- package/js/economy/live.mjs +83 -19
- package/js/economy/model.mjs +462 -124
- package/js/economy/plan.mjs +1306 -219
- package/js/economy/schema.json +390 -484
- package/js/economy/secrets.mjs +17 -7
- package/js/economy/simulate.mjs +883 -223
- package/js/economy/txsize.mjs +15 -3
- package/js/economy/validate.mjs +61 -24
- package/js/mcp/server.mjs +42 -14
- package/js/mcp/tools.mjs +307 -88
- package/js/play/index.js +2864 -619
- package/js/play/keys.js +193 -0
- package/js/results/index.js +223 -30
- package/js/results/server.js +230 -0
- package/js/results/wire.js +64 -16
- package/package.json +6 -4
- package/release.json +5 -5
- package/skills/xsolana-economy/SKILL.md +39 -21
- package/skills/xsolana-economy/references/after-launch.md +58 -38
- package/skills/xsolana-economy/references/apps.md +97 -50
- package/skills/xsolana-economy/references/sentence-to-spec.md +148 -121
- package/skills/xsolana-economy/references/telling-the-person.md +61 -17
- package/types/chain/core.d.ts +4 -2
- package/types/chain/lookup.d.ts +5 -2
- package/types/chain/rpc.d.ts +3 -1
- package/types/client/accounts.d.ts +217 -56
- package/types/client/grant.d.ts +72 -27
- package/types/client/idl/loot.d.ts +602 -549
- package/types/client/index.d.ts +1 -0
- package/types/client/ix.d.ts +3884 -247
- package/types/client/pda.d.ts +22 -16
- package/types/client/policy.d.ts +39 -14
- package/types/client/random.d.ts +26 -0
- package/types/client/sizes.d.ts +93 -5
- package/types/economy/check.d.mts +5 -10
- package/types/economy/cost.d.mts +2 -1
- package/types/economy/guide.d.mts +5 -0
- package/types/economy/live.d.mts +16 -1
- package/types/economy/model.d.mts +151 -38
- package/types/economy/plan.d.mts +237 -194
- package/types/economy/simulate.d.mts +21 -13
- package/types/mcp/tools.d.mts +21 -13
- package/types/play/index.d.ts +453 -53
- package/types/play/keys.d.ts +51 -0
- package/types/results/index.d.ts +7 -6
- package/types/results/server.d.ts +126 -0
- package/types/results/wire.d.ts +1 -1
package/js/economy/schema.json
CHANGED
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
"title": "A loot economy (spec version 2)",
|
|
5
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
6
|
"type": "object",
|
|
7
|
-
"required": [
|
|
8
|
-
"version"
|
|
9
|
-
],
|
|
7
|
+
"required": ["version"],
|
|
10
8
|
"additionalProperties": false,
|
|
11
9
|
"properties": {
|
|
12
10
|
"version": {
|
|
@@ -56,7 +54,6 @@
|
|
|
56
54
|
},
|
|
57
55
|
"tokens": {
|
|
58
56
|
"type": "array",
|
|
59
|
-
"maxItems": 16,
|
|
60
57
|
"items": {
|
|
61
58
|
"$ref": "#/$defs/token"
|
|
62
59
|
}
|
|
@@ -74,7 +71,6 @@
|
|
|
74
71
|
},
|
|
75
72
|
"items": {
|
|
76
73
|
"type": "array",
|
|
77
|
-
"maxItems": 64,
|
|
78
74
|
"items": {
|
|
79
75
|
"$ref": "#/$defs/item"
|
|
80
76
|
}
|
|
@@ -88,93 +84,85 @@
|
|
|
88
84
|
},
|
|
89
85
|
"stashes": {
|
|
90
86
|
"type": "array",
|
|
91
|
-
"maxItems": 32,
|
|
92
87
|
"items": {
|
|
93
88
|
"$ref": "#/$defs/stash"
|
|
94
89
|
},
|
|
95
90
|
"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."
|
|
96
91
|
},
|
|
92
|
+
"tables": {
|
|
93
|
+
"type": "array",
|
|
94
|
+
"items": {
|
|
95
|
+
"$ref": "#/$defs/table"
|
|
96
|
+
},
|
|
97
|
+
"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."
|
|
98
|
+
},
|
|
97
99
|
"boxes": {
|
|
98
100
|
"type": "array",
|
|
99
|
-
"maxItems": 32,
|
|
100
101
|
"items": {
|
|
101
102
|
"$ref": "#/$defs/box"
|
|
102
103
|
}
|
|
103
104
|
},
|
|
104
105
|
"payments": {
|
|
105
106
|
"type": "array",
|
|
106
|
-
"maxItems": 32,
|
|
107
107
|
"items": {
|
|
108
108
|
"$ref": "#/$defs/payment"
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
"recipes": {
|
|
112
112
|
"type": "array",
|
|
113
|
-
"maxItems": 64,
|
|
114
113
|
"items": {
|
|
115
114
|
"$ref": "#/$defs/recipe"
|
|
116
115
|
}
|
|
117
116
|
},
|
|
118
117
|
"schedules": {
|
|
119
118
|
"type": "array",
|
|
120
|
-
"maxItems": 32,
|
|
121
119
|
"items": {
|
|
122
120
|
"$ref": "#/$defs/schedule"
|
|
123
121
|
}
|
|
124
122
|
},
|
|
125
123
|
"lotteries": {
|
|
126
124
|
"type": "array",
|
|
127
|
-
"maxItems": 16,
|
|
128
125
|
"items": {
|
|
129
126
|
"$ref": "#/$defs/lottery"
|
|
130
127
|
}
|
|
131
128
|
},
|
|
132
129
|
"farms": {
|
|
133
130
|
"type": "array",
|
|
134
|
-
"maxItems": 32,
|
|
135
131
|
"items": {
|
|
136
132
|
"$ref": "#/$defs/farm"
|
|
137
133
|
}
|
|
138
134
|
},
|
|
139
135
|
"contests": {
|
|
140
136
|
"type": "array",
|
|
141
|
-
"maxItems": 16,
|
|
142
137
|
"items": {
|
|
143
138
|
"$ref": "#/$defs/contest"
|
|
144
139
|
}
|
|
145
140
|
},
|
|
146
141
|
"auctions": {
|
|
147
142
|
"type": "array",
|
|
148
|
-
"maxItems": 16,
|
|
149
143
|
"items": {
|
|
150
144
|
"$ref": "#/$defs/auction"
|
|
151
145
|
}
|
|
152
146
|
},
|
|
153
147
|
"holds": {
|
|
154
148
|
"type": "array",
|
|
155
|
-
"maxItems": 16,
|
|
156
149
|
"items": {
|
|
157
150
|
"$ref": "#/$defs/hold"
|
|
158
151
|
}
|
|
159
152
|
},
|
|
160
153
|
"grants": {
|
|
161
154
|
"type": "array",
|
|
162
|
-
"maxItems": 64,
|
|
163
155
|
"items": {
|
|
164
156
|
"$ref": "#/$defs/grant"
|
|
165
157
|
}
|
|
166
158
|
},
|
|
167
159
|
"traits": {
|
|
168
160
|
"type": "array",
|
|
169
|
-
"maxItems": 16,
|
|
170
161
|
"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.",
|
|
171
162
|
"items": {
|
|
172
163
|
"type": "object",
|
|
173
164
|
"additionalProperties": false,
|
|
174
|
-
"required": [
|
|
175
|
-
"collection",
|
|
176
|
-
"root"
|
|
177
|
-
],
|
|
165
|
+
"required": ["collection", "root"],
|
|
178
166
|
"properties": {
|
|
179
167
|
"collection": {
|
|
180
168
|
"$ref": "#/$defs/address",
|
|
@@ -193,7 +181,6 @@
|
|
|
193
181
|
},
|
|
194
182
|
"decisions": {
|
|
195
183
|
"type": "array",
|
|
196
|
-
"maxItems": 32,
|
|
197
184
|
"items": {
|
|
198
185
|
"$ref": "#/$defs/decision"
|
|
199
186
|
}
|
|
@@ -213,12 +200,11 @@
|
|
|
213
200
|
},
|
|
214
201
|
"collections": {
|
|
215
202
|
"type": "array",
|
|
216
|
-
"maxItems": 7,
|
|
217
203
|
"uniqueItems": true,
|
|
218
204
|
"items": {
|
|
219
205
|
"$ref": "#/$defs/address"
|
|
220
206
|
},
|
|
221
|
-
"description": "Core collections the owner already controls (their update authority) that the project takes too, besides the one it makes:
|
|
207
|
+
"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)."
|
|
222
208
|
},
|
|
223
209
|
"compressedTree": {
|
|
224
210
|
"type": "object",
|
|
@@ -247,8 +233,7 @@
|
|
|
247
233
|
},
|
|
248
234
|
"link": {
|
|
249
235
|
"type": "string",
|
|
250
|
-
"pattern": "^https://"
|
|
251
|
-
"maxLength": 200
|
|
236
|
+
"pattern": "^https://"
|
|
252
237
|
},
|
|
253
238
|
"words": {
|
|
254
239
|
"type": "string",
|
|
@@ -293,15 +278,12 @@
|
|
|
293
278
|
},
|
|
294
279
|
"destination": {
|
|
295
280
|
"type": "string",
|
|
296
|
-
"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), 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.",
|
|
297
|
-
"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}|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})$"
|
|
281
|
+
"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.",
|
|
282
|
+
"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})$"
|
|
298
283
|
},
|
|
299
284
|
"share": {
|
|
300
285
|
"type": "object",
|
|
301
|
-
"required": [
|
|
302
|
-
"to",
|
|
303
|
-
"percent"
|
|
304
|
-
],
|
|
286
|
+
"required": ["to", "percent"],
|
|
305
287
|
"additionalProperties": false,
|
|
306
288
|
"properties": {
|
|
307
289
|
"to": {
|
|
@@ -314,7 +296,6 @@
|
|
|
314
296
|
},
|
|
315
297
|
"split": {
|
|
316
298
|
"type": "array",
|
|
317
|
-
"maxItems": 4,
|
|
318
299
|
"items": {
|
|
319
300
|
"$ref": "#/$defs/share"
|
|
320
301
|
},
|
|
@@ -335,10 +316,7 @@
|
|
|
335
316
|
},
|
|
336
317
|
"fall": {
|
|
337
318
|
"type": "object",
|
|
338
|
-
"required": [
|
|
339
|
-
"step",
|
|
340
|
-
"every"
|
|
341
|
-
],
|
|
319
|
+
"required": ["step", "every"],
|
|
342
320
|
"additionalProperties": false,
|
|
343
321
|
"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.",
|
|
344
322
|
"properties": {
|
|
@@ -355,10 +333,7 @@
|
|
|
355
333
|
"$ref": "#/$defs/time"
|
|
356
334
|
},
|
|
357
335
|
"clock": {
|
|
358
|
-
"enum": [
|
|
359
|
-
"sale",
|
|
360
|
-
"shared"
|
|
361
|
-
],
|
|
336
|
+
"enum": ["sale", "shared"],
|
|
362
337
|
"default": "sale"
|
|
363
338
|
}
|
|
364
339
|
}
|
|
@@ -366,7 +341,7 @@
|
|
|
366
341
|
"life": {
|
|
367
342
|
"type": "object",
|
|
368
343
|
"additionalProperties": false,
|
|
369
|
-
"description": "When a recipe may take a collectible of this item. 0 switches a rule off.
|
|
344
|
+
"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.",
|
|
370
345
|
"properties": {
|
|
371
346
|
"readyAfter": {
|
|
372
347
|
"$ref": "#/$defs/duration"
|
|
@@ -386,10 +361,7 @@
|
|
|
386
361
|
},
|
|
387
362
|
"token": {
|
|
388
363
|
"type": "object",
|
|
389
|
-
"required": [
|
|
390
|
-
"key",
|
|
391
|
-
"source"
|
|
392
|
-
],
|
|
364
|
+
"required": ["key", "source"],
|
|
393
365
|
"additionalProperties": false,
|
|
394
366
|
"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).",
|
|
395
367
|
"properties": {
|
|
@@ -397,12 +369,7 @@
|
|
|
397
369
|
"$ref": "#/$defs/key"
|
|
398
370
|
},
|
|
399
371
|
"source": {
|
|
400
|
-
"enum": [
|
|
401
|
-
"sol",
|
|
402
|
-
"existing",
|
|
403
|
-
"project",
|
|
404
|
-
"game"
|
|
405
|
-
],
|
|
372
|
+
"enum": ["sol", "existing", "project", "game"],
|
|
406
373
|
"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."
|
|
407
374
|
},
|
|
408
375
|
"name": {
|
|
@@ -423,22 +390,14 @@
|
|
|
423
390
|
"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)."
|
|
424
391
|
},
|
|
425
392
|
"program": {
|
|
426
|
-
"enum": [
|
|
427
|
-
"spl-token",
|
|
428
|
-
"token-2022"
|
|
429
|
-
],
|
|
393
|
+
"enum": ["spl-token", "token-2022"],
|
|
430
394
|
"default": "spl-token"
|
|
431
395
|
},
|
|
432
396
|
"mint": {
|
|
433
397
|
"$ref": "#/$defs/address"
|
|
434
398
|
},
|
|
435
399
|
"venue": {
|
|
436
|
-
"enum": [
|
|
437
|
-
"games.fun",
|
|
438
|
-
"pump.fun",
|
|
439
|
-
"meteora",
|
|
440
|
-
"other"
|
|
441
|
-
],
|
|
400
|
+
"enum": ["games.fun", "pump.fun", "meteora", "other"],
|
|
442
401
|
"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."
|
|
443
402
|
},
|
|
444
403
|
"uri": {
|
|
@@ -454,12 +413,7 @@
|
|
|
454
413
|
"description": "What the mint's own keys can do, as far as the creator knows. The checker warns about each one.",
|
|
455
414
|
"properties": {
|
|
456
415
|
"mintAuthority": {
|
|
457
|
-
"enum": [
|
|
458
|
-
"game",
|
|
459
|
-
"someone else",
|
|
460
|
-
"none",
|
|
461
|
-
"project"
|
|
462
|
-
]
|
|
416
|
+
"enum": ["game", "someone else", "none", "project"]
|
|
463
417
|
},
|
|
464
418
|
"freeze": {
|
|
465
419
|
"type": "boolean"
|
|
@@ -496,9 +450,7 @@
|
|
|
496
450
|
},
|
|
497
451
|
"collection": {
|
|
498
452
|
"type": "object",
|
|
499
|
-
"required": [
|
|
500
|
-
"name"
|
|
501
|
-
],
|
|
453
|
+
"required": ["name"],
|
|
502
454
|
"additionalProperties": false,
|
|
503
455
|
"description": "The Metaplex Core collection the game's collectibles are minted into.",
|
|
504
456
|
"properties": {
|
|
@@ -526,10 +478,7 @@
|
|
|
526
478
|
},
|
|
527
479
|
"item": {
|
|
528
480
|
"type": "object",
|
|
529
|
-
"required": [
|
|
530
|
-
"key",
|
|
531
|
-
"name"
|
|
532
|
-
],
|
|
481
|
+
"required": ["key", "name"],
|
|
533
482
|
"additionalProperties": false,
|
|
534
483
|
"properties": {
|
|
535
484
|
"key": {
|
|
@@ -542,31 +491,20 @@
|
|
|
542
491
|
"description": "The program's number for it. Written when it goes live; never change it after."
|
|
543
492
|
},
|
|
544
493
|
"name": {
|
|
545
|
-
"type": "string"
|
|
546
|
-
"maxLength": 32
|
|
494
|
+
"type": "string"
|
|
547
495
|
},
|
|
548
496
|
"description": {
|
|
549
497
|
"$ref": "#/$defs/words"
|
|
550
498
|
},
|
|
551
499
|
"kind": {
|
|
552
|
-
"enum": [
|
|
553
|
-
"collectible",
|
|
554
|
-
"normal"
|
|
555
|
-
],
|
|
500
|
+
"enum": ["collectible", "normal"],
|
|
556
501
|
"default": "collectible",
|
|
557
502
|
"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."
|
|
558
503
|
},
|
|
559
504
|
"rarity": {
|
|
560
505
|
"anyOf": [
|
|
561
506
|
{
|
|
562
|
-
"enum": [
|
|
563
|
-
"Common",
|
|
564
|
-
"Uncommon",
|
|
565
|
-
"Rare",
|
|
566
|
-
"Epic",
|
|
567
|
-
"Legendary",
|
|
568
|
-
"Mythic"
|
|
569
|
-
]
|
|
507
|
+
"enum": ["Common", "Uncommon", "Rare", "Epic", "Legendary", "Mythic"]
|
|
570
508
|
},
|
|
571
509
|
{
|
|
572
510
|
"type": "integer",
|
|
@@ -662,15 +600,38 @@
|
|
|
662
600
|
"collection": {
|
|
663
601
|
"$ref": "#/$defs/address",
|
|
664
602
|
"description": "A collectible's collection: one of `collections`. Default: the one the setup makes."
|
|
603
|
+
},
|
|
604
|
+
"drawn": {
|
|
605
|
+
"type": "array",
|
|
606
|
+
"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, and its link `{serial}` (the name always ends with “ #<serial>”). A fresh item is given only by a box's roll.",
|
|
607
|
+
"items": {
|
|
608
|
+
"type": "object",
|
|
609
|
+
"additionalProperties": false,
|
|
610
|
+
"required": ["attribute"],
|
|
611
|
+
"properties": {
|
|
612
|
+
"attribute": {
|
|
613
|
+
"type": "string",
|
|
614
|
+
"minLength": 1
|
|
615
|
+
},
|
|
616
|
+
"table": {
|
|
617
|
+
"$ref": "#/$defs/key"
|
|
618
|
+
},
|
|
619
|
+
"min": {
|
|
620
|
+
"type": "integer",
|
|
621
|
+
"minimum": 0
|
|
622
|
+
},
|
|
623
|
+
"max": {
|
|
624
|
+
"type": "integer",
|
|
625
|
+
"minimum": 0
|
|
626
|
+
}
|
|
627
|
+
}
|
|
628
|
+
}
|
|
665
629
|
}
|
|
666
630
|
}
|
|
667
631
|
},
|
|
668
632
|
"pool": {
|
|
669
633
|
"type": "object",
|
|
670
|
-
"required": [
|
|
671
|
-
"key",
|
|
672
|
-
"currency"
|
|
673
|
-
],
|
|
634
|
+
"required": ["key", "currency"],
|
|
674
635
|
"additionalProperties": false,
|
|
675
636
|
"description": "A vault only the game can spend from: a prize pool, a lottery's pot, stakers' rewards.",
|
|
676
637
|
"properties": {
|
|
@@ -697,25 +658,12 @@
|
|
|
697
658
|
},
|
|
698
659
|
"outcome": {
|
|
699
660
|
"type": "object",
|
|
700
|
-
"required": [
|
|
701
|
-
"gives"
|
|
702
|
-
],
|
|
661
|
+
"required": ["gives"],
|
|
703
662
|
"additionalProperties": false,
|
|
704
|
-
"description": "One way a box can land: an item, tokens from a pool (`pay
|
|
663
|
+
"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.",
|
|
705
664
|
"properties": {
|
|
706
665
|
"gives": {
|
|
707
|
-
"enum": [
|
|
708
|
-
"item",
|
|
709
|
-
"pay",
|
|
710
|
-
"share",
|
|
711
|
-
"stash",
|
|
712
|
-
"tokens",
|
|
713
|
-
"nft",
|
|
714
|
-
"roll",
|
|
715
|
-
"bundle",
|
|
716
|
-
"burn",
|
|
717
|
-
"nothing"
|
|
718
|
-
]
|
|
666
|
+
"enum": ["item", "pay", "stash", "tokens", "nft", "roll", "bundle", "nothing"]
|
|
719
667
|
},
|
|
720
668
|
"chance": {
|
|
721
669
|
"type": "number",
|
|
@@ -736,25 +684,17 @@
|
|
|
736
684
|
"amount": {
|
|
737
685
|
"$ref": "#/$defs/amount"
|
|
738
686
|
},
|
|
739
|
-
"percent": {
|
|
740
|
-
"$ref": "#/$defs/percent"
|
|
741
|
-
},
|
|
742
687
|
"shifts": {
|
|
743
688
|
"type": "array",
|
|
744
|
-
"maxItems": 2,
|
|
745
689
|
"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.",
|
|
746
690
|
"items": {
|
|
747
691
|
"type": "object",
|
|
748
692
|
"additionalProperties": false,
|
|
749
|
-
"required": [
|
|
750
|
-
"attribute",
|
|
751
|
-
"by"
|
|
752
|
-
],
|
|
693
|
+
"required": ["attribute", "by"],
|
|
753
694
|
"properties": {
|
|
754
695
|
"attribute": {
|
|
755
696
|
"type": "string",
|
|
756
|
-
"minLength": 1
|
|
757
|
-
"maxLength": 32
|
|
697
|
+
"minLength": 1
|
|
758
698
|
},
|
|
759
699
|
"by": {
|
|
760
700
|
"anyOf": [
|
|
@@ -784,7 +724,7 @@
|
|
|
784
724
|
"$ref": "#/$defs/duration"
|
|
785
725
|
}
|
|
786
726
|
],
|
|
787
|
-
"description": "The most it reaches when raising. With `fromNow`, how far past now."
|
|
727
|
+
"description": "The most it reaches when raising; left out, no cap. With `fromNow`, how far past now."
|
|
788
728
|
},
|
|
789
729
|
"fromNow": {
|
|
790
730
|
"type": "boolean",
|
|
@@ -798,18 +738,12 @@
|
|
|
798
738
|
"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.",
|
|
799
739
|
"anyOf": [
|
|
800
740
|
{
|
|
801
|
-
"enum": [
|
|
802
|
-
"back",
|
|
803
|
-
"burn",
|
|
804
|
-
"treasury"
|
|
805
|
-
]
|
|
741
|
+
"enum": ["back", "burn", "treasury"]
|
|
806
742
|
},
|
|
807
743
|
{
|
|
808
744
|
"type": "object",
|
|
809
745
|
"additionalProperties": false,
|
|
810
|
-
"required": [
|
|
811
|
-
"giveTo"
|
|
812
|
-
],
|
|
746
|
+
"required": ["giveTo"],
|
|
813
747
|
"properties": {
|
|
814
748
|
"giveTo": {
|
|
815
749
|
"$ref": "#/$defs/address"
|
|
@@ -819,9 +753,7 @@
|
|
|
819
753
|
{
|
|
820
754
|
"type": "object",
|
|
821
755
|
"additionalProperties": false,
|
|
822
|
-
"required": [
|
|
823
|
-
"stash"
|
|
824
|
-
],
|
|
756
|
+
"required": ["stash"],
|
|
825
757
|
"properties": {
|
|
826
758
|
"stash": {
|
|
827
759
|
"$ref": "#/$defs/key"
|
|
@@ -854,13 +786,10 @@
|
|
|
854
786
|
"prizes": {
|
|
855
787
|
"type": "array",
|
|
856
788
|
"minItems": 1,
|
|
857
|
-
"
|
|
858
|
-
"description": "For bundle: what it gives together, at most three: each { gives: item | pay | share | stash | tokens | nft | roll, … } as an outcome of one says.",
|
|
789
|
+
"description": "For bundle: what it gives together, any number: each { gives: item | pay | share | stash | tokens | nft | roll, … } as an outcome of one says.",
|
|
859
790
|
"items": {
|
|
860
791
|
"type": "object",
|
|
861
|
-
"required": [
|
|
862
|
-
"gives"
|
|
863
|
-
],
|
|
792
|
+
"required": ["gives"],
|
|
864
793
|
"additionalProperties": false,
|
|
865
794
|
"properties": {
|
|
866
795
|
"item": {
|
|
@@ -872,9 +801,6 @@
|
|
|
872
801
|
"amount": {
|
|
873
802
|
"$ref": "#/$defs/amount"
|
|
874
803
|
},
|
|
875
|
-
"percent": {
|
|
876
|
-
"$ref": "#/$defs/percent"
|
|
877
|
-
},
|
|
878
804
|
"stash": {
|
|
879
805
|
"$ref": "#/$defs/key",
|
|
880
806
|
"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`."
|
|
@@ -897,34 +823,24 @@
|
|
|
897
823
|
"description": "For roll: the box rolled for the player when the order settles."
|
|
898
824
|
},
|
|
899
825
|
"gives": {
|
|
900
|
-
"enum": [
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
"tokens",
|
|
906
|
-
"nft",
|
|
907
|
-
"roll"
|
|
908
|
-
]
|
|
826
|
+
"enum": ["item", "pay", "stash", "tokens", "nft", "roll"]
|
|
827
|
+
},
|
|
828
|
+
"compressed": {
|
|
829
|
+
"type": "boolean",
|
|
830
|
+
"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."
|
|
909
831
|
}
|
|
910
832
|
}
|
|
911
833
|
}
|
|
912
834
|
},
|
|
913
|
-
"
|
|
835
|
+
"compressed": {
|
|
914
836
|
"type": "boolean",
|
|
915
|
-
"
|
|
916
|
-
"description": "For bundle: the payment is burned, all of it, in place of the box's split."
|
|
837
|
+
"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
838
|
}
|
|
918
839
|
}
|
|
919
840
|
},
|
|
920
841
|
"box": {
|
|
921
842
|
"type": "object",
|
|
922
|
-
"required": [
|
|
923
|
-
"key",
|
|
924
|
-
"name",
|
|
925
|
-
"price",
|
|
926
|
-
"outcomes"
|
|
927
|
-
],
|
|
843
|
+
"required": ["key", "name", "price", "outcomes"],
|
|
928
844
|
"additionalProperties": false,
|
|
929
845
|
"properties": {
|
|
930
846
|
"key": {
|
|
@@ -958,6 +874,11 @@
|
|
|
958
874
|
"default": false,
|
|
959
875
|
"description": "Each item's chance shrinks with what is left of its supply."
|
|
960
876
|
},
|
|
877
|
+
"whenOut": {
|
|
878
|
+
"enum": ["stopSales", "drawLeft"],
|
|
879
|
+
"default": "stopSales",
|
|
880
|
+
"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\"."
|
|
881
|
+
},
|
|
961
882
|
"active": {
|
|
962
883
|
"type": "boolean",
|
|
963
884
|
"default": true,
|
|
@@ -969,7 +890,6 @@
|
|
|
969
890
|
"outcomes": {
|
|
970
891
|
"type": "array",
|
|
971
892
|
"minItems": 1,
|
|
972
|
-
"maxItems": 8,
|
|
973
893
|
"items": {
|
|
974
894
|
"$ref": "#/$defs/outcome"
|
|
975
895
|
}
|
|
@@ -980,7 +900,6 @@
|
|
|
980
900
|
},
|
|
981
901
|
"odds": {
|
|
982
902
|
"type": "array",
|
|
983
|
-
"maxItems": 4,
|
|
984
903
|
"items": {
|
|
985
904
|
"$ref": "#/$defs/odds"
|
|
986
905
|
}
|
|
@@ -1010,18 +929,12 @@
|
|
|
1010
929
|
"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 }).",
|
|
1011
930
|
"anyOf": [
|
|
1012
931
|
{
|
|
1013
|
-
"enum": [
|
|
1014
|
-
"back",
|
|
1015
|
-
"burn",
|
|
1016
|
-
"treasury"
|
|
1017
|
-
]
|
|
932
|
+
"enum": ["back", "burn", "treasury"]
|
|
1018
933
|
},
|
|
1019
934
|
{
|
|
1020
935
|
"type": "object",
|
|
1021
936
|
"additionalProperties": false,
|
|
1022
|
-
"required": [
|
|
1023
|
-
"giveTo"
|
|
1024
|
-
],
|
|
937
|
+
"required": ["giveTo"],
|
|
1025
938
|
"properties": {
|
|
1026
939
|
"giveTo": {
|
|
1027
940
|
"$ref": "#/$defs/address"
|
|
@@ -1031,9 +944,7 @@
|
|
|
1031
944
|
{
|
|
1032
945
|
"type": "object",
|
|
1033
946
|
"additionalProperties": false,
|
|
1034
|
-
"required": [
|
|
1035
|
-
"stash"
|
|
1036
|
-
],
|
|
947
|
+
"required": ["stash"],
|
|
1037
948
|
"properties": {
|
|
1038
949
|
"stash": {
|
|
1039
950
|
"$ref": "#/$defs/key"
|
|
@@ -1041,16 +952,44 @@
|
|
|
1041
952
|
}
|
|
1042
953
|
}
|
|
1043
954
|
]
|
|
955
|
+
},
|
|
956
|
+
"slots": {
|
|
957
|
+
"type": "array",
|
|
958
|
+
"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.",
|
|
959
|
+
"items": {
|
|
960
|
+
"type": "object",
|
|
961
|
+
"additionalProperties": false,
|
|
962
|
+
"required": ["count"],
|
|
963
|
+
"properties": {
|
|
964
|
+
"count": {
|
|
965
|
+
"type": "integer",
|
|
966
|
+
"minimum": 1
|
|
967
|
+
},
|
|
968
|
+
"from": {
|
|
969
|
+
"type": "array",
|
|
970
|
+
"items": {
|
|
971
|
+
"type": "integer",
|
|
972
|
+
"minimum": 0,
|
|
973
|
+
"maximum": 65535
|
|
974
|
+
}
|
|
975
|
+
},
|
|
976
|
+
"distinct": {
|
|
977
|
+
"type": "boolean"
|
|
978
|
+
},
|
|
979
|
+
"share": {
|
|
980
|
+
"type": "number",
|
|
981
|
+
"minimum": 0,
|
|
982
|
+
"maximum": 100,
|
|
983
|
+
"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."
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
}
|
|
1044
987
|
}
|
|
1045
988
|
}
|
|
1046
989
|
},
|
|
1047
990
|
"payment": {
|
|
1048
991
|
"type": "object",
|
|
1049
|
-
"required": [
|
|
1050
|
-
"key",
|
|
1051
|
-
"name",
|
|
1052
|
-
"amount"
|
|
1053
|
-
],
|
|
992
|
+
"required": ["key", "name", "amount"],
|
|
1054
993
|
"additionalProperties": false,
|
|
1055
994
|
"description": "A payment a player signs for something the game gives off chain: an entry fee, an attempt at a level, a tip.",
|
|
1056
995
|
"properties": {
|
|
@@ -1079,22 +1018,12 @@
|
|
|
1079
1018
|
},
|
|
1080
1019
|
"input": {
|
|
1081
1020
|
"type": "object",
|
|
1082
|
-
"required": [
|
|
1083
|
-
"takes"
|
|
1084
|
-
],
|
|
1021
|
+
"required": ["takes"],
|
|
1085
1022
|
"additionalProperties": false,
|
|
1086
|
-
"description": "burn: `count` collectibles of `item`, burned. use: one collectible of `item`, kept (counts a use). renew: one kept, its uses counted from zero again. 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`).",
|
|
1023
|
+
"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`).",
|
|
1087
1024
|
"properties": {
|
|
1088
1025
|
"takes": {
|
|
1089
|
-
"enum": [
|
|
1090
|
-
"burn",
|
|
1091
|
-
"use",
|
|
1092
|
-
"renew",
|
|
1093
|
-
"show",
|
|
1094
|
-
"staked",
|
|
1095
|
-
"pay",
|
|
1096
|
-
"trade"
|
|
1097
|
-
]
|
|
1026
|
+
"enum": ["burn", "use", "renew", "show", "staked", "pay", "trade"]
|
|
1098
1027
|
},
|
|
1099
1028
|
"item": {
|
|
1100
1029
|
"$ref": "#/$defs/key"
|
|
@@ -1106,7 +1035,7 @@
|
|
|
1106
1035
|
"count": {
|
|
1107
1036
|
"type": "integer",
|
|
1108
1037
|
"minimum": 1,
|
|
1109
|
-
"maximum":
|
|
1038
|
+
"maximum": 255
|
|
1110
1039
|
},
|
|
1111
1040
|
"amount": {
|
|
1112
1041
|
"$ref": "#/$defs/amount"
|
|
@@ -1129,20 +1058,12 @@
|
|
|
1129
1058
|
},
|
|
1130
1059
|
"output": {
|
|
1131
1060
|
"type": "object",
|
|
1132
|
-
"required": [
|
|
1133
|
-
"gives"
|
|
1134
|
-
],
|
|
1061
|
+
"required": ["gives"],
|
|
1135
1062
|
"additionalProperties": false,
|
|
1136
|
-
"description": "A prize (see `prize`), or a roll on a collectible the recipe keeps: { \"gives\": \"roll\", \"box\": key, \"on\": place } (a risky upgrade;
|
|
1063
|
+
"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).",
|
|
1137
1064
|
"properties": {
|
|
1138
1065
|
"gives": {
|
|
1139
|
-
"enum": [
|
|
1140
|
-
"item",
|
|
1141
|
-
"tokens",
|
|
1142
|
-
"share",
|
|
1143
|
-
"nft",
|
|
1144
|
-
"roll"
|
|
1145
|
-
]
|
|
1066
|
+
"enum": ["item", "tokens", "nft", "roll"]
|
|
1146
1067
|
},
|
|
1147
1068
|
"item": {
|
|
1148
1069
|
"$ref": "#/$defs/key"
|
|
@@ -1162,12 +1083,6 @@
|
|
|
1162
1083
|
"type": "string",
|
|
1163
1084
|
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
1164
1085
|
},
|
|
1165
|
-
"pool": {
|
|
1166
|
-
"$ref": "#/$defs/key"
|
|
1167
|
-
},
|
|
1168
|
-
"percent": {
|
|
1169
|
-
"$ref": "#/$defs/percent"
|
|
1170
|
-
},
|
|
1171
1086
|
"box": {
|
|
1172
1087
|
"$ref": "#/$defs/key",
|
|
1173
1088
|
"description": "For `roll`: the box rolled, free, for the player."
|
|
@@ -1175,7 +1090,7 @@
|
|
|
1175
1090
|
"on": {
|
|
1176
1091
|
"type": "integer",
|
|
1177
1092
|
"minimum": 0,
|
|
1178
|
-
"maximum":
|
|
1093
|
+
"maximum": 254,
|
|
1179
1094
|
"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."
|
|
1180
1095
|
},
|
|
1181
1096
|
"stash": {
|
|
@@ -1190,11 +1105,7 @@
|
|
|
1190
1105
|
},
|
|
1191
1106
|
"recipe": {
|
|
1192
1107
|
"type": "object",
|
|
1193
|
-
"required": [
|
|
1194
|
-
"key",
|
|
1195
|
-
"name",
|
|
1196
|
-
"in"
|
|
1197
|
-
],
|
|
1108
|
+
"required": ["key", "name", "in"],
|
|
1198
1109
|
"additionalProperties": false,
|
|
1199
1110
|
"properties": {
|
|
1200
1111
|
"key": {
|
|
@@ -1215,40 +1126,32 @@
|
|
|
1215
1126
|
},
|
|
1216
1127
|
"in": {
|
|
1217
1128
|
"type": "array",
|
|
1218
|
-
"maxItems": 8,
|
|
1219
1129
|
"items": {
|
|
1220
1130
|
"$ref": "#/$defs/input"
|
|
1221
1131
|
}
|
|
1222
1132
|
},
|
|
1223
1133
|
"out": {
|
|
1224
1134
|
"type": "array",
|
|
1225
|
-
"maxItems": 8,
|
|
1226
1135
|
"items": {
|
|
1227
1136
|
"$ref": "#/$defs/output"
|
|
1228
1137
|
}
|
|
1229
1138
|
},
|
|
1230
1139
|
"needs": {
|
|
1231
1140
|
"type": "array",
|
|
1232
|
-
"maxItems": 8,
|
|
1233
1141
|
"items": {
|
|
1234
1142
|
"type": "object",
|
|
1235
|
-
"required": [
|
|
1236
|
-
"place",
|
|
1237
|
-
"key",
|
|
1238
|
-
"atLeast"
|
|
1239
|
-
],
|
|
1143
|
+
"required": ["place", "key", "atLeast"],
|
|
1240
1144
|
"additionalProperties": false,
|
|
1241
1145
|
"description": "The collectible handed in at `place` (the first is 0) must carry a number `key` the authority wrote of at least `atLeast`.",
|
|
1242
1146
|
"properties": {
|
|
1243
1147
|
"place": {
|
|
1244
1148
|
"type": "integer",
|
|
1245
1149
|
"minimum": 0,
|
|
1246
|
-
"maximum":
|
|
1150
|
+
"maximum": 254
|
|
1247
1151
|
},
|
|
1248
1152
|
"key": {
|
|
1249
1153
|
"type": "string",
|
|
1250
|
-
"minLength": 1
|
|
1251
|
-
"maxLength": 32
|
|
1154
|
+
"minLength": 1
|
|
1252
1155
|
},
|
|
1253
1156
|
"atLeast": {
|
|
1254
1157
|
"type": "integer",
|
|
@@ -1260,58 +1163,46 @@
|
|
|
1260
1163
|
},
|
|
1261
1164
|
"keeps": {
|
|
1262
1165
|
"type": "array",
|
|
1263
|
-
"maxItems": 8,
|
|
1264
1166
|
"items": {
|
|
1265
1167
|
"type": "object",
|
|
1266
|
-
"required": [
|
|
1267
|
-
"key",
|
|
1268
|
-
"from",
|
|
1269
|
-
"to"
|
|
1270
|
-
],
|
|
1168
|
+
"required": ["key", "from", "to"],
|
|
1271
1169
|
"additionalProperties": false,
|
|
1272
1170
|
"description": "The new collectible `to` (the first made is 0) takes attribute `key` from the one handed in at `from`.",
|
|
1273
1171
|
"properties": {
|
|
1274
1172
|
"key": {
|
|
1275
1173
|
"type": "string",
|
|
1276
|
-
"minLength": 1
|
|
1277
|
-
"maxLength": 32
|
|
1174
|
+
"minLength": 1
|
|
1278
1175
|
},
|
|
1279
1176
|
"from": {
|
|
1280
1177
|
"type": "integer",
|
|
1281
1178
|
"minimum": 0,
|
|
1282
|
-
"maximum":
|
|
1179
|
+
"maximum": 254
|
|
1283
1180
|
},
|
|
1284
1181
|
"to": {
|
|
1285
1182
|
"type": "integer",
|
|
1286
1183
|
"minimum": 0,
|
|
1287
|
-
"maximum":
|
|
1184
|
+
"maximum": 254
|
|
1288
1185
|
}
|
|
1289
1186
|
}
|
|
1290
1187
|
}
|
|
1291
1188
|
},
|
|
1292
1189
|
"raises": {
|
|
1293
1190
|
"type": "array",
|
|
1294
|
-
"maxItems": 8,
|
|
1295
1191
|
"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\").",
|
|
1296
1192
|
"items": {
|
|
1297
1193
|
"type": "object",
|
|
1298
|
-
"required": [
|
|
1299
|
-
"place",
|
|
1300
|
-
"key",
|
|
1301
|
-
"by"
|
|
1302
|
-
],
|
|
1194
|
+
"required": ["place", "key", "by"],
|
|
1303
1195
|
"additionalProperties": false,
|
|
1304
1196
|
"properties": {
|
|
1305
1197
|
"place": {
|
|
1306
1198
|
"type": "integer",
|
|
1307
1199
|
"minimum": 0,
|
|
1308
|
-
"maximum":
|
|
1200
|
+
"maximum": 254,
|
|
1309
1201
|
"description": "Which collectible handed in (the first is 0); one that is kept."
|
|
1310
1202
|
},
|
|
1311
1203
|
"key": {
|
|
1312
1204
|
"type": "string",
|
|
1313
|
-
"minLength": 1
|
|
1314
|
-
"maxLength": 32
|
|
1205
|
+
"minLength": 1
|
|
1315
1206
|
},
|
|
1316
1207
|
"by": {
|
|
1317
1208
|
"anyOf": [
|
|
@@ -1341,7 +1232,7 @@
|
|
|
1341
1232
|
"$ref": "#/$defs/duration"
|
|
1342
1233
|
}
|
|
1343
1234
|
],
|
|
1344
|
-
"description": "The most it reaches;
|
|
1235
|
+
"description": "The most it reaches; left out, no cap. With `fromNow`, how far past now: \"3d\"."
|
|
1345
1236
|
},
|
|
1346
1237
|
"fromNow": {
|
|
1347
1238
|
"type": "boolean",
|
|
@@ -1372,11 +1263,7 @@
|
|
|
1372
1263
|
},
|
|
1373
1264
|
"schedule": {
|
|
1374
1265
|
"type": "object",
|
|
1375
|
-
"required": [
|
|
1376
|
-
"key",
|
|
1377
|
-
"does",
|
|
1378
|
-
"every"
|
|
1379
|
-
],
|
|
1266
|
+
"required": ["key", "does", "every"],
|
|
1380
1267
|
"additionalProperties": false,
|
|
1381
1268
|
"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.",
|
|
1382
1269
|
"properties": {
|
|
@@ -1393,12 +1280,7 @@
|
|
|
1393
1280
|
"maxLength": 40
|
|
1394
1281
|
},
|
|
1395
1282
|
"does": {
|
|
1396
|
-
"enum": [
|
|
1397
|
-
"issue",
|
|
1398
|
-
"burn",
|
|
1399
|
-
"move",
|
|
1400
|
-
"pay"
|
|
1401
|
-
]
|
|
1283
|
+
"enum": ["issue", "burn", "move", "pay"]
|
|
1402
1284
|
},
|
|
1403
1285
|
"currency": {
|
|
1404
1286
|
"$ref": "#/$defs/key"
|
|
@@ -1418,7 +1300,7 @@
|
|
|
1418
1300
|
"$ref": "#/$defs/destination"
|
|
1419
1301
|
}
|
|
1420
1302
|
],
|
|
1421
|
-
"description": "move: the pool it fills. pay: \"wallet:<address>\", \"account:<token account address>\" or \"holder:<asset address>\",
|
|
1303
|
+
"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\"."
|
|
1422
1304
|
},
|
|
1423
1305
|
"amount": {
|
|
1424
1306
|
"$ref": "#/$defs/amount"
|
|
@@ -1452,7 +1334,7 @@
|
|
|
1452
1334
|
},
|
|
1453
1335
|
"sealed": {
|
|
1454
1336
|
"type": "boolean",
|
|
1455
|
-
"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.
|
|
1337
|
+
"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."
|
|
1456
1338
|
},
|
|
1457
1339
|
"fund": {
|
|
1458
1340
|
"$ref": "#/$defs/amount",
|
|
@@ -1468,9 +1350,14 @@
|
|
|
1468
1350
|
},
|
|
1469
1351
|
"lottery": {
|
|
1470
1352
|
"type": "object",
|
|
1471
|
-
"required": [
|
|
1472
|
-
|
|
1473
|
-
|
|
1353
|
+
"required": ["key", "name"],
|
|
1354
|
+
"oneOf": [
|
|
1355
|
+
{
|
|
1356
|
+
"required": ["pot"]
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"required": ["rest"]
|
|
1360
|
+
}
|
|
1474
1361
|
],
|
|
1475
1362
|
"additionalProperties": false,
|
|
1476
1363
|
"properties": {
|
|
@@ -1488,20 +1375,29 @@
|
|
|
1488
1375
|
},
|
|
1489
1376
|
"price": {
|
|
1490
1377
|
"$ref": "#/$defs/amount",
|
|
1491
|
-
"description": "One ticket, in the
|
|
1378
|
+
"description": "One ticket, in the lottery's currency (or in `ticketCurrency`). Leave it out for a lottery whose tickets cost an NFT (`ticketNft`)."
|
|
1492
1379
|
},
|
|
1493
1380
|
"ticketCurrency": {
|
|
1494
1381
|
"$ref": "#/$defs/key",
|
|
1495
|
-
"description": "Tickets paid in another token are burned, and the
|
|
1382
|
+
"description": "Tickets paid in another token are burned, and no ticket money reaches the places: they are paid from what reaches the pot from elsewhere (\"pot\")."
|
|
1496
1383
|
},
|
|
1497
1384
|
"cutPercent": {
|
|
1498
1385
|
"$ref": "#/$defs/percent",
|
|
1499
|
-
"description": "The share of ticket money that goes to the treasury
|
|
1386
|
+
"description": "The share of ticket money that goes to the treasury before the places (the same as a split share to \"treasury\")."
|
|
1387
|
+
},
|
|
1388
|
+
"pot": {
|
|
1389
|
+
"type": "integer",
|
|
1390
|
+
"minimum": 0,
|
|
1391
|
+
"maximum": 15,
|
|
1392
|
+
"description": "Pays its places from a pot it keeps from round to round, this one of its 16 (0 unless it moves to a fresh one): each place takes its percent of what the pot holds at the draw with the round's ticket money, so the seed, gifts and shares sent to it (\"lottery:<key>\"), yield, and what earlier rounds' places left all count, and the next round always starts with what the round before left. Write exactly one of \"pot\" or \"rest\". A no-loss lottery needs a pot. Changing the number between rounds starts a fresh pot; every pot it opened is emptied to the owner when it closes."
|
|
1393
|
+
},
|
|
1394
|
+
"rest": {
|
|
1395
|
+
"$ref": "#/$defs/destination",
|
|
1396
|
+
"description": "Pays each round's places from that round's own ticket money only, and sends what they leave here: \"treasury\", \"burn\", \"wallet:<address>\", \"account:<token account>\", \"holder:<collectible>\", a pool, a farm or another lottery (\"lottery:<key>\"), never \"chosen\" or itself; a pool, farm or lottery named here counts the leftover only once someone pulls it. Nothing from outside can change a round's prizes: no seed, no gifts, no carry-over. Write exactly one of \"pot\" or \"rest\"."
|
|
1500
1397
|
},
|
|
1501
1398
|
"places": {
|
|
1502
1399
|
"type": "array",
|
|
1503
1400
|
"minItems": 1,
|
|
1504
|
-
"maxItems": 8,
|
|
1505
1401
|
"items": {
|
|
1506
1402
|
"anyOf": [
|
|
1507
1403
|
{
|
|
@@ -1520,13 +1416,19 @@
|
|
|
1520
1416
|
},
|
|
1521
1417
|
"prize": {
|
|
1522
1418
|
"$ref": "#/$defs/prize",
|
|
1523
|
-
"description": "What its winner gets besides its
|
|
1419
|
+
"description": "What its winner gets besides its percent of the money: a raffled NFT, a collectible, tokens, a roll of a box."
|
|
1420
|
+
},
|
|
1421
|
+
"times": {
|
|
1422
|
+
"type": "integer",
|
|
1423
|
+
"minimum": 1,
|
|
1424
|
+
"maximum": 40960,
|
|
1425
|
+
"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."
|
|
1524
1426
|
}
|
|
1525
1427
|
}
|
|
1526
1428
|
}
|
|
1527
1429
|
]
|
|
1528
1430
|
},
|
|
1529
|
-
"description": "What each place wins, first place first: a percent of the pot, or { \"percent\", \"prize\" }: a
|
|
1431
|
+
"description": "What each place wins, first place first: a percent of what the round pays from (its pot with the round's ticket money, or with \"rest\" that round's ticket money alone), or { \"percent\", \"prize\", \"times\" }: a percent and a prize for its winner (either, or both), for `times` places in a row. Default: one winner takes all."
|
|
1530
1432
|
},
|
|
1531
1433
|
"every": {
|
|
1532
1434
|
"$ref": "#/$defs/duration",
|
|
@@ -1540,15 +1442,36 @@
|
|
|
1540
1442
|
},
|
|
1541
1443
|
"currency": {
|
|
1542
1444
|
"$ref": "#/$defs/key",
|
|
1543
|
-
"description": "The pot's
|
|
1445
|
+
"description": "The token tickets are paid in and the places are paid in (and the pot's, with \"pot\"). Default: the game's currency."
|
|
1544
1446
|
},
|
|
1545
1447
|
"seed": {
|
|
1546
1448
|
"$ref": "#/$defs/amount",
|
|
1547
|
-
"description": "What the owner puts in the pot at go-live."
|
|
1449
|
+
"description": "What the owner puts in the pot at go-live (a lottery with \"pot\" only)."
|
|
1450
|
+
},
|
|
1451
|
+
"roundRent": {
|
|
1452
|
+
"$ref": "#/$defs/amount",
|
|
1453
|
+
"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."
|
|
1454
|
+
},
|
|
1455
|
+
"expect": {
|
|
1456
|
+
"type": "object",
|
|
1457
|
+
"additionalProperties": false,
|
|
1458
|
+
"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).",
|
|
1459
|
+
"properties": {
|
|
1460
|
+
"rounds": {
|
|
1461
|
+
"type": "integer",
|
|
1462
|
+
"minimum": 1,
|
|
1463
|
+
"maximum": 100
|
|
1464
|
+
},
|
|
1465
|
+
"entries": {
|
|
1466
|
+
"type": "integer",
|
|
1467
|
+
"minimum": 0,
|
|
1468
|
+
"maximum": 262000
|
|
1469
|
+
}
|
|
1470
|
+
}
|
|
1548
1471
|
},
|
|
1549
1472
|
"split": {
|
|
1550
1473
|
"$ref": "#/$defs/split",
|
|
1551
|
-
"description": "Where ticket money goes before the
|
|
1474
|
+
"description": "Where ticket money goes before the places (the rest is the round's money for its places): a charity, a referrer the buyer names (\"chosen\"), the treasury."
|
|
1552
1475
|
},
|
|
1553
1476
|
"perWallet": {
|
|
1554
1477
|
"type": "integer",
|
|
@@ -1558,11 +1481,11 @@
|
|
|
1558
1481
|
},
|
|
1559
1482
|
"ticketNft": {
|
|
1560
1483
|
"$ref": "#/$defs/nftPrice",
|
|
1561
|
-
"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
|
|
1484
|
+
"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 places are paid from what the owner and others put in its pot (\"pot\"), and its places' prizes."
|
|
1562
1485
|
},
|
|
1563
1486
|
"noLoss": {
|
|
1564
1487
|
"type": "boolean",
|
|
1565
|
-
"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."
|
|
1488
|
+
"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>\"). It needs \"pot\". No split, no cut and no `ticketCurrency`; NFT tickets come back too."
|
|
1566
1489
|
},
|
|
1567
1490
|
"minSold": {
|
|
1568
1491
|
"type": "integer",
|
|
@@ -1578,9 +1501,7 @@
|
|
|
1578
1501
|
{
|
|
1579
1502
|
"type": "object",
|
|
1580
1503
|
"additionalProperties": false,
|
|
1581
|
-
"required": [
|
|
1582
|
-
"nft"
|
|
1583
|
-
],
|
|
1504
|
+
"required": ["nft"],
|
|
1584
1505
|
"properties": {
|
|
1585
1506
|
"nft": {
|
|
1586
1507
|
"$ref": "#/$defs/address"
|
|
@@ -1593,17 +1514,38 @@
|
|
|
1593
1514
|
}
|
|
1594
1515
|
],
|
|
1595
1516
|
"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\" }."
|
|
1517
|
+
},
|
|
1518
|
+
"nfts": {
|
|
1519
|
+
"type": "array",
|
|
1520
|
+
"maxItems": 500,
|
|
1521
|
+
"items": {
|
|
1522
|
+
"anyOf": [
|
|
1523
|
+
{
|
|
1524
|
+
"$ref": "#/$defs/address"
|
|
1525
|
+
},
|
|
1526
|
+
{
|
|
1527
|
+
"type": "object",
|
|
1528
|
+
"additionalProperties": false,
|
|
1529
|
+
"required": ["nft"],
|
|
1530
|
+
"properties": {
|
|
1531
|
+
"nft": {
|
|
1532
|
+
"$ref": "#/$defs/address"
|
|
1533
|
+
},
|
|
1534
|
+
"collection": {
|
|
1535
|
+
"$ref": "#/$defs/address"
|
|
1536
|
+
}
|
|
1537
|
+
}
|
|
1538
|
+
}
|
|
1539
|
+
]
|
|
1540
|
+
},
|
|
1541
|
+
"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."
|
|
1596
1542
|
}
|
|
1597
1543
|
},
|
|
1598
|
-
"description": "Tickets
|
|
1544
|
+
"description": "Tickets sold in rounds, one random draw a round, the winners paid. It names where its places are paid from, exactly one of: \"pot\", a pot of its own kept from round to round that anything can add to (a seed, a share of a sale or payment, \"lottery:<key>\" in a split, a schedule that pays \"lottery:<key>\"); or \"rest\", each round's own ticket money alone, what the places leave going to that destination. Nothing but its winners' payouts takes from a pot: not the authority, a schedule, a farm or a recipe."
|
|
1599
1545
|
},
|
|
1600
1546
|
"contest": {
|
|
1601
1547
|
"type": "object",
|
|
1602
|
-
"required": [
|
|
1603
|
-
"key",
|
|
1604
|
-
"name",
|
|
1605
|
-
"sides"
|
|
1606
|
-
],
|
|
1548
|
+
"required": ["key", "name", "sides"],
|
|
1607
1549
|
"additionalProperties": false,
|
|
1608
1550
|
"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.",
|
|
1609
1551
|
"properties": {
|
|
@@ -1620,11 +1562,11 @@
|
|
|
1620
1562
|
"sides": {
|
|
1621
1563
|
"type": "integer",
|
|
1622
1564
|
"minimum": 1,
|
|
1623
|
-
"maximum":
|
|
1565
|
+
"maximum": 1024
|
|
1624
1566
|
},
|
|
1625
1567
|
"sideNames": {
|
|
1626
1568
|
"type": "array",
|
|
1627
|
-
"maxItems":
|
|
1569
|
+
"maxItems": 1024,
|
|
1628
1570
|
"items": {
|
|
1629
1571
|
"type": "string",
|
|
1630
1572
|
"maxLength": 40
|
|
@@ -1654,7 +1596,6 @@
|
|
|
1654
1596
|
},
|
|
1655
1597
|
"deciders": {
|
|
1656
1598
|
"type": "array",
|
|
1657
|
-
"maxItems": 3,
|
|
1658
1599
|
"items": {
|
|
1659
1600
|
"$ref": "#/$defs/address"
|
|
1660
1601
|
},
|
|
@@ -1675,17 +1616,17 @@
|
|
|
1675
1616
|
"stakeNft": {
|
|
1676
1617
|
"$ref": "#/$defs/rule",
|
|
1677
1618
|
"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."
|
|
1619
|
+
},
|
|
1620
|
+
"losersEach": {
|
|
1621
|
+
"type": "integer",
|
|
1622
|
+
"minimum": 1,
|
|
1623
|
+
"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."
|
|
1678
1624
|
}
|
|
1679
1625
|
}
|
|
1680
1626
|
},
|
|
1681
1627
|
"auction": {
|
|
1682
1628
|
"type": "object",
|
|
1683
|
-
"required": [
|
|
1684
|
-
"key",
|
|
1685
|
-
"name",
|
|
1686
|
-
"lot",
|
|
1687
|
-
"runs"
|
|
1688
|
-
],
|
|
1629
|
+
"required": ["key", "name", "lot", "runs"],
|
|
1689
1630
|
"additionalProperties": false,
|
|
1690
1631
|
"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.",
|
|
1691
1632
|
"properties": {
|
|
@@ -1715,9 +1656,7 @@
|
|
|
1715
1656
|
"oneOf": [
|
|
1716
1657
|
{
|
|
1717
1658
|
"type": "object",
|
|
1718
|
-
"required": [
|
|
1719
|
-
"item"
|
|
1720
|
-
],
|
|
1659
|
+
"required": ["item"],
|
|
1721
1660
|
"additionalProperties": false,
|
|
1722
1661
|
"properties": {
|
|
1723
1662
|
"item": {
|
|
@@ -1727,9 +1666,7 @@
|
|
|
1727
1666
|
},
|
|
1728
1667
|
{
|
|
1729
1668
|
"type": "object",
|
|
1730
|
-
"required": [
|
|
1731
|
-
"asset"
|
|
1732
|
-
],
|
|
1669
|
+
"required": ["asset"],
|
|
1733
1670
|
"additionalProperties": false,
|
|
1734
1671
|
"properties": {
|
|
1735
1672
|
"asset": {
|
|
@@ -1743,9 +1680,7 @@
|
|
|
1743
1680
|
},
|
|
1744
1681
|
{
|
|
1745
1682
|
"type": "object",
|
|
1746
|
-
"required": [
|
|
1747
|
-
"roll"
|
|
1748
|
-
],
|
|
1683
|
+
"required": ["roll"],
|
|
1749
1684
|
"additionalProperties": false,
|
|
1750
1685
|
"properties": {
|
|
1751
1686
|
"roll": {
|
|
@@ -1791,11 +1726,7 @@
|
|
|
1791
1726
|
},
|
|
1792
1727
|
"hold": {
|
|
1793
1728
|
"type": "object",
|
|
1794
|
-
"required": [
|
|
1795
|
-
"key",
|
|
1796
|
-
"name",
|
|
1797
|
-
"item"
|
|
1798
|
-
],
|
|
1729
|
+
"required": ["key", "name", "item"],
|
|
1799
1730
|
"additionalProperties": false,
|
|
1800
1731
|
"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.",
|
|
1801
1732
|
"properties": {
|
|
@@ -1825,11 +1756,7 @@
|
|
|
1825
1756
|
},
|
|
1826
1757
|
"decision": {
|
|
1827
1758
|
"type": "object",
|
|
1828
|
-
"required": [
|
|
1829
|
-
"key",
|
|
1830
|
-
"when",
|
|
1831
|
-
"does"
|
|
1832
|
-
],
|
|
1759
|
+
"required": ["key", "when", "does"],
|
|
1833
1760
|
"additionalProperties": false,
|
|
1834
1761
|
"description": "A rule only the game can carry out, signed by the authority while the game runs.",
|
|
1835
1762
|
"properties": {
|
|
@@ -1840,18 +1767,7 @@
|
|
|
1840
1767
|
"$ref": "#/$defs/words"
|
|
1841
1768
|
},
|
|
1842
1769
|
"does": {
|
|
1843
|
-
"enum": [
|
|
1844
|
-
"payout",
|
|
1845
|
-
"burn",
|
|
1846
|
-
"issue",
|
|
1847
|
-
"make",
|
|
1848
|
-
"unmake",
|
|
1849
|
-
"set",
|
|
1850
|
-
"award",
|
|
1851
|
-
"decide",
|
|
1852
|
-
"roll",
|
|
1853
|
-
"open_contest"
|
|
1854
|
-
]
|
|
1770
|
+
"enum": ["payout", "burn", "issue", "make", "unmake", "set", "award", "decide", "roll", "open_contest"]
|
|
1855
1771
|
},
|
|
1856
1772
|
"pool": {
|
|
1857
1773
|
"$ref": "#/$defs/key"
|
|
@@ -1884,19 +1800,14 @@
|
|
|
1884
1800
|
"description": "How often it happens, for the simulation."
|
|
1885
1801
|
},
|
|
1886
1802
|
"signedBy": {
|
|
1887
|
-
"enum": [
|
|
1888
|
-
"page",
|
|
1889
|
-
"server"
|
|
1890
|
-
],
|
|
1803
|
+
"enum": ["page", "server"],
|
|
1891
1804
|
"default": "page",
|
|
1892
1805
|
"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)."
|
|
1893
1806
|
},
|
|
1894
1807
|
"proof": {
|
|
1895
1808
|
"type": "object",
|
|
1896
1809
|
"additionalProperties": false,
|
|
1897
|
-
"required": [
|
|
1898
|
-
"payment"
|
|
1899
|
-
],
|
|
1810
|
+
"required": ["payment"],
|
|
1900
1811
|
"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.",
|
|
1901
1812
|
"properties": {
|
|
1902
1813
|
"payment": {
|
|
@@ -1990,6 +1901,13 @@
|
|
|
1990
1901
|
"$ref": "#/$defs/address",
|
|
1991
1902
|
"description": "The project's tree of compressed NFTs, once the setup opened it."
|
|
1992
1903
|
},
|
|
1904
|
+
"tables": {
|
|
1905
|
+
"type": "array",
|
|
1906
|
+
"items": {
|
|
1907
|
+
"$ref": "#/$defs/address"
|
|
1908
|
+
},
|
|
1909
|
+
"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."
|
|
1910
|
+
},
|
|
1993
1911
|
"treasury": {
|
|
1994
1912
|
"$ref": "#/$defs/address"
|
|
1995
1913
|
},
|
|
@@ -2063,10 +1981,7 @@
|
|
|
2063
1981
|
"items": {
|
|
2064
1982
|
"type": "object",
|
|
2065
1983
|
"additionalProperties": false,
|
|
2066
|
-
"required": [
|
|
2067
|
-
"signature",
|
|
2068
|
-
"steps"
|
|
2069
|
-
],
|
|
1984
|
+
"required": ["signature", "steps"],
|
|
2070
1985
|
"properties": {
|
|
2071
1986
|
"signature": {
|
|
2072
1987
|
"type": "string",
|
|
@@ -2122,7 +2037,7 @@
|
|
|
2122
2037
|
"type": "object",
|
|
2123
2038
|
"additionalProperties": false,
|
|
2124
2039
|
"required": [],
|
|
2125
|
-
"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.",
|
|
2040
|
+
"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`, one of `oneOf`, a time still `ahead` or `passed` (`time`), or present. `{ \"item\": \"pass\" }` alone means \"holds a Member Pass\"; `{ \"items\": [\"oak\", \"pine\"] }` means any of them. 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.",
|
|
2126
2041
|
"properties": {
|
|
2127
2042
|
"item": {
|
|
2128
2043
|
"$ref": "#/$defs/key",
|
|
@@ -2130,12 +2045,11 @@
|
|
|
2130
2045
|
},
|
|
2131
2046
|
"collection": {
|
|
2132
2047
|
"$ref": "#/$defs/address",
|
|
2133
|
-
"description": "Any NFT of this collection: a Metaplex Core collection, or the mint of a Token Metadata collection its NFTs are verified in. Leave it and `item` out for the game's own collection."
|
|
2048
|
+
"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."
|
|
2134
2049
|
},
|
|
2135
2050
|
"attribute": {
|
|
2136
2051
|
"type": "string",
|
|
2137
|
-
"minLength": 1
|
|
2138
|
-
"maxLength": 32
|
|
2052
|
+
"minLength": 1
|
|
2139
2053
|
},
|
|
2140
2054
|
"atLeast": {
|
|
2141
2055
|
"type": "integer",
|
|
@@ -2143,14 +2057,24 @@
|
|
|
2143
2057
|
"maximum": 4294967295
|
|
2144
2058
|
},
|
|
2145
2059
|
"equals": {
|
|
2146
|
-
"type": "string"
|
|
2147
|
-
|
|
2060
|
+
"type": "string"
|
|
2061
|
+
},
|
|
2062
|
+
"oneOf": {
|
|
2063
|
+
"type": "array",
|
|
2064
|
+
"minItems": 1,
|
|
2065
|
+
"maxItems": 16,
|
|
2066
|
+
"items": { "type": "string" },
|
|
2067
|
+
"description": "The attribute is one of these texts (at most 16): a tier of two, one species of three."
|
|
2068
|
+
},
|
|
2069
|
+
"items": {
|
|
2070
|
+
"type": "array",
|
|
2071
|
+
"minItems": 1,
|
|
2072
|
+
"maxItems": 16,
|
|
2073
|
+
"items": { "$ref": "#/$defs/key" },
|
|
2074
|
+
"description": "Any of these items the game mints (at most 16), in its own collection: a farm for three tree species, a gate for holders of any of five plots. Read by the program as the collection's `item_id` being one of theirs; not with `item`, `collection` or `attribute`."
|
|
2148
2075
|
},
|
|
2149
2076
|
"time": {
|
|
2150
|
-
"enum": [
|
|
2151
|
-
"ahead",
|
|
2152
|
-
"passed"
|
|
2153
|
-
],
|
|
2077
|
+
"enum": ["ahead", "passed"],
|
|
2154
2078
|
"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."
|
|
2155
2079
|
}
|
|
2156
2080
|
}
|
|
@@ -2182,17 +2106,13 @@
|
|
|
2182
2106
|
"odds": {
|
|
2183
2107
|
"type": "object",
|
|
2184
2108
|
"additionalProperties": false,
|
|
2185
|
-
"required": [
|
|
2186
|
-
"outcome",
|
|
2187
|
-
"when",
|
|
2188
|
-
"add"
|
|
2189
|
-
],
|
|
2109
|
+
"required": ["outcome", "when", "add"],
|
|
2190
2110
|
"description": "A box outcome that grows more likely for a player who shows a collectible.",
|
|
2191
2111
|
"properties": {
|
|
2192
2112
|
"outcome": {
|
|
2193
2113
|
"type": "integer",
|
|
2194
2114
|
"minimum": 0,
|
|
2195
|
-
"maximum":
|
|
2115
|
+
"maximum": 65535,
|
|
2196
2116
|
"description": "Which outcome (0 is the first)."
|
|
2197
2117
|
},
|
|
2198
2118
|
"when": {
|
|
@@ -2206,9 +2126,7 @@
|
|
|
2206
2126
|
"tier": {
|
|
2207
2127
|
"type": "object",
|
|
2208
2128
|
"additionalProperties": false,
|
|
2209
|
-
"required": [
|
|
2210
|
-
"lock"
|
|
2211
|
-
],
|
|
2129
|
+
"required": ["lock"],
|
|
2212
2130
|
"properties": {
|
|
2213
2131
|
"lock": {
|
|
2214
2132
|
"$ref": "#/$defs/duration",
|
|
@@ -2227,23 +2145,23 @@
|
|
|
2227
2145
|
},
|
|
2228
2146
|
"roll": {
|
|
2229
2147
|
"$ref": "#/$defs/key",
|
|
2230
|
-
"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.
|
|
2148
|
+
"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."
|
|
2231
2149
|
},
|
|
2232
2150
|
"exitFee": {
|
|
2233
2151
|
"$ref": "#/$defs/percent",
|
|
2234
2152
|
"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`."
|
|
2153
|
+
},
|
|
2154
|
+
"earnsFor": {
|
|
2155
|
+
"$ref": "#/$defs/duration",
|
|
2156
|
+
"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."
|
|
2235
2157
|
}
|
|
2236
2158
|
}
|
|
2237
2159
|
},
|
|
2238
2160
|
"farm": {
|
|
2239
2161
|
"type": "object",
|
|
2240
2162
|
"additionalProperties": false,
|
|
2241
|
-
"required": [
|
|
2242
|
-
|
|
2243
|
-
"name",
|
|
2244
|
-
"stakes"
|
|
2245
|
-
],
|
|
2246
|
-
"description": "Players stake a token or collectibles. Rewards are whatever arrives in the rewards pool, shared by weight (what they stake, times their lock tier, plus boosts from what a collectible says), or a fixed `rate` for each seat. 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.",
|
|
2163
|
+
"required": ["key", "name", "stakes"],
|
|
2164
|
+
"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.",
|
|
2247
2165
|
"properties": {
|
|
2248
2166
|
"key": {
|
|
2249
2167
|
"$ref": "#/$defs/key"
|
|
@@ -2274,46 +2192,47 @@
|
|
|
2274
2192
|
},
|
|
2275
2193
|
"rewards": {
|
|
2276
2194
|
"$ref": "#/$defs/key",
|
|
2277
|
-
"description": "The
|
|
2195
|
+
"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."
|
|
2278
2196
|
},
|
|
2279
|
-
"
|
|
2280
|
-
"
|
|
2281
|
-
"
|
|
2282
|
-
"maximum": 255,
|
|
2283
|
-
"description": "For a farm that names no `rewards`: the program's number for the empty pool made for it. Written when it goes live; never change it after."
|
|
2197
|
+
"seed": {
|
|
2198
|
+
"$ref": "#/$defs/amount",
|
|
2199
|
+
"description": "What the owner puts into its rewards vault at go-live, from their wallet (anyone may add more later, with a plain transfer)."
|
|
2284
2200
|
},
|
|
2285
2201
|
"rate": {
|
|
2286
2202
|
"type": "object",
|
|
2287
2203
|
"additionalProperties": false,
|
|
2288
|
-
"required": [
|
|
2289
|
-
|
|
2290
|
-
],
|
|
2291
|
-
"description": "A fixed rate instead of sharing what arrives: the same for each seat whoever else is in, times its tier and boosts (most Solana NFT staking paid this way).",
|
|
2204
|
+
"required": ["perDay"],
|
|
2205
|
+
"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.",
|
|
2292
2206
|
"properties": {
|
|
2293
2207
|
"perDay": {
|
|
2294
2208
|
"$ref": "#/$defs/amount",
|
|
2295
|
-
"description": "Reward tokens a day for each collectible at x1; for a farm of tokens, for each whole token staked. 0 pays nothing: a farm that only grows what is staked, or gives mission prizes
|
|
2209
|
+
"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."
|
|
2296
2210
|
},
|
|
2297
2211
|
"minted": {
|
|
2298
2212
|
"type": "boolean",
|
|
2299
2213
|
"default": false,
|
|
2300
|
-
"description": "Minted (the rewards' token must be one the game mints), or paid from
|
|
2214
|
+
"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)."
|
|
2215
|
+
},
|
|
2216
|
+
"shared": {
|
|
2217
|
+
"type": "boolean",
|
|
2218
|
+
"default": false,
|
|
2219
|
+
"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."
|
|
2220
|
+
},
|
|
2221
|
+
"halveEvery": {
|
|
2222
|
+
"$ref": "#/$defs/duration",
|
|
2223
|
+
"description": "The rate halves every this long from when the farm opens, again and again (a halving emission)."
|
|
2301
2224
|
}
|
|
2302
2225
|
}
|
|
2303
2226
|
},
|
|
2304
2227
|
"custody": {
|
|
2305
|
-
"enum": [
|
|
2306
|
-
"freeze",
|
|
2307
|
-
"escrow",
|
|
2308
|
-
"watch"
|
|
2309
|
-
],
|
|
2228
|
+
"enum": ["freeze", "escrow", "watch"],
|
|
2310
2229
|
"default": "escrow",
|
|
2311
2230
|
"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."
|
|
2312
2231
|
},
|
|
2313
2232
|
"tiers": {
|
|
2314
2233
|
"type": "array",
|
|
2315
2234
|
"minItems": 1,
|
|
2316
|
-
"maxItems":
|
|
2235
|
+
"maxItems": 256,
|
|
2317
2236
|
"items": {
|
|
2318
2237
|
"$ref": "#/$defs/tier"
|
|
2319
2238
|
},
|
|
@@ -2321,14 +2240,10 @@
|
|
|
2321
2240
|
},
|
|
2322
2241
|
"boosts": {
|
|
2323
2242
|
"type": "array",
|
|
2324
|
-
"maxItems": 4,
|
|
2325
2243
|
"items": {
|
|
2326
2244
|
"type": "object",
|
|
2327
2245
|
"additionalProperties": false,
|
|
2328
|
-
"required": [
|
|
2329
|
-
"when",
|
|
2330
|
-
"add"
|
|
2331
|
-
],
|
|
2246
|
+
"required": ["when", "add"],
|
|
2332
2247
|
"properties": {
|
|
2333
2248
|
"when": {
|
|
2334
2249
|
"$ref": "#/$defs/rule"
|
|
@@ -2351,7 +2266,6 @@
|
|
|
2351
2266
|
{
|
|
2352
2267
|
"type": "array",
|
|
2353
2268
|
"minItems": 1,
|
|
2354
|
-
"maxItems": 4,
|
|
2355
2269
|
"items": {
|
|
2356
2270
|
"$ref": "#/$defs/rule"
|
|
2357
2271
|
}
|
|
@@ -2367,7 +2281,6 @@
|
|
|
2367
2281
|
{
|
|
2368
2282
|
"type": "array",
|
|
2369
2283
|
"minItems": 1,
|
|
2370
|
-
"maxItems": 4,
|
|
2371
2284
|
"items": {
|
|
2372
2285
|
"$ref": "#/$defs/growth"
|
|
2373
2286
|
}
|
|
@@ -2382,51 +2295,24 @@
|
|
|
2382
2295
|
"lockAttribute": {
|
|
2383
2296
|
"type": "string",
|
|
2384
2297
|
"minLength": 1,
|
|
2385
|
-
"
|
|
2386
|
-
"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 pool, shared by the seats there at the next move), 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."
|
|
2298
|
+
"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."
|
|
2387
2299
|
},
|
|
2388
2300
|
"upkeepAttribute": {
|
|
2389
2301
|
"type": "string",
|
|
2390
2302
|
"minLength": 1,
|
|
2391
|
-
"
|
|
2392
|
-
"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, and what it was credited after it ran out goes back to the farm (split by time), shared by the seats there. 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."
|
|
2303
|
+
"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."
|
|
2393
2304
|
},
|
|
2394
2305
|
"exitFeeTo": {
|
|
2395
2306
|
"type": "string",
|
|
2396
|
-
"pattern": "^(burn|pool:[a-z][a-z0-9-]{0,31})$",
|
|
2397
|
-
"description": "Where early-exit fees go: \"burn\",
|
|
2398
|
-
},
|
|
2399
|
-
"unbond": {
|
|
2400
|
-
"$ref": "#/$defs/duration",
|
|
2401
|
-
"description": "A farm of tokens: what a player takes out waits this long first, earning nothing (an unbonding wait), then any later unstake takes it out."
|
|
2402
|
-
},
|
|
2403
|
-
"toll": {
|
|
2404
|
-
"type": "object",
|
|
2405
|
-
"additionalProperties": false,
|
|
2406
|
-
"required": [
|
|
2407
|
-
"percent",
|
|
2408
|
-
"to"
|
|
2409
|
-
],
|
|
2410
|
-
"description": "A share of every payout of rewards (harvest, compound, unstake), burned or sent to a pool. Not on mission prizes.",
|
|
2411
|
-
"properties": {
|
|
2412
|
-
"percent": {
|
|
2413
|
-
"$ref": "#/$defs/percent"
|
|
2414
|
-
},
|
|
2415
|
-
"to": {
|
|
2416
|
-
"type": "string",
|
|
2417
|
-
"pattern": "^(burn|pool:[a-z][a-z0-9-]{0,31})$"
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2307
|
+
"pattern": "^(burn|rewards|pool:[a-z][a-z0-9-]{0,31})$",
|
|
2308
|
+
"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`."
|
|
2420
2309
|
}
|
|
2421
2310
|
}
|
|
2422
2311
|
},
|
|
2423
2312
|
"grant": {
|
|
2424
2313
|
"type": "object",
|
|
2425
2314
|
"additionalProperties": false,
|
|
2426
|
-
"required": [
|
|
2427
|
-
"key",
|
|
2428
|
-
"name"
|
|
2429
|
-
],
|
|
2315
|
+
"required": ["key", "name"],
|
|
2430
2316
|
"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.",
|
|
2431
2317
|
"properties": {
|
|
2432
2318
|
"key": {
|
|
@@ -2480,9 +2366,7 @@
|
|
|
2480
2366
|
{
|
|
2481
2367
|
"type": "object",
|
|
2482
2368
|
"additionalProperties": false,
|
|
2483
|
-
"required": [
|
|
2484
|
-
"wallet"
|
|
2485
|
-
],
|
|
2369
|
+
"required": ["wallet"],
|
|
2486
2370
|
"properties": {
|
|
2487
2371
|
"wallet": {
|
|
2488
2372
|
"$ref": "#/$defs/address"
|
|
@@ -2568,6 +2452,16 @@
|
|
|
2568
2452
|
"prize": {
|
|
2569
2453
|
"$ref": "#/$defs/prize",
|
|
2570
2454
|
"description": "What each claim gives (a prize). The grant's funds pay what it opens."
|
|
2455
|
+
},
|
|
2456
|
+
"wallets": {
|
|
2457
|
+
"type": "integer",
|
|
2458
|
+
"minimum": 1,
|
|
2459
|
+
"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."
|
|
2460
|
+
},
|
|
2461
|
+
"rounds": {
|
|
2462
|
+
"type": "integer",
|
|
2463
|
+
"minimum": 1,
|
|
2464
|
+
"description": "About how many rounds each wallet will be paid over its life. Default 1."
|
|
2571
2465
|
}
|
|
2572
2466
|
}
|
|
2573
2467
|
},
|
|
@@ -2580,14 +2474,11 @@
|
|
|
2580
2474
|
{
|
|
2581
2475
|
"type": "object",
|
|
2582
2476
|
"additionalProperties": false,
|
|
2583
|
-
"required": [
|
|
2584
|
-
"wallets"
|
|
2585
|
-
],
|
|
2477
|
+
"required": ["wallets"],
|
|
2586
2478
|
"properties": {
|
|
2587
2479
|
"wallets": {
|
|
2588
2480
|
"type": "array",
|
|
2589
2481
|
"minItems": 0,
|
|
2590
|
-
"maxItems": 16,
|
|
2591
2482
|
"items": {
|
|
2592
2483
|
"$ref": "#/$defs/address"
|
|
2593
2484
|
}
|
|
@@ -2597,9 +2488,7 @@
|
|
|
2597
2488
|
{
|
|
2598
2489
|
"type": "object",
|
|
2599
2490
|
"additionalProperties": false,
|
|
2600
|
-
"required": [
|
|
2601
|
-
"list"
|
|
2602
|
-
],
|
|
2491
|
+
"required": ["list"],
|
|
2603
2492
|
"properties": {
|
|
2604
2493
|
"list": {
|
|
2605
2494
|
"type": "array",
|
|
@@ -2616,17 +2505,12 @@
|
|
|
2616
2505
|
{
|
|
2617
2506
|
"type": "object",
|
|
2618
2507
|
"additionalProperties": false,
|
|
2619
|
-
"required": [
|
|
2620
|
-
"staked"
|
|
2621
|
-
],
|
|
2508
|
+
"required": ["staked"],
|
|
2622
2509
|
"properties": {
|
|
2623
2510
|
"staked": {
|
|
2624
2511
|
"type": "object",
|
|
2625
2512
|
"additionalProperties": false,
|
|
2626
|
-
"required": [
|
|
2627
|
-
"farm",
|
|
2628
|
-
"atLeast"
|
|
2629
|
-
],
|
|
2513
|
+
"required": ["farm", "atLeast"],
|
|
2630
2514
|
"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).",
|
|
2631
2515
|
"properties": {
|
|
2632
2516
|
"farm": {
|
|
@@ -2645,9 +2529,7 @@
|
|
|
2645
2529
|
"perWalletEach": {
|
|
2646
2530
|
"type": "object",
|
|
2647
2531
|
"additionalProperties": false,
|
|
2648
|
-
"required": [
|
|
2649
|
-
"count"
|
|
2650
|
-
],
|
|
2532
|
+
"required": ["count"],
|
|
2651
2533
|
"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\").",
|
|
2652
2534
|
"properties": {
|
|
2653
2535
|
"count": {
|
|
@@ -2664,15 +2546,12 @@
|
|
|
2664
2546
|
"growth": {
|
|
2665
2547
|
"type": "object",
|
|
2666
2548
|
"additionalProperties": false,
|
|
2667
|
-
"required": [
|
|
2668
|
-
"perDay"
|
|
2669
|
-
],
|
|
2549
|
+
"required": ["perDay"],
|
|
2670
2550
|
"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.",
|
|
2671
2551
|
"properties": {
|
|
2672
2552
|
"attribute": {
|
|
2673
2553
|
"type": "string",
|
|
2674
2554
|
"minLength": 1,
|
|
2675
|
-
"maxLength": 32,
|
|
2676
2555
|
"default": "xp",
|
|
2677
2556
|
"description": "The attribute the points are written under."
|
|
2678
2557
|
},
|
|
@@ -2685,13 +2564,11 @@
|
|
|
2685
2564
|
"level": {
|
|
2686
2565
|
"type": "string",
|
|
2687
2566
|
"minLength": 1,
|
|
2688
|
-
"maxLength": 32,
|
|
2689
2567
|
"default": "level",
|
|
2690
2568
|
"description": "The attribute the level is written under, when there are `levels`."
|
|
2691
2569
|
},
|
|
2692
2570
|
"levels": {
|
|
2693
2571
|
"type": "array",
|
|
2694
|
-
"maxItems": 16,
|
|
2695
2572
|
"items": {
|
|
2696
2573
|
"type": "integer",
|
|
2697
2574
|
"minimum": 1,
|
|
@@ -2709,11 +2586,7 @@
|
|
|
2709
2586
|
"stash": {
|
|
2710
2587
|
"type": "object",
|
|
2711
2588
|
"additionalProperties": false,
|
|
2712
|
-
"required": [
|
|
2713
|
-
"key",
|
|
2714
|
-
"name",
|
|
2715
|
-
"nfts"
|
|
2716
|
-
],
|
|
2589
|
+
"required": ["key", "name", "nfts"],
|
|
2717
2590
|
"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`).",
|
|
2718
2591
|
"properties": {
|
|
2719
2592
|
"key": {
|
|
@@ -2735,7 +2608,6 @@
|
|
|
2735
2608
|
},
|
|
2736
2609
|
"nfts": {
|
|
2737
2610
|
"type": "array",
|
|
2738
|
-
"maxItems": 256,
|
|
2739
2611
|
"items": {
|
|
2740
2612
|
"anyOf": [
|
|
2741
2613
|
{
|
|
@@ -2744,9 +2616,7 @@
|
|
|
2744
2616
|
{
|
|
2745
2617
|
"type": "object",
|
|
2746
2618
|
"additionalProperties": false,
|
|
2747
|
-
"required": [
|
|
2748
|
-
"asset"
|
|
2749
|
-
],
|
|
2619
|
+
"required": ["asset"],
|
|
2750
2620
|
"properties": {
|
|
2751
2621
|
"asset": {
|
|
2752
2622
|
"$ref": "#/$defs/address"
|
|
@@ -2754,15 +2624,19 @@
|
|
|
2754
2624
|
"collection": {
|
|
2755
2625
|
"$ref": "#/$defs/address",
|
|
2756
2626
|
"description": "Its Core collection, when it is not the stash's."
|
|
2627
|
+
},
|
|
2628
|
+
"weight": {
|
|
2629
|
+
"type": "integer",
|
|
2630
|
+
"minimum": 1,
|
|
2631
|
+
"maximum": 4294967295,
|
|
2632
|
+
"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."
|
|
2757
2633
|
}
|
|
2758
2634
|
}
|
|
2759
2635
|
},
|
|
2760
2636
|
{
|
|
2761
2637
|
"type": "object",
|
|
2762
2638
|
"additionalProperties": false,
|
|
2763
|
-
"required": [
|
|
2764
|
-
"mint"
|
|
2765
|
-
],
|
|
2639
|
+
"required": ["mint"],
|
|
2766
2640
|
"properties": {
|
|
2767
2641
|
"mint": {
|
|
2768
2642
|
"$ref": "#/$defs/address"
|
|
@@ -2775,19 +2649,29 @@
|
|
|
2775
2649
|
"ruleSet": {
|
|
2776
2650
|
"$ref": "#/$defs/address",
|
|
2777
2651
|
"description": "A pNFT's rule set, when it has one."
|
|
2652
|
+
},
|
|
2653
|
+
"weight": {
|
|
2654
|
+
"type": "integer",
|
|
2655
|
+
"minimum": 1,
|
|
2656
|
+
"maximum": 4294967295,
|
|
2657
|
+
"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."
|
|
2778
2658
|
}
|
|
2779
2659
|
}
|
|
2780
2660
|
},
|
|
2781
2661
|
{
|
|
2782
2662
|
"type": "object",
|
|
2783
2663
|
"additionalProperties": false,
|
|
2784
|
-
"required": [
|
|
2785
|
-
"compressed"
|
|
2786
|
-
],
|
|
2664
|
+
"required": ["compressed"],
|
|
2787
2665
|
"properties": {
|
|
2788
2666
|
"compressed": {
|
|
2789
2667
|
"$ref": "#/$defs/address",
|
|
2790
2668
|
"description": "A compressed NFT's asset id."
|
|
2669
|
+
},
|
|
2670
|
+
"weight": {
|
|
2671
|
+
"type": "integer",
|
|
2672
|
+
"minimum": 1,
|
|
2673
|
+
"maximum": 4294967295,
|
|
2674
|
+
"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."
|
|
2791
2675
|
}
|
|
2792
2676
|
}
|
|
2793
2677
|
}
|
|
@@ -2803,20 +2687,12 @@
|
|
|
2803
2687
|
},
|
|
2804
2688
|
"prize": {
|
|
2805
2689
|
"type": "object",
|
|
2806
|
-
"required": [
|
|
2807
|
-
"gives"
|
|
2808
|
-
],
|
|
2690
|
+
"required": ["gives"],
|
|
2809
2691
|
"additionalProperties": false,
|
|
2810
|
-
"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).",
|
|
2692
|
+
"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`).",
|
|
2811
2693
|
"properties": {
|
|
2812
2694
|
"gives": {
|
|
2813
|
-
"enum": [
|
|
2814
|
-
"item",
|
|
2815
|
-
"tokens",
|
|
2816
|
-
"share",
|
|
2817
|
-
"nft",
|
|
2818
|
-
"roll"
|
|
2819
|
-
]
|
|
2695
|
+
"enum": ["item", "tokens", "nft", "roll", "raffled"]
|
|
2820
2696
|
},
|
|
2821
2697
|
"item": {
|
|
2822
2698
|
"$ref": "#/$defs/key"
|
|
@@ -2836,12 +2712,6 @@
|
|
|
2836
2712
|
"type": "string",
|
|
2837
2713
|
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
2838
2714
|
},
|
|
2839
|
-
"pool": {
|
|
2840
|
-
"$ref": "#/$defs/key"
|
|
2841
|
-
},
|
|
2842
|
-
"percent": {
|
|
2843
|
-
"$ref": "#/$defs/percent"
|
|
2844
|
-
},
|
|
2845
2715
|
"stash": {
|
|
2846
2716
|
"$ref": "#/$defs/key",
|
|
2847
2717
|
"description": "For nft: the stash that lists it."
|
|
@@ -2872,17 +2742,12 @@
|
|
|
2872
2742
|
"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).",
|
|
2873
2743
|
"anyOf": [
|
|
2874
2744
|
{
|
|
2875
|
-
"enum": [
|
|
2876
|
-
"burn",
|
|
2877
|
-
"treasury"
|
|
2878
|
-
]
|
|
2745
|
+
"enum": ["burn", "treasury"]
|
|
2879
2746
|
},
|
|
2880
2747
|
{
|
|
2881
2748
|
"type": "object",
|
|
2882
2749
|
"additionalProperties": false,
|
|
2883
|
-
"required": [
|
|
2884
|
-
"giveTo"
|
|
2885
|
-
],
|
|
2750
|
+
"required": ["giveTo"],
|
|
2886
2751
|
"properties": {
|
|
2887
2752
|
"giveTo": {
|
|
2888
2753
|
"$ref": "#/$defs/address"
|
|
@@ -2892,9 +2757,7 @@
|
|
|
2892
2757
|
{
|
|
2893
2758
|
"type": "object",
|
|
2894
2759
|
"additionalProperties": false,
|
|
2895
|
-
"required": [
|
|
2896
|
-
"stash"
|
|
2897
|
-
],
|
|
2760
|
+
"required": ["stash"],
|
|
2898
2761
|
"properties": {
|
|
2899
2762
|
"stash": {
|
|
2900
2763
|
"$ref": "#/$defs/key"
|
|
@@ -2906,9 +2769,7 @@
|
|
|
2906
2769
|
"nftPrice": {
|
|
2907
2770
|
"type": "object",
|
|
2908
2771
|
"additionalProperties": false,
|
|
2909
|
-
"required": [
|
|
2910
|
-
"rule"
|
|
2911
|
-
],
|
|
2772
|
+
"required": ["rule"],
|
|
2912
2773
|
"description": "An NFT as the price: one the player holds that passes `rule`, sent where `then` says (default \"burn\").",
|
|
2913
2774
|
"properties": {
|
|
2914
2775
|
"rule": {
|
|
@@ -2918,6 +2779,51 @@
|
|
|
2918
2779
|
"$ref": "#/$defs/spend"
|
|
2919
2780
|
}
|
|
2920
2781
|
}
|
|
2782
|
+
},
|
|
2783
|
+
"table": {
|
|
2784
|
+
"type": "object",
|
|
2785
|
+
"additionalProperties": false,
|
|
2786
|
+
"required": ["key", "rows"],
|
|
2787
|
+
"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.",
|
|
2788
|
+
"properties": {
|
|
2789
|
+
"key": {
|
|
2790
|
+
"$ref": "#/$defs/key"
|
|
2791
|
+
},
|
|
2792
|
+
"id": {
|
|
2793
|
+
"type": "integer",
|
|
2794
|
+
"minimum": 1,
|
|
2795
|
+
"maximum": 4294967295
|
|
2796
|
+
},
|
|
2797
|
+
"kind": {
|
|
2798
|
+
"enum": ["labels", "numbers"],
|
|
2799
|
+
"default": "labels"
|
|
2800
|
+
},
|
|
2801
|
+
"rows": {
|
|
2802
|
+
"type": "array",
|
|
2803
|
+
"minItems": 1,
|
|
2804
|
+
"items": {
|
|
2805
|
+
"type": "object",
|
|
2806
|
+
"additionalProperties": false,
|
|
2807
|
+
"required": ["weight"],
|
|
2808
|
+
"properties": {
|
|
2809
|
+
"label": {
|
|
2810
|
+
"type": "string"
|
|
2811
|
+
},
|
|
2812
|
+
"weight": {
|
|
2813
|
+
"type": "integer",
|
|
2814
|
+
"minimum": 1,
|
|
2815
|
+
"maximum": 4294967295
|
|
2816
|
+
},
|
|
2817
|
+
"stock": {
|
|
2818
|
+
"type": "integer",
|
|
2819
|
+
"minimum": 1,
|
|
2820
|
+
"maximum": 4294967294,
|
|
2821
|
+
"description": "How many units may draw it: left out, never runs out."
|
|
2822
|
+
}
|
|
2823
|
+
}
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2921
2827
|
}
|
|
2922
2828
|
}
|
|
2923
2829
|
}
|