@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.
Files changed (134) hide show
  1. package/DISCLAIMER.md +41 -0
  2. package/LICENSE +202 -0
  3. package/NOTICE +13 -0
  4. package/README.md +172 -2
  5. package/bin/xsolana.mjs +189 -0
  6. package/examples/artwork-auction.json +51 -0
  7. package/examples/blind-forge.json +128 -0
  8. package/examples/coin-flip-arena.json +108 -0
  9. package/examples/duel-arena.json +137 -0
  10. package/examples/elements-set.json +281 -0
  11. package/examples/event-badges.json +67 -0
  12. package/examples/expedition-guild.json +161 -0
  13. package/examples/fair-presale.json +48 -0
  14. package/examples/falling-drop.json +90 -0
  15. package/examples/guild-missions.json +144 -0
  16. package/examples/halving-seasons.json +112 -0
  17. package/examples/hero-trials.json +96 -0
  18. package/examples/ideas.json +789 -0
  19. package/examples/level-ladder.json +65 -0
  20. package/examples/merge-2048.json +128 -0
  21. package/examples/nft-raffle.json +33 -0
  22. package/examples/paper-hands-farm.json +56 -0
  23. package/examples/partner-vault.json +115 -0
  24. package/examples/sacrifice-raffle.json +118 -0
  25. package/examples/scorched-treasury.json +84 -0
  26. package/examples/shelter-fair.json +164 -0
  27. package/examples/spark-pity.json +153 -0
  28. package/examples/stakers-draw.json +125 -0
  29. package/examples/star-fleet.json +157 -0
  30. package/examples/starforce.json +116 -0
  31. package/examples/stud-farm.json +134 -0
  32. package/examples/team-vesting.json +70 -0
  33. package/examples/trade-in-shop.json +168 -0
  34. package/js/approve/details.mjs +262 -0
  35. package/js/approve/ed25519.mjs +36 -0
  36. package/js/approve/live-check.mjs +144 -0
  37. package/js/approve/page.html +86 -0
  38. package/js/approve/page.js +203 -0
  39. package/js/approve/server.mjs +711 -0
  40. package/js/chain/base58.js +73 -0
  41. package/js/chain/borsh.js +261 -0
  42. package/js/chain/bytes.js +141 -0
  43. package/js/chain/core.js +169 -0
  44. package/js/chain/curve.js +52 -0
  45. package/js/chain/lookup.js +273 -0
  46. package/js/chain/mint.js +96 -0
  47. package/js/chain/pda.js +66 -0
  48. package/js/chain/programs.js +102 -0
  49. package/js/chain/rpc.js +217 -0
  50. package/js/chain/sha256.js +68 -0
  51. package/js/chain/token.js +85 -0
  52. package/js/chain/token2022.js +247 -0
  53. package/js/chain/tx.js +224 -0
  54. package/js/client/accounts.js +347 -0
  55. package/js/client/compressed.js +46 -0
  56. package/js/client/grant.js +240 -0
  57. package/js/client/idl/loot.js +2 -0
  58. package/js/client/idl/loot.json +17064 -0
  59. package/js/client/index.js +9 -0
  60. package/js/client/ix.js +2156 -0
  61. package/js/client/pda.js +110 -0
  62. package/js/client/policy.js +48 -0
  63. package/js/client/sizes.js +54 -0
  64. package/js/client/traits.js +44 -0
  65. package/js/connect/connect.mjs +182 -0
  66. package/js/economy/check.mjs +1991 -0
  67. package/js/economy/cost.mjs +170 -0
  68. package/js/economy/examples.mjs +114 -0
  69. package/js/economy/explain.mjs +235 -0
  70. package/js/economy/guide.mjs +231 -0
  71. package/js/economy/legal.mjs +15 -0
  72. package/js/economy/live.mjs +107 -0
  73. package/js/economy/model.mjs +583 -0
  74. package/js/economy/plan.mjs +887 -0
  75. package/js/economy/schema.json +2923 -0
  76. package/js/economy/secrets.mjs +60 -0
  77. package/js/economy/simulate.mjs +952 -0
  78. package/js/economy/txsize.mjs +45 -0
  79. package/js/economy/validate.mjs +85 -0
  80. package/js/index.js +10 -0
  81. package/js/mcp/server.mjs +113 -0
  82. package/js/mcp/tools.mjs +479 -0
  83. package/js/play/index.js +2109 -0
  84. package/js/results/index.js +184 -0
  85. package/js/results/wire.js +90 -0
  86. package/package.json +100 -4
  87. package/release.json +8 -0
  88. package/skills/xsolana-economy/SKILL.md +105 -0
  89. package/skills/xsolana-economy/references/after-launch.md +114 -0
  90. package/skills/xsolana-economy/references/apps.md +157 -0
  91. package/skills/xsolana-economy/references/sentence-to-spec.md +172 -0
  92. package/skills/xsolana-economy/references/telling-the-person.md +93 -0
  93. package/types/chain/base58.d.ts +10 -0
  94. package/types/chain/borsh.d.ts +23 -0
  95. package/types/chain/bytes.d.ts +45 -0
  96. package/types/chain/core.d.ts +50 -0
  97. package/types/chain/curve.d.ts +1 -0
  98. package/types/chain/lookup.d.ts +191 -0
  99. package/types/chain/mint.d.ts +25 -0
  100. package/types/chain/pda.d.ts +25 -0
  101. package/types/chain/programs.d.ts +65 -0
  102. package/types/chain/rpc.d.ts +66 -0
  103. package/types/chain/sha256.d.ts +1 -0
  104. package/types/chain/token.d.ts +141 -0
  105. package/types/chain/token2022.d.ts +53 -0
  106. package/types/chain/tx.d.ts +60 -0
  107. package/types/client/accounts.d.ts +178 -0
  108. package/types/client/compressed.d.ts +29 -0
  109. package/types/client/grant.d.ts +125 -0
  110. package/types/client/idl/loot.d.ts +4467 -0
  111. package/types/client/index.d.ts +8 -0
  112. package/types/client/ix.d.ts +1687 -0
  113. package/types/client/pda.d.ts +91 -0
  114. package/types/client/policy.d.ts +23 -0
  115. package/types/client/sizes.d.ts +13 -0
  116. package/types/client/traits.d.ts +12 -0
  117. package/types/economy/check.d.mts +105 -0
  118. package/types/economy/cost.d.mts +68 -0
  119. package/types/economy/examples.d.mts +27 -0
  120. package/types/economy/explain.d.mts +19 -0
  121. package/types/economy/guide.d.mts +140 -0
  122. package/types/economy/legal.d.mts +12 -0
  123. package/types/economy/live.d.mts +109 -0
  124. package/types/economy/model.d.mts +363 -0
  125. package/types/economy/plan.d.mts +1013 -0
  126. package/types/economy/secrets.d.mts +4 -0
  127. package/types/economy/simulate.d.mts +156 -0
  128. package/types/economy/txsize.d.mts +17 -0
  129. package/types/economy/validate.d.mts +3 -0
  130. package/types/index.d.ts +9 -0
  131. package/types/mcp/tools.d.mts +627 -0
  132. package/types/play/index.d.ts +469 -0
  133. package/types/results/index.d.ts +155 -0
  134. package/types/results/wire.d.ts +122 -0
@@ -0,0 +1,96 @@
1
+ {
2
+ "version": 2,
3
+ "network": "devnet",
4
+ "name": "Hero Trials",
5
+ "prompt": "Heroes can be enchanted for 20 GEM: 70% a level up, 25% a level down, 5% the hero is destroyed, better odds the higher its level. A 1-day expedition can fail: 60% it brings back a relic, 30% the hero comes back hurt (-2 affection), 10% the hero is captured and goes to the treasury. A risky forge: 50 GEM burned for a 70% chance at a level, or the hero breaks. Merging two heroes costs the kept one a level.",
6
+ "currency": "sol",
7
+ "tokens": [
8
+ { "key": "sol", "source": "sol" },
9
+ { "key": "gem", "source": "game", "name": "Gem", "symbol": "GEM", "decimals": 6 }
10
+ ],
11
+ "collection": { "name": "Hero Trials" },
12
+ "items": [
13
+ { "key": "hero", "name": "Hero", "price": 0.05 },
14
+ { "key": "relic", "name": "Relic" }
15
+ ],
16
+ "pools": [
17
+ { "key": "gem-rewards", "currency": "gem", "about": "Names the expedition's token: it pays nothing, its result is a roll." }
18
+ ],
19
+ "boxes": [
20
+ {
21
+ "key": "enchant",
22
+ "name": "Enchant",
23
+ "price": 20,
24
+ "currency": "gem",
25
+ "split": [{ "to": "burn", "percent": 100 }],
26
+ "rollsOn": { "item": "hero" },
27
+ "outcomes": [
28
+ { "gives": "nothing", "chance": 70, "shifts": [{ "attribute": "level", "by": 1, "upTo": 10 }] },
29
+ { "gives": "nothing", "chance": 25, "shifts": [{ "attribute": "level", "by": -1 }] },
30
+ { "gives": "nothing", "chance": 5, "then": "burn" }
31
+ ],
32
+ "odds": [{ "outcome": 0, "when": { "item": "hero", "attribute": "level", "atLeast": 0 }, "add": { "perPointPercent": 10, "upTo": 10 } }]
33
+ },
34
+ {
35
+ "key": "expedition-result",
36
+ "name": "Expedition result",
37
+ "price": 0,
38
+ "active": false,
39
+ "rollsOn": { "item": "hero" },
40
+ "outcomes": [
41
+ { "gives": "item", "item": "relic", "chance": 60 },
42
+ { "gives": "nothing", "chance": 30, "shifts": [{ "attribute": "affection", "by": -2 }] },
43
+ { "gives": "nothing", "chance": 10, "then": "treasury" }
44
+ ],
45
+ "odds": [{ "outcome": 0, "when": { "item": "hero", "attribute": "level", "atLeast": 0 }, "add": { "perPointPercent": 20, "upTo": 10 } }]
46
+ },
47
+ {
48
+ "key": "forge",
49
+ "name": "Forge",
50
+ "price": 0,
51
+ "active": false,
52
+ "rollsOn": { "item": "hero" },
53
+ "outcomes": [
54
+ { "gives": "nothing", "chance": 70, "shifts": [{ "attribute": "level", "by": 1, "upTo": 10 }] },
55
+ { "gives": "nothing", "chance": 30, "then": "burn" }
56
+ ]
57
+ }
58
+ ],
59
+ "recipes": [
60
+ {
61
+ "key": "risky-forge",
62
+ "name": "Risky forge",
63
+ "in": [
64
+ { "takes": "use", "item": "hero" },
65
+ { "takes": "pay", "amount": 50, "currency": "gem", "to": "burn" }
66
+ ],
67
+ "out": [{ "gives": "roll", "box": "forge", "on": 0 }]
68
+ },
69
+ {
70
+ "key": "merge",
71
+ "name": "Merge two heroes",
72
+ "in": [
73
+ { "takes": "use", "item": "hero" },
74
+ { "takes": "burn", "item": "hero" }
75
+ ],
76
+ "raises": [{ "place": 0, "key": "level", "by": -1 }],
77
+ "out": []
78
+ }
79
+ ],
80
+ "farms": [
81
+ {
82
+ "key": "expedition",
83
+ "name": "Expedition",
84
+ "stakes": "collectibles",
85
+ "item": "hero",
86
+ "custody": "freeze",
87
+ "rewards": "gem-rewards",
88
+ "rate": { "perDay": 0, "minted": true },
89
+ "tiers": [{ "lock": "1d", "multiplier": 1, "roll": "expedition-result" }]
90
+ }
91
+ ],
92
+ "scenario": {
93
+ "days": 30,
94
+ "perDay": { "item:hero": 5, "box:enchant": 10, "farm:expedition": 5, "recipe:risky-forge": 2, "recipe:merge": 1 }
95
+ }
96
+ }