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