@xgamesfun/solana 0.25.0 → 0.25.2

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.
Files changed (50) hide show
  1. package/DISCLAIMER.md +1 -1
  2. package/NOTICE +4 -4
  3. package/README.md +81 -31
  4. package/bin/xsolana.mjs +19 -5
  5. package/examples/stakers-draw.json +1 -0
  6. package/js/client/index.js +1 -0
  7. package/js/client/kit.js +36 -0
  8. package/js/client/random.js +1 -1
  9. package/js/economy/check.mjs +11 -0
  10. package/js/economy/cost.mjs +1 -1
  11. package/js/economy/explain.mjs +10 -3
  12. package/js/economy/guide.mjs +1 -1
  13. package/js/economy/live.mjs +2 -1
  14. package/js/economy/review.mjs +760 -0
  15. package/js/economy/schema.json +8 -4
  16. package/js/economy/trust.mjs +15 -0
  17. package/js/index.js +1 -0
  18. package/js/mcp/http.mjs +136 -0
  19. package/js/mcp/server.mjs +34 -10
  20. package/js/mcp/tools.mjs +50 -2
  21. package/js/play/index.js +116 -2
  22. package/js/play/sponsor.js +302 -0
  23. package/js/results/index.js +2 -2
  24. package/package.json +35 -8
  25. package/release.json +1 -1
  26. package/skills/xsolana-economy/SKILL.md +32 -13
  27. package/skills/xsolana-economy/references/after-launch.md +2 -1
  28. package/skills/xsolana-economy/references/apps.md +28 -0
  29. package/skills/xsolana-economy/references/sentence-to-spec.md +1 -0
  30. package/skills/xsolana-economy/references/telling-the-person.md +6 -0
  31. package/skills/xsolana-economy/references/trust-and-cheating.md +126 -0
  32. package/types/client/index.d.ts +1 -0
  33. package/types/client/kit.d.ts +49 -0
  34. package/types/economy/cost.d.mts +1 -1
  35. package/types/economy/explain.d.mts +3 -0
  36. package/types/economy/plan.d.mts +14 -14
  37. package/types/economy/review.d.mts +45 -0
  38. package/types/economy/trust.d.mts +8 -0
  39. package/types/index.d.ts +1 -0
  40. package/types/mcp/http.d.mts +30 -0
  41. package/types/mcp/server.d.mts +321 -0
  42. package/types/mcp/tools.d.mts +71 -1
  43. package/types/play/index.d.ts +3 -1
  44. package/types/play/sponsor.d.ts +149 -0
  45. package/types/results/index.d.ts +1 -1
  46. package/examples/holder-den.json +0 -38
  47. package/examples/holders-drop.json +0 -105
  48. package/examples/match-predictions.json +0 -24
  49. package/examples/pack-league.json +0 -108
  50. package/examples/stride-sneakers.json +0 -164
@@ -1,105 +0,0 @@
1
- {
2
- "version": 2,
3
- "network": "devnet",
4
- "name": "Holders Drop",
5
- "prompt": "Only holders of our collection get in. They buy a holders' crate for 0.02 SOL with a chance at a limited relic, claim a free holder badge once, and enter a raffle for our one-of-one NFT at 0.005 SOL a ticket. The raffle draws in a week, and only if at least 50 tickets sold; the ticket money goes to the treasury.",
6
- "currency": "sol",
7
- "tokens": [
8
- {
9
- "key": "sol",
10
- "source": "sol"
11
- }
12
- ],
13
- "collection": {
14
- "name": "Holders Drop"
15
- },
16
- "items": [
17
- {
18
- "key": "trinket",
19
- "name": "Holder Trinket",
20
- "rarity": "Common"
21
- },
22
- {
23
- "key": "relic",
24
- "name": "Holder Relic",
25
- "rarity": "Epic",
26
- "supply": 50
27
- },
28
- {
29
- "key": "badge",
30
- "name": "Holder Badge",
31
- "soulbound": true
32
- }
33
- ],
34
- "boxes": [
35
- {
36
- "key": "crate",
37
- "name": "Holders' Crate",
38
- "price": 0.02,
39
- "gate": {
40
- "collection": "9gyC3T5ynfwHK2EwKrxvmayntaDXjgcbLTaPwMwdeYuh"
41
- },
42
- "perWalletEach": {
43
- "count": 3,
44
- "every": "1d"
45
- },
46
- "outcomes": [
47
- {
48
- "gives": "item",
49
- "item": "trinket",
50
- "chance": 95
51
- },
52
- {
53
- "gives": "item",
54
- "item": "relic",
55
- "chance": 5
56
- }
57
- ]
58
- }
59
- ],
60
- "grants": [
61
- {
62
- "key": "badge",
63
- "name": "Holder Badge",
64
- "prize": {
65
- "gives": "item",
66
- "item": "badge"
67
- },
68
- "gate": {
69
- "collection": "9gyC3T5ynfwHK2EwKrxvmayntaDXjgcbLTaPwMwdeYuh"
70
- },
71
- "limits": {
72
- "perWallet": 1,
73
- "total": 2000
74
- },
75
- "wallets": 2000,
76
- "fund": 0.2
77
- }
78
- ],
79
- "lotteries": [
80
- {
81
- "key": "raffle",
82
- "name": "One-of-one raffle",
83
- "price": 0.005,
84
- "raffle": {
85
- "nft": "2oguAYJzxA6isSBtu4b8kzNPExdnvCuSwKjnB9dRkdxg",
86
- "collection": "9gyC3T5ynfwHK2EwKrxvmayntaDXjgcbLTaPwMwdeYuh"
87
- },
88
- "minSold": 50,
89
- "firstDraw": "publish+7d",
90
- "gate": {
91
- "collection": "9gyC3T5ynfwHK2EwKrxvmayntaDXjgcbLTaPwMwdeYuh"
92
- },
93
- "perWallet": 20,
94
- "rest": "treasury"
95
- }
96
- ],
97
- "scenario": {
98
- "days": 7,
99
- "perDay": {
100
- "box:crate": 60,
101
- "grant:badge": 100,
102
- "lottery:raffle": 40
103
- }
104
- }
105
- }
@@ -1,24 +0,0 @@
1
- {
2
- "version": 2,
3
- "network": "devnet",
4
- "name": "Match Predictions",
5
- "prompt": "A prediction pool for each match: back home, draw or away with any amount of SOL. Entries close two days after it opens, and the result is due a day later or everyone gets their money back. Winners share the pot by stake, after a 5% rake to the treasury. Our results server signs the result.",
6
- "currency": "sol",
7
- "tokens": [{ "key": "sol", "source": "sol" }],
8
- "collection": false,
9
- "contests": [
10
- {
11
- "key": "match",
12
- "name": "Match pool",
13
- "sides": 3,
14
- "sideNames": ["Home", "Draw", "Away"],
15
- "entriesClose": "2d",
16
- "resultDue": "3d",
17
- "every": "1d",
18
- "split": [{ "to": "treasury", "percent": 5 }],
19
- "decidedBy": "the results server, from the match's final score",
20
- "deciders": ["GnUcZZf8bwSCj8CFkdVPeeu81ptCV4RxQvExdKjvStyd"]
21
- }
22
- ],
23
- "scenario": { "days": 30, "perDay": { "contest:match": 150 } }
24
- }
@@ -1,108 +0,0 @@
1
- {
2
- "version": 2,
3
- "network": "devnet",
4
- "name": "Pack League",
5
- "prompt": "A trading card game. A pack is 0.05 SOL for five cards, and the fifth card is always rare or better. A fifth of every pack goes into the weekly league pot. Card holders buy league tickets for 0.001 SOL, and each week the top three share the pot.",
6
- "currency": "sol",
7
- "tokens": [
8
- {
9
- "key": "sol",
10
- "source": "sol"
11
- }
12
- ],
13
- "collection": {
14
- "name": "Pack League"
15
- },
16
- "items": [
17
- {
18
- "key": "common",
19
- "name": "Common Card",
20
- "rarity": "Common"
21
- },
22
- {
23
- "key": "rare",
24
- "name": "Rare Card",
25
- "rarity": "Rare"
26
- },
27
- {
28
- "key": "epic",
29
- "name": "Epic Card",
30
- "rarity": "Epic",
31
- "supply": 3000
32
- },
33
- {
34
- "key": "legendary",
35
- "name": "Legendary Card",
36
- "rarity": "Legendary",
37
- "supply": 300
38
- }
39
- ],
40
- "boxes": [
41
- {
42
- "key": "pack",
43
- "name": "Card Pack",
44
- "price": 0.05,
45
- "split": [
46
- {
47
- "to": "lottery:league",
48
- "percent": 20
49
- }
50
- ],
51
- "outcomes": [
52
- {
53
- "gives": "item",
54
- "item": "common",
55
- "chance": 75
56
- },
57
- {
58
- "gives": "item",
59
- "item": "rare",
60
- "chance": 19
61
- },
62
- {
63
- "gives": "item",
64
- "item": "epic",
65
- "chance": 5
66
- },
67
- {
68
- "gives": "item",
69
- "item": "legendary",
70
- "chance": 1
71
- }
72
- ],
73
- "slots": [
74
- {
75
- "count": 4,
76
- "share": 70
77
- },
78
- {
79
- "count": 1,
80
- "from": [1, 2, 3],
81
- "share": 30
82
- }
83
- ]
84
- }
85
- ],
86
- "lotteries": [
87
- {
88
- "key": "league",
89
- "name": "Weekly League",
90
- "price": 0.001,
91
- "places": [50, 30, 20],
92
- "every": "7d",
93
- "firstDraw": "publish+7d",
94
- "gate": {
95
- "item": "common"
96
- },
97
- "perWallet": 100,
98
- "pot": 0
99
- }
100
- ],
101
- "scenario": {
102
- "days": 28,
103
- "perDay": {
104
- "box:pack": 100,
105
- "lottery:league": 200
106
- }
107
- }
108
- }
@@ -1,164 +0,0 @@
1
- {
2
- "version": 2,
3
- "network": "devnet",
4
- "name": "Stride Sneakers",
5
- "prompt": "A move-to-earn game. Players buy a shoebox for 0.1 SOL and get a sneaker with random efficiency and luck, or a rare golden one. Walking earns STRIDE: the app's server vouches for a day's steps, once a day per wallet. Two sneakers and 200 STRIDE mint a new shoebox, at most 7 times per sneaker. 50 STRIDE levels a sneaker up, to level 30. Sneakers can be rented out from the app.",
6
- "currency": "sol",
7
- "tokens": [
8
- {
9
- "key": "sol",
10
- "source": "sol"
11
- },
12
- {
13
- "key": "stride",
14
- "source": "project",
15
- "name": "Stride",
16
- "symbol": "STRIDE",
17
- "decimals": 6
18
- }
19
- ],
20
- "collection": {
21
- "name": "Stride Sneakers"
22
- },
23
- "items": [
24
- {
25
- "key": "sneaker",
26
- "name": "Sneaker",
27
- "drawn": [
28
- {
29
- "attribute": "efficiency",
30
- "min": 1,
31
- "max": 10
32
- },
33
- {
34
- "attribute": "luck",
35
- "min": 1,
36
- "max": 10
37
- }
38
- ]
39
- },
40
- {
41
- "key": "golden",
42
- "name": "Golden Sneaker",
43
- "rarity": "Legendary",
44
- "supply": 100
45
- }
46
- ],
47
- "boxes": [
48
- {
49
- "key": "shoebox",
50
- "name": "Shoebox",
51
- "price": 0.1,
52
- "outcomes": [
53
- {
54
- "gives": "item",
55
- "item": "sneaker",
56
- "chance": 98
57
- },
58
- {
59
- "gives": "item",
60
- "item": "golden",
61
- "chance": 2
62
- }
63
- ]
64
- }
65
- ],
66
- "recipes": [
67
- {
68
- "key": "mint",
69
- "name": "Mint a shoebox",
70
- "in": [
71
- {
72
- "takes": "use",
73
- "item": "sneaker"
74
- },
75
- {
76
- "takes": "use",
77
- "item": "sneaker"
78
- },
79
- {
80
- "takes": "pay",
81
- "amount": 200,
82
- "currency": "stride",
83
- "to": "burn"
84
- }
85
- ],
86
- "raises": [
87
- {
88
- "place": 0,
89
- "key": "mints",
90
- "by": 1,
91
- "upTo": 7
92
- },
93
- {
94
- "place": 1,
95
- "key": "mints",
96
- "by": 1,
97
- "upTo": 7
98
- }
99
- ],
100
- "out": [
101
- {
102
- "gives": "roll",
103
- "box": "shoebox"
104
- }
105
- ]
106
- },
107
- {
108
- "key": "level-up",
109
- "name": "Level up",
110
- "in": [
111
- {
112
- "takes": "use",
113
- "item": "sneaker"
114
- },
115
- {
116
- "takes": "pay",
117
- "amount": 50,
118
- "currency": "stride",
119
- "to": "burn"
120
- }
121
- ],
122
- "raises": [
123
- {
124
- "place": 0,
125
- "key": "level",
126
- "by": 1,
127
- "upTo": 30
128
- }
129
- ]
130
- }
131
- ],
132
- "grants": [
133
- {
134
- "key": "steps",
135
- "name": "Daily steps",
136
- "prize": {
137
- "gives": "tokens",
138
- "amount": 20,
139
- "currency": "stride",
140
- "from": "mint"
141
- },
142
- "vouchers": ["B8CrCHTMi223kknNgaJXXp8QGqNR9pwD1bfZVYvr5fmJ"],
143
- "limits": {
144
- "perWalletEach": {
145
- "count": 1,
146
- "every": "1d"
147
- },
148
- "perDay": 1000
149
- },
150
- "wallets": 1000,
151
- "rounds": 365,
152
- "fund": 0.5
153
- }
154
- ],
155
- "scenario": {
156
- "days": 30,
157
- "perDay": {
158
- "box:shoebox": 20,
159
- "grant:steps": 300,
160
- "recipe:mint": 15,
161
- "recipe:level-up": 60
162
- }
163
- }
164
- }