@xgamesfun/solana 0.20.1 → 0.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -10
- package/examples/coin-flip-arena.json +2 -7
- package/examples/elements-set.json +2 -9
- package/examples/expedition-guild.json +1 -8
- package/examples/guild-missions.json +3 -10
- package/examples/halving-seasons.json +4 -9
- package/examples/hero-trials.json +1 -4
- package/examples/merge-2048.json +5 -5
- package/examples/paper-hands-farm.json +4 -16
- package/examples/partner-vault.json +1 -4
- package/examples/stakers-draw.json +1 -8
- package/examples/star-fleet.json +1 -8
- package/examples/starforce.json +6 -6
- package/js/approve/details.mjs +8 -7
- package/js/approve/server.mjs +20 -5
- package/js/chain/borsh.js +9 -0
- package/js/chain/core.js +14 -2
- package/js/chain/lookup.js +8 -2
- package/js/chain/rpc.js +4 -2
- package/js/client/accounts.js +448 -116
- package/js/client/grant.js +125 -66
- package/js/client/idl/loot.js +1 -1
- package/js/client/idl/loot.json +2360 -2218
- package/js/client/index.js +1 -0
- package/js/client/ix.js +1204 -473
- package/js/client/pda.js +20 -16
- package/js/client/policy.js +44 -23
- package/js/client/random.js +70 -0
- package/js/client/sizes.js +255 -12
- package/js/economy/check.mjs +455 -210
- package/js/economy/cost.mjs +45 -30
- package/js/economy/examples.mjs +2 -2
- package/js/economy/explain.mjs +24 -20
- package/js/economy/guide.mjs +31 -30
- package/js/economy/live.mjs +30 -7
- package/js/economy/model.mjs +171 -56
- package/js/economy/plan.mjs +380 -112
- package/js/economy/schema.json +291 -143
- package/js/economy/simulate.mjs +154 -87
- package/js/mcp/tools.mjs +14 -8
- package/js/play/index.js +1121 -375
- package/js/play/keys.js +167 -0
- package/package.json +1 -1
- package/release.json +5 -5
- package/skills/xsolana-economy/SKILL.md +15 -11
- package/skills/xsolana-economy/references/after-launch.md +37 -27
- package/skills/xsolana-economy/references/apps.md +55 -19
- package/skills/xsolana-economy/references/sentence-to-spec.md +30 -22
- package/skills/xsolana-economy/references/telling-the-person.md +52 -11
- package/types/chain/core.d.ts +3 -1
- package/types/chain/lookup.d.ts +5 -2
- package/types/chain/rpc.d.ts +3 -1
- package/types/client/accounts.d.ts +195 -55
- package/types/client/grant.d.ts +72 -27
- package/types/client/idl/loot.d.ts +590 -559
- package/types/client/index.d.ts +1 -0
- package/types/client/ix.d.ts +3862 -234
- package/types/client/pda.d.ts +19 -15
- package/types/client/policy.d.ts +39 -14
- package/types/client/random.d.ts +26 -0
- package/types/client/sizes.d.ts +93 -5
- package/types/economy/check.d.mts +5 -10
- package/types/economy/cost.d.mts +2 -1
- package/types/economy/live.d.mts +16 -1
- package/types/economy/model.d.mts +105 -37
- package/types/economy/plan.d.mts +193 -192
- package/types/economy/simulate.d.mts +21 -13
- package/types/mcp/tools.d.mts +21 -13
- package/types/play/index.d.ts +450 -39
- package/types/play/keys.d.ts +51 -0
package/js/economy/schema.json
CHANGED
|
@@ -56,7 +56,6 @@
|
|
|
56
56
|
},
|
|
57
57
|
"tokens": {
|
|
58
58
|
"type": "array",
|
|
59
|
-
"maxItems": 16,
|
|
60
59
|
"items": {
|
|
61
60
|
"$ref": "#/$defs/token"
|
|
62
61
|
}
|
|
@@ -74,7 +73,6 @@
|
|
|
74
73
|
},
|
|
75
74
|
"items": {
|
|
76
75
|
"type": "array",
|
|
77
|
-
"maxItems": 64,
|
|
78
76
|
"items": {
|
|
79
77
|
"$ref": "#/$defs/item"
|
|
80
78
|
}
|
|
@@ -88,85 +86,80 @@
|
|
|
88
86
|
},
|
|
89
87
|
"stashes": {
|
|
90
88
|
"type": "array",
|
|
91
|
-
"maxItems": 32,
|
|
92
89
|
"items": {
|
|
93
90
|
"$ref": "#/$defs/stash"
|
|
94
91
|
},
|
|
95
92
|
"description": "NFTs the game holds to give away as prizes: a box's outcome `{ \"gives\": \"stash\" }` gives one of a stash's at random. The owner's wallet hands each listed NFT to the game when the economy goes live, so it must hold them then."
|
|
96
93
|
},
|
|
94
|
+
"tables": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"$ref": "#/$defs/table"
|
|
98
|
+
},
|
|
99
|
+
"description": "Tables of weighted rows the project writes once and seals: a fresh item's trait draws a row of one per unit (its label, or its number), by weight among the rows still in stock. Written when the economy goes live, a batch of rows a transaction."
|
|
100
|
+
},
|
|
97
101
|
"boxes": {
|
|
98
102
|
"type": "array",
|
|
99
|
-
"maxItems": 32,
|
|
100
103
|
"items": {
|
|
101
104
|
"$ref": "#/$defs/box"
|
|
102
105
|
}
|
|
103
106
|
},
|
|
104
107
|
"payments": {
|
|
105
108
|
"type": "array",
|
|
106
|
-
"maxItems": 32,
|
|
107
109
|
"items": {
|
|
108
110
|
"$ref": "#/$defs/payment"
|
|
109
111
|
}
|
|
110
112
|
},
|
|
111
113
|
"recipes": {
|
|
112
114
|
"type": "array",
|
|
113
|
-
"maxItems": 64,
|
|
114
115
|
"items": {
|
|
115
116
|
"$ref": "#/$defs/recipe"
|
|
116
117
|
}
|
|
117
118
|
},
|
|
118
119
|
"schedules": {
|
|
119
120
|
"type": "array",
|
|
120
|
-
"maxItems": 32,
|
|
121
121
|
"items": {
|
|
122
122
|
"$ref": "#/$defs/schedule"
|
|
123
123
|
}
|
|
124
124
|
},
|
|
125
125
|
"lotteries": {
|
|
126
126
|
"type": "array",
|
|
127
|
-
"maxItems": 16,
|
|
128
127
|
"items": {
|
|
129
128
|
"$ref": "#/$defs/lottery"
|
|
130
129
|
}
|
|
131
130
|
},
|
|
132
131
|
"farms": {
|
|
133
132
|
"type": "array",
|
|
134
|
-
"maxItems": 32,
|
|
135
133
|
"items": {
|
|
136
134
|
"$ref": "#/$defs/farm"
|
|
137
135
|
}
|
|
138
136
|
},
|
|
139
137
|
"contests": {
|
|
140
138
|
"type": "array",
|
|
141
|
-
"maxItems": 16,
|
|
142
139
|
"items": {
|
|
143
140
|
"$ref": "#/$defs/contest"
|
|
144
141
|
}
|
|
145
142
|
},
|
|
146
143
|
"auctions": {
|
|
147
144
|
"type": "array",
|
|
148
|
-
"maxItems": 16,
|
|
149
145
|
"items": {
|
|
150
146
|
"$ref": "#/$defs/auction"
|
|
151
147
|
}
|
|
152
148
|
},
|
|
153
149
|
"holds": {
|
|
154
150
|
"type": "array",
|
|
155
|
-
"maxItems": 16,
|
|
156
151
|
"items": {
|
|
157
152
|
"$ref": "#/$defs/hold"
|
|
158
153
|
}
|
|
159
154
|
},
|
|
160
155
|
"grants": {
|
|
161
156
|
"type": "array",
|
|
162
|
-
"maxItems": 64,
|
|
163
157
|
"items": {
|
|
164
158
|
"$ref": "#/$defs/grant"
|
|
165
159
|
}
|
|
166
160
|
},
|
|
167
161
|
"traits": {
|
|
168
162
|
"type": "array",
|
|
169
|
-
"maxItems": 16,
|
|
170
163
|
"description": "Traits the game vouches for from NFTs' off-chain metadata (a background, a class), so rules can read them: the root of a Merkle tree of each NFT's traits (`loot.traitsTree`), set when the economy goes live. Anyone then writes an NFT's traits into its Sheet with its proof (`app.proveTraits`), and boosts, gates and odds read them like any attribute.",
|
|
171
164
|
"items": {
|
|
172
165
|
"type": "object",
|
|
@@ -193,7 +186,6 @@
|
|
|
193
186
|
},
|
|
194
187
|
"decisions": {
|
|
195
188
|
"type": "array",
|
|
196
|
-
"maxItems": 32,
|
|
197
189
|
"items": {
|
|
198
190
|
"$ref": "#/$defs/decision"
|
|
199
191
|
}
|
|
@@ -213,12 +205,11 @@
|
|
|
213
205
|
},
|
|
214
206
|
"collections": {
|
|
215
207
|
"type": "array",
|
|
216
|
-
"maxItems": 7,
|
|
217
208
|
"uniqueItems": true,
|
|
218
209
|
"items": {
|
|
219
210
|
"$ref": "#/$defs/address"
|
|
220
211
|
},
|
|
221
|
-
"description": "Core collections the owner already controls (their update authority) that the project takes too, besides the one it makes:
|
|
212
|
+
"description": "Core collections the owner already controls (their update authority) that the project takes too, besides the one it makes: as many as the project's setup transaction carries (about 25 in all). An NFT of any of them is the project's own: it reads and writes it as one, and an item may be minted into it (with the project as its update delegate)."
|
|
222
213
|
},
|
|
223
214
|
"compressedTree": {
|
|
224
215
|
"type": "object",
|
|
@@ -247,8 +238,7 @@
|
|
|
247
238
|
},
|
|
248
239
|
"link": {
|
|
249
240
|
"type": "string",
|
|
250
|
-
"pattern": "^https://"
|
|
251
|
-
"maxLength": 200
|
|
241
|
+
"pattern": "^https://"
|
|
252
242
|
},
|
|
253
243
|
"words": {
|
|
254
244
|
"type": "string",
|
|
@@ -293,8 +283,8 @@
|
|
|
293
283
|
},
|
|
294
284
|
"destination": {
|
|
295
285
|
"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})$"
|
|
286
|
+
"description": "Where a share goes: \"burn\", \"treasury\" (the game's), \"pool:<key>\", \"wallet:<address>\" (a partner, a creator, a charity: the program pays their own account for the currency, and opens it when it is not there), \"account:<token account address>\" (an existing token account of that currency), \"holder:<collectible address>\" (whoever holds that collectible at the time), \"lottery:<key>\" (that lottery's pot), \"farm:<key>\" (that farm's rewards vault, shared by its stakers), or, in a box's or a lottery's split, \"chosen\" (a wallet the buyer names when they buy: a referrer, a streamer) or \"chosen:<item key>\" (whoever holds the collectible of that item the buyer names: the plot they build on; the buyer must name one a player holds, or the purchase is refused); in a payment's split, \"chosen\" only (a wallet the payer names each time they pay, never their own). A share that can't be paid (its wallet has no account, nobody holds the collectible) goes to the treasury instead; a sale never fails over it.",
|
|
287
|
+
"pattern": "^(burn|treasury|chosen|chosen:[a-z][a-z0-9-]{0,31}|pool:[a-z][a-z0-9-]{0,31}|lottery:[a-z][a-z0-9-]{0,31}|farm:[a-z][a-z0-9-]{0,31}|wallet:[1-9A-HJ-NP-Za-km-z]{32,44}|account:[1-9A-HJ-NP-Za-km-z]{32,44}|holder:[1-9A-HJ-NP-Za-km-z]{32,44})$"
|
|
298
288
|
},
|
|
299
289
|
"share": {
|
|
300
290
|
"type": "object",
|
|
@@ -314,7 +304,6 @@
|
|
|
314
304
|
},
|
|
315
305
|
"split": {
|
|
316
306
|
"type": "array",
|
|
317
|
-
"maxItems": 4,
|
|
318
307
|
"items": {
|
|
319
308
|
"$ref": "#/$defs/share"
|
|
320
309
|
},
|
|
@@ -366,7 +355,7 @@
|
|
|
366
355
|
"life": {
|
|
367
356
|
"type": "object",
|
|
368
357
|
"additionalProperties": false,
|
|
369
|
-
"description": "When a recipe may take a collectible of this item. 0 switches a rule off.
|
|
358
|
+
"description": "When a recipe may take a collectible of this item. The kit writes it into each recipe that takes the item, as needs and raises on the collectible (a recipe line that burns, uses, renews or takes it staked): `readyAfter` (its `made` time at least that long ago) and `lasts` (made less than that long ago) on every such line; `uses` (its `used` count raised by one, up to it: the craft is refused past it, MaxedOut) and `cooldown` (its `next_use` time passed, then set that far from now) on a line that uses it or takes it staked; a renew line counts its uses from zero again. 0 switches a rule off. A recipe can be edited at any time, and so can the life it carries.",
|
|
370
359
|
"properties": {
|
|
371
360
|
"readyAfter": {
|
|
372
361
|
"$ref": "#/$defs/duration"
|
|
@@ -542,8 +531,7 @@
|
|
|
542
531
|
"description": "The program's number for it. Written when it goes live; never change it after."
|
|
543
532
|
},
|
|
544
533
|
"name": {
|
|
545
|
-
"type": "string"
|
|
546
|
-
"maxLength": 32
|
|
534
|
+
"type": "string"
|
|
547
535
|
},
|
|
548
536
|
"description": {
|
|
549
537
|
"$ref": "#/$defs/words"
|
|
@@ -662,6 +650,34 @@
|
|
|
662
650
|
"collection": {
|
|
663
651
|
"$ref": "#/$defs/address",
|
|
664
652
|
"description": "A collectible's collection: one of `collections`. Default: the one the setup makes."
|
|
653
|
+
},
|
|
654
|
+
"drawn": {
|
|
655
|
+
"type": "array",
|
|
656
|
+
"description": "A fresh collectible: at most 64 traits drawn for each unit, in order, written on it, each attribute's name at most 64 bytes. Each from a table (`\"table\": key`, a row by weight among those in stock, drawn atomically with the box's roll) or a range (`\"min\"`/`\"max\"`, every whole number as likely, drawn at the mint from the same answer). Its name and link may contain `{attribute}` for each, beside `{serial}`. A fresh item is given only by a box's roll.",
|
|
657
|
+
"items": {
|
|
658
|
+
"type": "object",
|
|
659
|
+
"additionalProperties": false,
|
|
660
|
+
"required": [
|
|
661
|
+
"attribute"
|
|
662
|
+
],
|
|
663
|
+
"properties": {
|
|
664
|
+
"attribute": {
|
|
665
|
+
"type": "string",
|
|
666
|
+
"minLength": 1
|
|
667
|
+
},
|
|
668
|
+
"table": {
|
|
669
|
+
"$ref": "#/$defs/key"
|
|
670
|
+
},
|
|
671
|
+
"min": {
|
|
672
|
+
"type": "integer",
|
|
673
|
+
"minimum": 0
|
|
674
|
+
},
|
|
675
|
+
"max": {
|
|
676
|
+
"type": "integer",
|
|
677
|
+
"minimum": 0
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
}
|
|
665
681
|
}
|
|
666
682
|
}
|
|
667
683
|
},
|
|
@@ -701,19 +717,17 @@
|
|
|
701
717
|
"gives"
|
|
702
718
|
],
|
|
703
719
|
"additionalProperties": false,
|
|
704
|
-
"description": "One way a box can land: an item, tokens from a pool (`pay
|
|
720
|
+
"description": "One way a box can land: an item, a fixed amount of tokens from a pool (`pay`) or minted (`tokens`), all of it or none, an NFT of a stash at random (`stash`) or a named one (`nft`), a roll of another box (`roll`), any number of them together (`bundle`), or nothing. Give every outcome a `chance` (percents that add up to 100) or every one a `weight`. In a box that rolls on an NFT (`rollsOn`), an outcome can also move numbers on it (`shifts`) and say where it goes (`then`). A box of one outcome that needs no chance sells in one step (`buy`): no order, no settle. A box burns its price with a \"burn\" share in its `split`, whatever the roll gives.",
|
|
705
721
|
"properties": {
|
|
706
722
|
"gives": {
|
|
707
723
|
"enum": [
|
|
708
724
|
"item",
|
|
709
725
|
"pay",
|
|
710
|
-
"share",
|
|
711
726
|
"stash",
|
|
712
727
|
"tokens",
|
|
713
728
|
"nft",
|
|
714
729
|
"roll",
|
|
715
730
|
"bundle",
|
|
716
|
-
"burn",
|
|
717
731
|
"nothing"
|
|
718
732
|
]
|
|
719
733
|
},
|
|
@@ -736,12 +750,8 @@
|
|
|
736
750
|
"amount": {
|
|
737
751
|
"$ref": "#/$defs/amount"
|
|
738
752
|
},
|
|
739
|
-
"percent": {
|
|
740
|
-
"$ref": "#/$defs/percent"
|
|
741
|
-
},
|
|
742
753
|
"shifts": {
|
|
743
754
|
"type": "array",
|
|
744
|
-
"maxItems": 2,
|
|
745
755
|
"description": "For a box that rolls on an NFT (`rollsOn`): numbers this outcome moves on it (+1 level, -2 affection), never below 0, and never above `upTo` when raising. Written on the NFT when the game has authority over it, in its Sheet otherwise. With `fromNow`, a time: a day in jail from now.",
|
|
746
756
|
"items": {
|
|
747
757
|
"type": "object",
|
|
@@ -753,8 +763,7 @@
|
|
|
753
763
|
"properties": {
|
|
754
764
|
"attribute": {
|
|
755
765
|
"type": "string",
|
|
756
|
-
"minLength": 1
|
|
757
|
-
"maxLength": 32
|
|
766
|
+
"minLength": 1
|
|
758
767
|
},
|
|
759
768
|
"by": {
|
|
760
769
|
"anyOf": [
|
|
@@ -784,7 +793,7 @@
|
|
|
784
793
|
"$ref": "#/$defs/duration"
|
|
785
794
|
}
|
|
786
795
|
],
|
|
787
|
-
"description": "The most it reaches when raising. With `fromNow`, how far past now."
|
|
796
|
+
"description": "The most it reaches when raising; left out, no cap. With `fromNow`, how far past now."
|
|
788
797
|
},
|
|
789
798
|
"fromNow": {
|
|
790
799
|
"type": "boolean",
|
|
@@ -854,8 +863,7 @@
|
|
|
854
863
|
"prizes": {
|
|
855
864
|
"type": "array",
|
|
856
865
|
"minItems": 1,
|
|
857
|
-
"
|
|
858
|
-
"description": "For bundle: what it gives together, at most three: each { gives: item | pay | share | stash | tokens | nft | roll, … } as an outcome of one says.",
|
|
866
|
+
"description": "For bundle: what it gives together, any number: each { gives: item | pay | share | stash | tokens | nft | roll, … } as an outcome of one says.",
|
|
859
867
|
"items": {
|
|
860
868
|
"type": "object",
|
|
861
869
|
"required": [
|
|
@@ -872,9 +880,6 @@
|
|
|
872
880
|
"amount": {
|
|
873
881
|
"$ref": "#/$defs/amount"
|
|
874
882
|
},
|
|
875
|
-
"percent": {
|
|
876
|
-
"$ref": "#/$defs/percent"
|
|
877
|
-
},
|
|
878
883
|
"stash": {
|
|
879
884
|
"$ref": "#/$defs/key",
|
|
880
885
|
"description": "For stash: the stash one NFT of which this outcome gives, picked at random when the box is rolled (a box of one such outcome is still rolled by the oracle). For nft: the stash that lists `nft`."
|
|
@@ -900,20 +905,22 @@
|
|
|
900
905
|
"enum": [
|
|
901
906
|
"item",
|
|
902
907
|
"pay",
|
|
903
|
-
"share",
|
|
904
908
|
"stash",
|
|
905
909
|
"tokens",
|
|
906
910
|
"nft",
|
|
907
911
|
"roll"
|
|
908
912
|
]
|
|
913
|
+
},
|
|
914
|
+
"compressed": {
|
|
915
|
+
"type": "boolean",
|
|
916
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted at the settle into the project's tree (`compressedTree`) instead of a Core asset. A plain one holds no collectible's rent; a fresh one's drawn traits are written in the project's Sheet for it, its rent held by the order until the settle."
|
|
909
917
|
}
|
|
910
918
|
}
|
|
911
919
|
}
|
|
912
920
|
},
|
|
913
|
-
"
|
|
921
|
+
"compressed": {
|
|
914
922
|
"type": "boolean",
|
|
915
|
-
"
|
|
916
|
-
"description": "For bundle: the payment is burned, all of it, in place of the box's split."
|
|
923
|
+
"description": "For item: a compressed NFT of the collectible (Bubblegum v2), minted at the settle into the project's tree (`compressedTree`) instead of a Core asset. A plain one holds no collectible's rent; a fresh one's drawn traits are written in the project's Sheet for it, its rent held by the order until the settle."
|
|
917
924
|
}
|
|
918
925
|
}
|
|
919
926
|
},
|
|
@@ -958,6 +965,14 @@
|
|
|
958
965
|
"default": false,
|
|
959
966
|
"description": "Each item's chance shrinks with what is left of its supply."
|
|
960
967
|
},
|
|
968
|
+
"whenOut": {
|
|
969
|
+
"enum": [
|
|
970
|
+
"stopSales",
|
|
971
|
+
"drawLeft"
|
|
972
|
+
],
|
|
973
|
+
"default": "stopSales",
|
|
974
|
+
"description": "What a box that rolls does once an outcome can't be given (an item sold out, a pool short of its prize, a stash empty). \"stopSales\" (the default): it isn't sold while any outcome couldn't cover this purchase's draws and those of purchases still waiting for their answer, so every roll is on the odds written, and the project restocks or edits the box to sell again. \"drawLeft\": it keeps selling, and a roll draws among the outcomes still there by their written weights, so the others' chances rise as one runs out: a player can empty a common outcome to make a rare one likelier. A box selling a rare prize keeps \"stopSales\"."
|
|
975
|
+
},
|
|
961
976
|
"active": {
|
|
962
977
|
"type": "boolean",
|
|
963
978
|
"default": true,
|
|
@@ -969,7 +984,6 @@
|
|
|
969
984
|
"outcomes": {
|
|
970
985
|
"type": "array",
|
|
971
986
|
"minItems": 1,
|
|
972
|
-
"maxItems": 8,
|
|
973
987
|
"items": {
|
|
974
988
|
"$ref": "#/$defs/outcome"
|
|
975
989
|
}
|
|
@@ -980,7 +994,6 @@
|
|
|
980
994
|
},
|
|
981
995
|
"odds": {
|
|
982
996
|
"type": "array",
|
|
983
|
-
"maxItems": 4,
|
|
984
997
|
"items": {
|
|
985
998
|
"$ref": "#/$defs/odds"
|
|
986
999
|
}
|
|
@@ -1041,6 +1054,40 @@
|
|
|
1041
1054
|
}
|
|
1042
1055
|
}
|
|
1043
1056
|
]
|
|
1057
|
+
},
|
|
1058
|
+
"slots": {
|
|
1059
|
+
"type": "array",
|
|
1060
|
+
"description": "What one open draws: each slot `count` draws among the outcomes it names (`from`: their places in `outcomes`, from 0; all when left out), and with `distinct` no outcome twice in the open. Left out, an open is one draw among every outcome. A pack of five is `[{ \"count\": 5 }]`; a guaranteed rare `[{ \"count\": 4 }, { \"count\": 1, \"from\": [8, 9, 10] }]`. A player may open several packs in one purchase.",
|
|
1061
|
+
"items": {
|
|
1062
|
+
"type": "object",
|
|
1063
|
+
"additionalProperties": false,
|
|
1064
|
+
"required": [
|
|
1065
|
+
"count"
|
|
1066
|
+
],
|
|
1067
|
+
"properties": {
|
|
1068
|
+
"count": {
|
|
1069
|
+
"type": "integer",
|
|
1070
|
+
"minimum": 1
|
|
1071
|
+
},
|
|
1072
|
+
"from": {
|
|
1073
|
+
"type": "array",
|
|
1074
|
+
"items": {
|
|
1075
|
+
"type": "integer",
|
|
1076
|
+
"minimum": 0,
|
|
1077
|
+
"maximum": 65535
|
|
1078
|
+
}
|
|
1079
|
+
},
|
|
1080
|
+
"distinct": {
|
|
1081
|
+
"type": "boolean"
|
|
1082
|
+
},
|
|
1083
|
+
"share": {
|
|
1084
|
+
"type": "number",
|
|
1085
|
+
"minimum": 0,
|
|
1086
|
+
"maximum": 100,
|
|
1087
|
+
"description": "What this slot's draws are worth, as a percent of an open's price. Needed on every slot of a box whose slots name outcomes (`from`), 100 together: a draw that can't be made (its slot sold out) gives this share back, so a guaranteed rare keeps its value when the commons run out. Leave it out when every slot draws among all the outcomes."
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1044
1091
|
}
|
|
1045
1092
|
}
|
|
1046
1093
|
},
|
|
@@ -1083,7 +1130,7 @@
|
|
|
1083
1130
|
"takes"
|
|
1084
1131
|
],
|
|
1085
1132
|
"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`).",
|
|
1133
|
+
"description": "burn: `count` collectibles of `item`, burned. use: one collectible of `item`, kept (counts a use of its life). renew: one kept, its uses counted from zero again (its `used` count). staked: one collectible of `item`, kept as `use` keeps it, that must be staked in `farm`: on its own seat in that farm of this spec, which escrows or freezes it (a watched one could be sold). A set bound into a badge takes its pieces this way and moves that farm's `lockAttribute` far ahead, so they stay staked while the badge exists; a recipe that raises anything on a staked piece must raise its farm's `lockAttribute` (to raise a stat and leave the lock alone, use `use`). show: one NFT of `collection` the player holds, kept (any Core NFT, or a Token Metadata NFT verified in it; the game's own collection when left out), read with what the game wrote in its Sheet. pay: `amount` of `currency`, sent `to` a destination. trade: one NFT of `collection` the player holds, any kind, traded in: burned, given on, or put in a stash (`then`).",
|
|
1087
1134
|
"properties": {
|
|
1088
1135
|
"takes": {
|
|
1089
1136
|
"enum": [
|
|
@@ -1106,7 +1153,7 @@
|
|
|
1106
1153
|
"count": {
|
|
1107
1154
|
"type": "integer",
|
|
1108
1155
|
"minimum": 1,
|
|
1109
|
-
"maximum":
|
|
1156
|
+
"maximum": 255
|
|
1110
1157
|
},
|
|
1111
1158
|
"amount": {
|
|
1112
1159
|
"$ref": "#/$defs/amount"
|
|
@@ -1133,13 +1180,12 @@
|
|
|
1133
1180
|
"gives"
|
|
1134
1181
|
],
|
|
1135
1182
|
"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;
|
|
1183
|
+
"description": "A prize (see `prize`), or a roll on a collectible the recipe keeps: { \"gives\": \"roll\", \"box\": key, \"on\": place } (a risky upgrade; the player or the project’s keys ask the oracle and settle it). A craft refuses a prize it can't give (a pool that holds less, an item sold out or switched off, an NFT gone).",
|
|
1137
1184
|
"properties": {
|
|
1138
1185
|
"gives": {
|
|
1139
1186
|
"enum": [
|
|
1140
1187
|
"item",
|
|
1141
1188
|
"tokens",
|
|
1142
|
-
"share",
|
|
1143
1189
|
"nft",
|
|
1144
1190
|
"roll"
|
|
1145
1191
|
]
|
|
@@ -1162,12 +1208,6 @@
|
|
|
1162
1208
|
"type": "string",
|
|
1163
1209
|
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
1164
1210
|
},
|
|
1165
|
-
"pool": {
|
|
1166
|
-
"$ref": "#/$defs/key"
|
|
1167
|
-
},
|
|
1168
|
-
"percent": {
|
|
1169
|
-
"$ref": "#/$defs/percent"
|
|
1170
|
-
},
|
|
1171
1211
|
"box": {
|
|
1172
1212
|
"$ref": "#/$defs/key",
|
|
1173
1213
|
"description": "For `roll`: the box rolled, free, for the player."
|
|
@@ -1175,7 +1215,7 @@
|
|
|
1175
1215
|
"on": {
|
|
1176
1216
|
"type": "integer",
|
|
1177
1217
|
"minimum": 0,
|
|
1178
|
-
"maximum":
|
|
1218
|
+
"maximum": 254,
|
|
1179
1219
|
"description": "For `roll`: the collectible handed in and kept (its place, the first is 0) the box rolls on (a risky upgrade); left out, it rolls on nothing (a merge whose result is left to chance). One a recipe."
|
|
1180
1220
|
},
|
|
1181
1221
|
"stash": {
|
|
@@ -1215,21 +1255,18 @@
|
|
|
1215
1255
|
},
|
|
1216
1256
|
"in": {
|
|
1217
1257
|
"type": "array",
|
|
1218
|
-
"maxItems": 8,
|
|
1219
1258
|
"items": {
|
|
1220
1259
|
"$ref": "#/$defs/input"
|
|
1221
1260
|
}
|
|
1222
1261
|
},
|
|
1223
1262
|
"out": {
|
|
1224
1263
|
"type": "array",
|
|
1225
|
-
"maxItems": 8,
|
|
1226
1264
|
"items": {
|
|
1227
1265
|
"$ref": "#/$defs/output"
|
|
1228
1266
|
}
|
|
1229
1267
|
},
|
|
1230
1268
|
"needs": {
|
|
1231
1269
|
"type": "array",
|
|
1232
|
-
"maxItems": 8,
|
|
1233
1270
|
"items": {
|
|
1234
1271
|
"type": "object",
|
|
1235
1272
|
"required": [
|
|
@@ -1243,12 +1280,11 @@
|
|
|
1243
1280
|
"place": {
|
|
1244
1281
|
"type": "integer",
|
|
1245
1282
|
"minimum": 0,
|
|
1246
|
-
"maximum":
|
|
1283
|
+
"maximum": 254
|
|
1247
1284
|
},
|
|
1248
1285
|
"key": {
|
|
1249
1286
|
"type": "string",
|
|
1250
|
-
"minLength": 1
|
|
1251
|
-
"maxLength": 32
|
|
1287
|
+
"minLength": 1
|
|
1252
1288
|
},
|
|
1253
1289
|
"atLeast": {
|
|
1254
1290
|
"type": "integer",
|
|
@@ -1260,7 +1296,6 @@
|
|
|
1260
1296
|
},
|
|
1261
1297
|
"keeps": {
|
|
1262
1298
|
"type": "array",
|
|
1263
|
-
"maxItems": 8,
|
|
1264
1299
|
"items": {
|
|
1265
1300
|
"type": "object",
|
|
1266
1301
|
"required": [
|
|
@@ -1273,25 +1308,23 @@
|
|
|
1273
1308
|
"properties": {
|
|
1274
1309
|
"key": {
|
|
1275
1310
|
"type": "string",
|
|
1276
|
-
"minLength": 1
|
|
1277
|
-
"maxLength": 32
|
|
1311
|
+
"minLength": 1
|
|
1278
1312
|
},
|
|
1279
1313
|
"from": {
|
|
1280
1314
|
"type": "integer",
|
|
1281
1315
|
"minimum": 0,
|
|
1282
|
-
"maximum":
|
|
1316
|
+
"maximum": 254
|
|
1283
1317
|
},
|
|
1284
1318
|
"to": {
|
|
1285
1319
|
"type": "integer",
|
|
1286
1320
|
"minimum": 0,
|
|
1287
|
-
"maximum":
|
|
1321
|
+
"maximum": 254
|
|
1288
1322
|
}
|
|
1289
1323
|
}
|
|
1290
1324
|
}
|
|
1291
1325
|
},
|
|
1292
1326
|
"raises": {
|
|
1293
1327
|
"type": "array",
|
|
1294
|
-
"maxItems": 8,
|
|
1295
1328
|
"description": "Numbers the recipe moves on collectibles handed in and kept (use, renew, show): a level or a stat bought with the recipe's own payment, or one it costs (a negative `by`: a merge that costs a level, never below 0). Written on the NFT when the game has authority over it, in its Sheet otherwise. One already at `upTo` is refused (MaxedOut) when raising. With `fromNow`, it moves a time: fuel for a day more (\"by\": \"1d\", \"upTo\": \"3d\"), a day off a lock (\"by\": \"-1d\").",
|
|
1296
1329
|
"items": {
|
|
1297
1330
|
"type": "object",
|
|
@@ -1305,13 +1338,12 @@
|
|
|
1305
1338
|
"place": {
|
|
1306
1339
|
"type": "integer",
|
|
1307
1340
|
"minimum": 0,
|
|
1308
|
-
"maximum":
|
|
1341
|
+
"maximum": 254,
|
|
1309
1342
|
"description": "Which collectible handed in (the first is 0); one that is kept."
|
|
1310
1343
|
},
|
|
1311
1344
|
"key": {
|
|
1312
1345
|
"type": "string",
|
|
1313
|
-
"minLength": 1
|
|
1314
|
-
"maxLength": 32
|
|
1346
|
+
"minLength": 1
|
|
1315
1347
|
},
|
|
1316
1348
|
"by": {
|
|
1317
1349
|
"anyOf": [
|
|
@@ -1341,7 +1373,7 @@
|
|
|
1341
1373
|
"$ref": "#/$defs/duration"
|
|
1342
1374
|
}
|
|
1343
1375
|
],
|
|
1344
|
-
"description": "The most it reaches;
|
|
1376
|
+
"description": "The most it reaches; left out, no cap. With `fromNow`, how far past now: \"3d\"."
|
|
1345
1377
|
},
|
|
1346
1378
|
"fromNow": {
|
|
1347
1379
|
"type": "boolean",
|
|
@@ -1418,7 +1450,7 @@
|
|
|
1418
1450
|
"$ref": "#/$defs/destination"
|
|
1419
1451
|
}
|
|
1420
1452
|
],
|
|
1421
|
-
"description": "move: the pool it fills. pay: \"wallet:<address>\", \"account:<token account address>\" or \"holder:<asset address>\",
|
|
1453
|
+
"description": "move: the pool it fills. issue: \"farm:<key>\" to mint into that farm's rewards vault instead of a `pool` (an emission its stakers share). pay: \"wallet:<address>\", \"account:<token account address>\" or \"holder:<asset address>\", \"lottery:<key>\" (that lottery's pot: a sponsored or no-loss prize stream) or \"farm:<key>\" (that farm's rewards vault). A sealed one pays only \"wallet:<address>\", \"treasury\" or \"burn\"."
|
|
1422
1454
|
},
|
|
1423
1455
|
"amount": {
|
|
1424
1456
|
"$ref": "#/$defs/amount"
|
|
@@ -1452,7 +1484,7 @@
|
|
|
1452
1484
|
},
|
|
1453
1485
|
"sealed": {
|
|
1454
1486
|
"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.
|
|
1487
|
+
"description": "A sealed schedule (does \"pay\", in `currency`): it pays from a vault of its own that nothing else can touch, and once written nobody, the owner included, can change it, switch it off or take its tokens back. It needs `maxRuns`; its last run pays whatever is left. It pays a wallet, the treasury or a burn (a stream into a pool, a pot or a farm is only as safe as where it lands: leave it unsealed). Vesting, an unlock."
|
|
1456
1488
|
},
|
|
1457
1489
|
"fund": {
|
|
1458
1490
|
"$ref": "#/$defs/amount",
|
|
@@ -1501,7 +1533,6 @@
|
|
|
1501
1533
|
"places": {
|
|
1502
1534
|
"type": "array",
|
|
1503
1535
|
"minItems": 1,
|
|
1504
|
-
"maxItems": 8,
|
|
1505
1536
|
"items": {
|
|
1506
1537
|
"anyOf": [
|
|
1507
1538
|
{
|
|
@@ -1521,12 +1552,18 @@
|
|
|
1521
1552
|
"prize": {
|
|
1522
1553
|
"$ref": "#/$defs/prize",
|
|
1523
1554
|
"description": "What its winner gets besides its share of the pot: a raffled NFT, a collectible, tokens, a roll of a box."
|
|
1555
|
+
},
|
|
1556
|
+
"times": {
|
|
1557
|
+
"type": "integer",
|
|
1558
|
+
"minimum": 1,
|
|
1559
|
+
"maximum": 40960,
|
|
1560
|
+
"description": "How many places in a row are alike (a run): \"places 2 to 201 each take 1%\" is one { \"percent\": 1, \"times\": 200 }. Not for a named NFT or a roll, which one place gives. Default 1."
|
|
1524
1561
|
}
|
|
1525
1562
|
}
|
|
1526
1563
|
}
|
|
1527
1564
|
]
|
|
1528
1565
|
},
|
|
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."
|
|
1566
|
+
"description": "What each place wins, first place first: a percent of the pot, or { \"percent\", \"prize\", \"times\" }: a share of the pot and a prize for its winner (either, or both), for `times` places in a row. Default: one winner takes all."
|
|
1530
1567
|
},
|
|
1531
1568
|
"every": {
|
|
1532
1569
|
"$ref": "#/$defs/duration",
|
|
@@ -1546,6 +1583,27 @@
|
|
|
1546
1583
|
"$ref": "#/$defs/amount",
|
|
1547
1584
|
"description": "What the owner puts in the pot at go-live."
|
|
1548
1585
|
},
|
|
1586
|
+
"roundRent": {
|
|
1587
|
+
"$ref": "#/$defs/amount",
|
|
1588
|
+
"description": "SOL the owner puts in the lottery at go-live to pay each round's record, its token accounts and every purchase's entry (lent to the round, back to the lottery when it closes): buyers then pay no program rent for a ticket. On by default, sized from `expect` (its rounds open or paying out at once, and a round's purchases); give an amount to set it, 0 to turn it off. When it runs short, a round's first buyer fronts its record, back to them at the close, and each buyer pays their own entry's bytes."
|
|
1589
|
+
},
|
|
1590
|
+
"expect": {
|
|
1591
|
+
"type": "object",
|
|
1592
|
+
"additionalProperties": false,
|
|
1593
|
+
"description": "What the default `roundRent` is sized for: `rounds`, the rounds open or still paying out at once (default 2 for a lottery that draws again, 1 for one that draws once), and `entries`, the purchases a round takes (default: the scenario's purchases a day over a round, else 100).",
|
|
1594
|
+
"properties": {
|
|
1595
|
+
"rounds": {
|
|
1596
|
+
"type": "integer",
|
|
1597
|
+
"minimum": 1,
|
|
1598
|
+
"maximum": 100
|
|
1599
|
+
},
|
|
1600
|
+
"entries": {
|
|
1601
|
+
"type": "integer",
|
|
1602
|
+
"minimum": 0,
|
|
1603
|
+
"maximum": 262000
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
},
|
|
1549
1607
|
"split": {
|
|
1550
1608
|
"$ref": "#/$defs/split",
|
|
1551
1609
|
"description": "Where ticket money goes before the pot (the rest goes into the pot): a charity, a referrer the buyer names (\"chosen\"), the treasury."
|
|
@@ -1593,6 +1651,33 @@
|
|
|
1593
1651
|
}
|
|
1594
1652
|
],
|
|
1595
1653
|
"description": "A raffle: this NFT (one the owner holds, put in the lottery's own stash at go-live) is first place's prize, held so that nothing but the draw can give it, and the lottery draws once. The same as a first place { \"prize\": { \"gives\": \"nft\", \"nft\": <address>, \"held\": true } }. An NFT of another collection is { \"nft\", \"collection\" }."
|
|
1654
|
+
},
|
|
1655
|
+
"nfts": {
|
|
1656
|
+
"type": "array",
|
|
1657
|
+
"maxItems": 500,
|
|
1658
|
+
"items": {
|
|
1659
|
+
"anyOf": [
|
|
1660
|
+
{
|
|
1661
|
+
"$ref": "#/$defs/address"
|
|
1662
|
+
},
|
|
1663
|
+
{
|
|
1664
|
+
"type": "object",
|
|
1665
|
+
"additionalProperties": false,
|
|
1666
|
+
"required": [
|
|
1667
|
+
"nft"
|
|
1668
|
+
],
|
|
1669
|
+
"properties": {
|
|
1670
|
+
"nft": {
|
|
1671
|
+
"$ref": "#/$defs/address"
|
|
1672
|
+
},
|
|
1673
|
+
"collection": {
|
|
1674
|
+
"$ref": "#/$defs/address"
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
]
|
|
1679
|
+
},
|
|
1680
|
+
"description": "NFTs the lottery's own stash holds for its places that give { \"gives\": \"raffled\" } (each draws one at random with the round's answer): a raffle of many NFTs. Your wallet puts them in at go-live, a group a transaction, before the lottery is written; at least as many as such places. The lottery draws once."
|
|
1596
1681
|
}
|
|
1597
1682
|
},
|
|
1598
1683
|
"description": "Tickets into a pot of the lottery's own, one random draw, the winners paid. Nothing but its winners' payouts takes from the pot: not the authority, a schedule, a farm or a recipe. Anything sold or paid can send it a share (\"lottery:<key>\" in a split); a schedule can't pay a lottery."
|
|
@@ -1620,11 +1705,11 @@
|
|
|
1620
1705
|
"sides": {
|
|
1621
1706
|
"type": "integer",
|
|
1622
1707
|
"minimum": 1,
|
|
1623
|
-
"maximum":
|
|
1708
|
+
"maximum": 1024
|
|
1624
1709
|
},
|
|
1625
1710
|
"sideNames": {
|
|
1626
1711
|
"type": "array",
|
|
1627
|
-
"maxItems":
|
|
1712
|
+
"maxItems": 1024,
|
|
1628
1713
|
"items": {
|
|
1629
1714
|
"type": "string",
|
|
1630
1715
|
"maxLength": 40
|
|
@@ -1654,7 +1739,6 @@
|
|
|
1654
1739
|
},
|
|
1655
1740
|
"deciders": {
|
|
1656
1741
|
"type": "array",
|
|
1657
|
-
"maxItems": 3,
|
|
1658
1742
|
"items": {
|
|
1659
1743
|
"$ref": "#/$defs/address"
|
|
1660
1744
|
},
|
|
@@ -1675,6 +1759,11 @@
|
|
|
1675
1759
|
"stakeNft": {
|
|
1676
1760
|
"$ref": "#/$defs/rule",
|
|
1677
1761
|
"description": "Each entry stakes one NFT that passes this rule, in place of tokens, and the NFTs are the pot: each winning entry takes its own back and one of the losers', in the order they are claimed; what the winners leave goes to whoever opened it. Called off, each takes its own back. No split and no stake."
|
|
1762
|
+
},
|
|
1763
|
+
"losersEach": {
|
|
1764
|
+
"type": "integer",
|
|
1765
|
+
"minimum": 1,
|
|
1766
|
+
"description": "In a contest of NFTs (`stakeNft`), the most losers' NFTs one winner takes; what the winners leave goes to whoever opened it. Default: no cap, the winners share every loser's NFT (the first to enter on the winning side take one more when they don't divide evenly), each picking which."
|
|
1678
1767
|
}
|
|
1679
1768
|
}
|
|
1680
1769
|
},
|
|
@@ -1990,6 +2079,13 @@
|
|
|
1990
2079
|
"$ref": "#/$defs/address",
|
|
1991
2080
|
"description": "The project's tree of compressed NFTs, once the setup opened it."
|
|
1992
2081
|
},
|
|
2082
|
+
"tables": {
|
|
2083
|
+
"type": "array",
|
|
2084
|
+
"items": {
|
|
2085
|
+
"$ref": "#/$defs/address"
|
|
2086
|
+
},
|
|
2087
|
+
"description": "The project's standing lookup tables, made at go-live (the owner their authority): a transaction too big for a legacy one goes as v0 with them, in one approval."
|
|
2088
|
+
},
|
|
1993
2089
|
"treasury": {
|
|
1994
2090
|
"$ref": "#/$defs/address"
|
|
1995
2091
|
},
|
|
@@ -2130,12 +2226,11 @@
|
|
|
2130
2226
|
},
|
|
2131
2227
|
"collection": {
|
|
2132
2228
|
"$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."
|
|
2229
|
+
"description": "Any NFT of this collection: a Metaplex Core collection, or the mint of a Token Metadata collection its NFTs are verified in (a print of a master, which its holder makes without the collection's authority, counts as in no collection). Leave it and `item` out for the game's own collection."
|
|
2134
2230
|
},
|
|
2135
2231
|
"attribute": {
|
|
2136
2232
|
"type": "string",
|
|
2137
|
-
"minLength": 1
|
|
2138
|
-
"maxLength": 32
|
|
2233
|
+
"minLength": 1
|
|
2139
2234
|
},
|
|
2140
2235
|
"atLeast": {
|
|
2141
2236
|
"type": "integer",
|
|
@@ -2143,8 +2238,7 @@
|
|
|
2143
2238
|
"maximum": 4294967295
|
|
2144
2239
|
},
|
|
2145
2240
|
"equals": {
|
|
2146
|
-
"type": "string"
|
|
2147
|
-
"maxLength": 32
|
|
2241
|
+
"type": "string"
|
|
2148
2242
|
},
|
|
2149
2243
|
"time": {
|
|
2150
2244
|
"enum": [
|
|
@@ -2192,7 +2286,7 @@
|
|
|
2192
2286
|
"outcome": {
|
|
2193
2287
|
"type": "integer",
|
|
2194
2288
|
"minimum": 0,
|
|
2195
|
-
"maximum":
|
|
2289
|
+
"maximum": 65535,
|
|
2196
2290
|
"description": "Which outcome (0 is the first)."
|
|
2197
2291
|
},
|
|
2198
2292
|
"when": {
|
|
@@ -2227,11 +2321,15 @@
|
|
|
2227
2321
|
},
|
|
2228
2322
|
"roll": {
|
|
2229
2323
|
"$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.
|
|
2324
|
+
"description": "A mission's result: a box with `rollsOn` the collectible leaving after this tier's lock is rolled on (success, failure, a stat lost, the NFT lost; its odds read the NFT's stats). Growth stops at the lock's end. Its player or the project’s keys ask for the roll and settle it; it is never refunded while it waits. A chest it brings back is its `prize` instead. Only in a farm of collectibles, with a lock."
|
|
2231
2325
|
},
|
|
2232
2326
|
"exitFee": {
|
|
2233
2327
|
"$ref": "#/$defs/percent",
|
|
2234
2328
|
"description": "A farm of tokens: a stake may leave before this tier's lock has run by leaving this percent of what it takes out (to the farm's `exitFeeTo`). Absent: no early exit. A farm of collectibles leaves early by a recipe that lowers its `lockAttribute`."
|
|
2329
|
+
},
|
|
2330
|
+
"earnsFor": {
|
|
2331
|
+
"$ref": "#/$defs/duration",
|
|
2332
|
+
"description": "A term: a seat at this tier earns and grows only this long after its lock started (a stake, or a booster put on, starts it again), however late it is touched; its prize is still given once its lock has run. Absent: no end."
|
|
2235
2333
|
}
|
|
2236
2334
|
}
|
|
2237
2335
|
},
|
|
@@ -2243,7 +2341,7 @@
|
|
|
2243
2341
|
"name",
|
|
2244
2342
|
"stakes"
|
|
2245
2343
|
],
|
|
2246
|
-
"description": "Players stake a token or collectibles. Rewards are whatever
|
|
2344
|
+
"description": "Players stake a token or collectibles. Rewards are whatever lands in the farm's own rewards vault (\"farm:<key>\" in a split or a schedule, its `seed`), shared by weight (what they stake, times their lock tier, plus boosts from what a collectible says), or a fixed `rate`. A farm can also write points and levels on what is staked (`growth`), and pay a mission's `prize` to a collectible that stays its tier's lock. It cannot be edited once open. A farm of collectibles can keep two times on the NFT itself: its lock (`lockAttribute`) and an upkeep (`upkeepAttribute`), which recipes and rolls move like any number.",
|
|
2247
2345
|
"properties": {
|
|
2248
2346
|
"key": {
|
|
2249
2347
|
"$ref": "#/$defs/key"
|
|
@@ -2274,13 +2372,11 @@
|
|
|
2274
2372
|
},
|
|
2275
2373
|
"rewards": {
|
|
2276
2374
|
"$ref": "#/$defs/key",
|
|
2277
|
-
"description": "The
|
|
2375
|
+
"description": "The token its rewards are in (a token key). They land in the farm's own rewards vault: send it a share (\"farm:<key>\" in a split), pay it with a schedule (\"to\": \"farm:<key>\"), or `seed` it; with a minted `rate` nothing waits there. Left out: the staked token, or for a farm of collectibles the project's currency."
|
|
2278
2376
|
},
|
|
2279
|
-
"
|
|
2280
|
-
"
|
|
2281
|
-
"
|
|
2282
|
-
"maximum": 255,
|
|
2283
|
-
"description": "For a farm that names no `rewards`: the program's number for the empty pool made for it. Written when it goes live; never change it after."
|
|
2377
|
+
"seed": {
|
|
2378
|
+
"$ref": "#/$defs/amount",
|
|
2379
|
+
"description": "What the owner puts into its rewards vault at go-live, from their wallet (anyone may add more later, with a plain transfer)."
|
|
2284
2380
|
},
|
|
2285
2381
|
"rate": {
|
|
2286
2382
|
"type": "object",
|
|
@@ -2288,16 +2384,25 @@
|
|
|
2288
2384
|
"required": [
|
|
2289
2385
|
"perDay"
|
|
2290
2386
|
],
|
|
2291
|
-
"description": "A fixed rate instead of sharing what
|
|
2387
|
+
"description": "A fixed rate instead of sharing what lands: for each seat whoever else is in, times its tier and boosts (most Solana NFT staking paid this way), or with `shared` the whole farm's a day, shared by weight.",
|
|
2292
2388
|
"properties": {
|
|
2293
2389
|
"perDay": {
|
|
2294
2390
|
"$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
|
|
2391
|
+
"description": "Reward tokens a day for each collectible at x1; for a farm of tokens, for each whole token staked; with `shared`, for the whole farm. 0 pays nothing: a farm that only grows what is staked, or gives mission prizes."
|
|
2296
2392
|
},
|
|
2297
2393
|
"minted": {
|
|
2298
2394
|
"type": "boolean",
|
|
2299
2395
|
"default": false,
|
|
2300
|
-
"description": "Minted (the rewards' token must be one the game mints), or paid from
|
|
2396
|
+
"description": "Minted when a seat is paid (the rewards' token must be one the game mints), or paid from what its rewards vault holds free while it lasts (what it can't cover is not owed later)."
|
|
2397
|
+
},
|
|
2398
|
+
"shared": {
|
|
2399
|
+
"type": "boolean",
|
|
2400
|
+
"default": false,
|
|
2401
|
+
"description": "`perDay` is the whole farm's a day, shared by weight while anything is staked: an emission budget, each seat's share falling as more stake."
|
|
2402
|
+
},
|
|
2403
|
+
"halveEvery": {
|
|
2404
|
+
"$ref": "#/$defs/duration",
|
|
2405
|
+
"description": "The rate halves every this long from when the farm opens, again and again (a halving emission)."
|
|
2301
2406
|
}
|
|
2302
2407
|
}
|
|
2303
2408
|
},
|
|
@@ -2313,7 +2418,7 @@
|
|
|
2313
2418
|
"tiers": {
|
|
2314
2419
|
"type": "array",
|
|
2315
2420
|
"minItems": 1,
|
|
2316
|
-
"maxItems":
|
|
2421
|
+
"maxItems": 256,
|
|
2317
2422
|
"items": {
|
|
2318
2423
|
"$ref": "#/$defs/tier"
|
|
2319
2424
|
},
|
|
@@ -2321,7 +2426,6 @@
|
|
|
2321
2426
|
},
|
|
2322
2427
|
"boosts": {
|
|
2323
2428
|
"type": "array",
|
|
2324
|
-
"maxItems": 4,
|
|
2325
2429
|
"items": {
|
|
2326
2430
|
"type": "object",
|
|
2327
2431
|
"additionalProperties": false,
|
|
@@ -2351,7 +2455,6 @@
|
|
|
2351
2455
|
{
|
|
2352
2456
|
"type": "array",
|
|
2353
2457
|
"minItems": 1,
|
|
2354
|
-
"maxItems": 4,
|
|
2355
2458
|
"items": {
|
|
2356
2459
|
"$ref": "#/$defs/rule"
|
|
2357
2460
|
}
|
|
@@ -2367,7 +2470,6 @@
|
|
|
2367
2470
|
{
|
|
2368
2471
|
"type": "array",
|
|
2369
2472
|
"minItems": 1,
|
|
2370
|
-
"maxItems": 4,
|
|
2371
2473
|
"items": {
|
|
2372
2474
|
"$ref": "#/$defs/growth"
|
|
2373
2475
|
}
|
|
@@ -2382,41 +2484,17 @@
|
|
|
2382
2484
|
"lockAttribute": {
|
|
2383
2485
|
"type": "string",
|
|
2384
2486
|
"minLength": 1,
|
|
2385
|
-
"
|
|
2386
|
-
"description": "For a farm of collectibles: the attribute the farm writes each staked collectible's lock under, as the time it ends (Unix seconds), and reads when it leaves. Whatever moves a number moves it: a recipe `raises` it by \"-1d\" with `fromNow` for a price (a way out early; the price can be burned, or paid into this farm's rewards pool, shared by the seats there at the next move), a roll's `shifts` add a day (jail). A mission's prize still needs the tier's own lock to have run, and a tier that rolls rolls whenever the collectible leaves. A recipe reaches a collectible staked in escrow (the default) on its seat."
|
|
2487
|
+
"description": "For a farm of collectibles: the attribute the farm writes each staked collectible's lock under, as the time it ends (Unix seconds), and reads when it leaves. Whatever moves a number moves it: a recipe `raises` it by \"-1d\" with `fromNow` for a price (a way out early; the price can be burned, or paid into this farm's rewards vault (\"farm:<key>\"), shared by the seats there), a roll's `shifts` add a day (jail). A mission's prize still needs the tier's own lock to have run, and a tier that rolls rolls whenever the collectible leaves. A recipe reaches a collectible staked in escrow (the default) on its seat."
|
|
2387
2488
|
},
|
|
2388
2489
|
"upkeepAttribute": {
|
|
2389
2490
|
"type": "string",
|
|
2390
2491
|
"minLength": 1,
|
|
2391
|
-
"
|
|
2392
|
-
"description": "For a farm of collectibles: an upkeep. The attribute that says until when (Unix seconds) a staked collectible earns and grows: fuel, food, a license. A recipe sells it (`raises` with `fromNow`: \"+1d\" for 10 FUEL, up to \"3d\" ahead), and it runs out by itself. Run dry, the seat earns and grows nothing more, and what it was credited after it ran out goes back to the farm (split by time), shared by the seats there. Fuel bought counts once the seat is refreshed (anyone sends `refresh`; the play page sends it with the recipe). A mission's prize needs the upkeep to last its tier's lock."
|
|
2492
|
+
"description": "For a farm of collectibles: an upkeep. The attribute that says until when (Unix seconds) a staked collectible earns and grows: fuel, food, a license. A recipe sells it (`raises` with `fromNow`: \"+1d\" for 10 FUEL, up to \"3d\" ahead), and it runs out by itself. Run dry, the seat earns and grows nothing more from that time, however late it is next touched. Fuel bought counts once the seat is refreshed (anyone sends `refresh`; the play page sends it with the recipe). A mission's prize needs the upkeep to last its tier's lock."
|
|
2393
2493
|
},
|
|
2394
2494
|
"exitFeeTo": {
|
|
2395
2495
|
"type": "string",
|
|
2396
|
-
"pattern": "^(burn|pool:[a-z][a-z0-9-]{0,31})$",
|
|
2397
|
-
"description": "Where early-exit fees go: \"burn\",
|
|
2398
|
-
},
|
|
2399
|
-
"unbond": {
|
|
2400
|
-
"$ref": "#/$defs/duration",
|
|
2401
|
-
"description": "A farm of tokens: what a player takes out waits this long first, earning nothing (an unbonding wait), then any later unstake takes it out."
|
|
2402
|
-
},
|
|
2403
|
-
"toll": {
|
|
2404
|
-
"type": "object",
|
|
2405
|
-
"additionalProperties": false,
|
|
2406
|
-
"required": [
|
|
2407
|
-
"percent",
|
|
2408
|
-
"to"
|
|
2409
|
-
],
|
|
2410
|
-
"description": "A share of every payout of rewards (harvest, compound, unstake), burned or sent to a pool. Not on mission prizes.",
|
|
2411
|
-
"properties": {
|
|
2412
|
-
"percent": {
|
|
2413
|
-
"$ref": "#/$defs/percent"
|
|
2414
|
-
},
|
|
2415
|
-
"to": {
|
|
2416
|
-
"type": "string",
|
|
2417
|
-
"pattern": "^(burn|pool:[a-z][a-z0-9-]{0,31})$"
|
|
2418
|
-
}
|
|
2419
|
-
}
|
|
2496
|
+
"pattern": "^(burn|rewards|pool:[a-z][a-z0-9-]{0,31})$",
|
|
2497
|
+
"description": "Where early-exit fees go: \"burn\", \"rewards\" (the farm's own rewards vault, shared by the stakers who stay: a farm whose rewards are its staked token), or \"pool:<key>\". Needed when a tier has `exitFee`."
|
|
2420
2498
|
}
|
|
2421
2499
|
}
|
|
2422
2500
|
},
|
|
@@ -2568,6 +2646,16 @@
|
|
|
2568
2646
|
"prize": {
|
|
2569
2647
|
"$ref": "#/$defs/prize",
|
|
2570
2648
|
"description": "What each claim gives (a prize). The grant's funds pay what it opens."
|
|
2649
|
+
},
|
|
2650
|
+
"wallets": {
|
|
2651
|
+
"type": "integer",
|
|
2652
|
+
"minimum": 1,
|
|
2653
|
+
"description": "About how many wallets will claim it over its life (with `rounds`, how many rounds each): it sizes how its records are kept (one list up to ~100,000, more lists above). Default: its list's length."
|
|
2654
|
+
},
|
|
2655
|
+
"rounds": {
|
|
2656
|
+
"type": "integer",
|
|
2657
|
+
"minimum": 1,
|
|
2658
|
+
"description": "About how many rounds each wallet will be paid over its life. Default 1."
|
|
2571
2659
|
}
|
|
2572
2660
|
}
|
|
2573
2661
|
},
|
|
@@ -2587,7 +2675,6 @@
|
|
|
2587
2675
|
"wallets": {
|
|
2588
2676
|
"type": "array",
|
|
2589
2677
|
"minItems": 0,
|
|
2590
|
-
"maxItems": 16,
|
|
2591
2678
|
"items": {
|
|
2592
2679
|
"$ref": "#/$defs/address"
|
|
2593
2680
|
}
|
|
@@ -2672,7 +2759,6 @@
|
|
|
2672
2759
|
"attribute": {
|
|
2673
2760
|
"type": "string",
|
|
2674
2761
|
"minLength": 1,
|
|
2675
|
-
"maxLength": 32,
|
|
2676
2762
|
"default": "xp",
|
|
2677
2763
|
"description": "The attribute the points are written under."
|
|
2678
2764
|
},
|
|
@@ -2685,13 +2771,11 @@
|
|
|
2685
2771
|
"level": {
|
|
2686
2772
|
"type": "string",
|
|
2687
2773
|
"minLength": 1,
|
|
2688
|
-
"maxLength": 32,
|
|
2689
2774
|
"default": "level",
|
|
2690
2775
|
"description": "The attribute the level is written under, when there are `levels`."
|
|
2691
2776
|
},
|
|
2692
2777
|
"levels": {
|
|
2693
2778
|
"type": "array",
|
|
2694
|
-
"maxItems": 16,
|
|
2695
2779
|
"items": {
|
|
2696
2780
|
"type": "integer",
|
|
2697
2781
|
"minimum": 1,
|
|
@@ -2735,7 +2819,6 @@
|
|
|
2735
2819
|
},
|
|
2736
2820
|
"nfts": {
|
|
2737
2821
|
"type": "array",
|
|
2738
|
-
"maxItems": 256,
|
|
2739
2822
|
"items": {
|
|
2740
2823
|
"anyOf": [
|
|
2741
2824
|
{
|
|
@@ -2754,6 +2837,12 @@
|
|
|
2754
2837
|
"collection": {
|
|
2755
2838
|
"$ref": "#/$defs/address",
|
|
2756
2839
|
"description": "Its Core collection, when it is not the stash's."
|
|
2840
|
+
},
|
|
2841
|
+
"weight": {
|
|
2842
|
+
"type": "integer",
|
|
2843
|
+
"minimum": 1,
|
|
2844
|
+
"maximum": 4294967295,
|
|
2845
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2757
2846
|
}
|
|
2758
2847
|
}
|
|
2759
2848
|
},
|
|
@@ -2775,6 +2864,12 @@
|
|
|
2775
2864
|
"ruleSet": {
|
|
2776
2865
|
"$ref": "#/$defs/address",
|
|
2777
2866
|
"description": "A pNFT's rule set, when it has one."
|
|
2867
|
+
},
|
|
2868
|
+
"weight": {
|
|
2869
|
+
"type": "integer",
|
|
2870
|
+
"minimum": 1,
|
|
2871
|
+
"maximum": 4294967295,
|
|
2872
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2778
2873
|
}
|
|
2779
2874
|
}
|
|
2780
2875
|
},
|
|
@@ -2788,6 +2883,12 @@
|
|
|
2788
2883
|
"compressed": {
|
|
2789
2884
|
"$ref": "#/$defs/address",
|
|
2790
2885
|
"description": "A compressed NFT's asset id."
|
|
2886
|
+
},
|
|
2887
|
+
"weight": {
|
|
2888
|
+
"type": "integer",
|
|
2889
|
+
"minimum": 1,
|
|
2890
|
+
"maximum": 4294967295,
|
|
2891
|
+
"description": "Its weight in the stash's draws (1 when left out): an NFT that weighs 10 is drawn ten times as often as one that weighs 1."
|
|
2791
2892
|
}
|
|
2792
2893
|
}
|
|
2793
2894
|
}
|
|
@@ -2807,15 +2908,15 @@
|
|
|
2807
2908
|
"gives"
|
|
2808
2909
|
],
|
|
2809
2910
|
"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).",
|
|
2911
|
+
"description": "A prize, given the same way on every route that gives one (a grant, a lottery's place, a contest's winners, a mission's tier, a recipe's line), in the transaction that wins it; only a roll is settled after, by the oracle. item: one of `item` (a collectible minted to the winner, or with `compressed` a compressed NFT of it; a normal item is the game's backend's to deliver). tokens: `amount`, minted (`from`: \"mint\", in `currency`, a token the game mints) or paid from a pool (\"pool:<key>\", in what it holds). share: `percent` of what `pool` holds then (a jackpot). nft: the NFT `nft`, which the stash `stash` lists (given once: the first winner takes it). roll: a roll of `box` for the winner: chance (a box can give a stash's NFT at random). raffled (a lottery's place only, of a lottery that draws once): one NFT drawn at random from the lottery's own stash (its `nfts`).",
|
|
2811
2912
|
"properties": {
|
|
2812
2913
|
"gives": {
|
|
2813
2914
|
"enum": [
|
|
2814
2915
|
"item",
|
|
2815
2916
|
"tokens",
|
|
2816
|
-
"share",
|
|
2817
2917
|
"nft",
|
|
2818
|
-
"roll"
|
|
2918
|
+
"roll",
|
|
2919
|
+
"raffled"
|
|
2819
2920
|
]
|
|
2820
2921
|
},
|
|
2821
2922
|
"item": {
|
|
@@ -2836,12 +2937,6 @@
|
|
|
2836
2937
|
"type": "string",
|
|
2837
2938
|
"pattern": "^(mint|pool:[a-z][a-z0-9-]{0,31})$"
|
|
2838
2939
|
},
|
|
2839
|
-
"pool": {
|
|
2840
|
-
"$ref": "#/$defs/key"
|
|
2841
|
-
},
|
|
2842
|
-
"percent": {
|
|
2843
|
-
"$ref": "#/$defs/percent"
|
|
2844
|
-
},
|
|
2845
2940
|
"stash": {
|
|
2846
2941
|
"$ref": "#/$defs/key",
|
|
2847
2942
|
"description": "For nft: the stash that lists it."
|
|
@@ -2918,6 +3013,59 @@
|
|
|
2918
3013
|
"$ref": "#/$defs/spend"
|
|
2919
3014
|
}
|
|
2920
3015
|
}
|
|
3016
|
+
},
|
|
3017
|
+
"table": {
|
|
3018
|
+
"type": "object",
|
|
3019
|
+
"additionalProperties": false,
|
|
3020
|
+
"required": [
|
|
3021
|
+
"key",
|
|
3022
|
+
"rows"
|
|
3023
|
+
],
|
|
3024
|
+
"description": "A table (`table.rs`): rows, each a weight and an optional stock, and a label (`\"labels\"`, up to 32 bytes each) or nothing (`\"numbers\"`: a row gives its own number, from 0). Sealed once written: its weights never change and its stock only goes down. A row with a stock leaves the draws once it is used up.",
|
|
3025
|
+
"properties": {
|
|
3026
|
+
"key": {
|
|
3027
|
+
"$ref": "#/$defs/key"
|
|
3028
|
+
},
|
|
3029
|
+
"id": {
|
|
3030
|
+
"type": "integer",
|
|
3031
|
+
"minimum": 1,
|
|
3032
|
+
"maximum": 4294967295
|
|
3033
|
+
},
|
|
3034
|
+
"kind": {
|
|
3035
|
+
"enum": [
|
|
3036
|
+
"labels",
|
|
3037
|
+
"numbers"
|
|
3038
|
+
],
|
|
3039
|
+
"default": "labels"
|
|
3040
|
+
},
|
|
3041
|
+
"rows": {
|
|
3042
|
+
"type": "array",
|
|
3043
|
+
"minItems": 1,
|
|
3044
|
+
"items": {
|
|
3045
|
+
"type": "object",
|
|
3046
|
+
"additionalProperties": false,
|
|
3047
|
+
"required": [
|
|
3048
|
+
"weight"
|
|
3049
|
+
],
|
|
3050
|
+
"properties": {
|
|
3051
|
+
"label": {
|
|
3052
|
+
"type": "string"
|
|
3053
|
+
},
|
|
3054
|
+
"weight": {
|
|
3055
|
+
"type": "integer",
|
|
3056
|
+
"minimum": 1,
|
|
3057
|
+
"maximum": 4294967295
|
|
3058
|
+
},
|
|
3059
|
+
"stock": {
|
|
3060
|
+
"type": "integer",
|
|
3061
|
+
"minimum": 1,
|
|
3062
|
+
"maximum": 4294967294,
|
|
3063
|
+
"description": "How many units may draw it: left out, never runs out."
|
|
3064
|
+
}
|
|
3065
|
+
}
|
|
3066
|
+
}
|
|
3067
|
+
}
|
|
3068
|
+
}
|
|
2921
3069
|
}
|
|
2922
3070
|
}
|
|
2923
3071
|
}
|