@xgamesfun/solana 0.27.2 → 0.28.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/README.md +11 -11
- package/js/approve/page.js +8 -0
- package/js/approve/server.mjs +35 -52
- package/js/approve/wallet-adds.mjs +180 -0
- package/js/chain/pda.js +6 -0
- package/js/client/idl/loot.js +1 -1
- package/js/client/idl/loot.json +2 -2
- package/js/economy/plan.mjs +2 -2
- package/package.json +1 -1
- package/release.json +6 -6
- package/skills/xsolana-economy/SKILL.md +5 -5
- package/types/chain/pda.d.ts +6 -0
- package/types/economy/plan.d.mts +2 -2
package/js/client/idl/loot.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "xgamesVsZBpCVgJuatfYAFJRmQoccfQf5qtUFNp2Eet",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "loot",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.28.0",
|
|
6
6
|
"spec": "0.1.0",
|
|
7
7
|
"description": "Economy for Anything: one program every coin of a project passes through",
|
|
8
8
|
"repository": "https://github.com/gamesfun/loot"
|
package/js/economy/plan.mjs
CHANGED
|
@@ -1892,8 +1892,8 @@ export const SETUP_UNIT_PRICE = 1n;
|
|
|
1892
1892
|
/**
|
|
1893
1893
|
* A setup transaction's instructions as the owner's wallet is handed them: led by a compute unit limit and a compute
|
|
1894
1894
|
* unit price, each once. A wallet that adds its own priority fee (Phantom does) adds it only to a transaction that
|
|
1895
|
-
* sets neither, and the approval page
|
|
1896
|
-
* itself. The limit is all a transaction can have (1,400,000 units): nothing here measures what a step takes, a box's
|
|
1895
|
+
* sets neither, and the approval page takes no price a wallet puts on a transaction that has one, so every setup
|
|
1896
|
+
* transaction sets both itself: its fee is the plan's own, whatever the wallet. The limit is all a transaction can have (1,400,000 units): nothing here measures what a step takes, a box's
|
|
1897
1897
|
* write needs it, and no step may fail for want of compute. A limit or a price the instructions already carry is
|
|
1898
1898
|
* kept.
|
|
1899
1899
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xgamesfun/solana",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.1",
|
|
4
4
|
"mcpName": "io.github.XGamesFun/solana-kit",
|
|
5
5
|
"description": "Loot boxes, gacha, shops, lotteries, auctions, NFT staking, crafting and rewards on Solana without writing a smart contract: one shared program, its JS client, a CLI, and an MCP server and skill so Claude Code, Codex or any AI agent can design, check, simulate and launch an economy.",
|
|
6
6
|
"license": "Apache-2.0",
|
package/release.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"programId": "
|
|
4
|
-
"sbfBytes":
|
|
5
|
-
"sbfSha256": "
|
|
6
|
-
"idlSha256": "
|
|
7
|
-
"clientSha256": "
|
|
2
|
+
"version": "0.28.0",
|
|
3
|
+
"programId": "xgamesVsZBpCVgJuatfYAFJRmQoccfQf5qtUFNp2Eet",
|
|
4
|
+
"sbfBytes": 1794616,
|
|
5
|
+
"sbfSha256": "ac8b09ed2c3a3f7daa2dfab55d2f6dea19fa43e4c98b44a82da2a68a7bc8ebbe",
|
|
6
|
+
"idlSha256": "ef3b8043d62c606e850df75773b4535cdb08206216e17aca653111a77403abd7",
|
|
7
|
+
"clientSha256": "3ef11453089e952e50d9d5a7199d9629b3417a091a071ea6dfd90f42746a2421"
|
|
8
8
|
}
|
|
@@ -10,9 +10,9 @@ writes or deploys a contract: the spec is checked, simulated and priced by the `
|
|
|
10
10
|
signed by a key file on the owner's own machine, once they have read what will be sent and said yes. It runs on
|
|
11
11
|
**devnet** until the program is audited.
|
|
12
12
|
|
|
13
|
-
The tools are the `xsolana_*` MCP tools. Without MCP, the same from a terminal: `npx -y @xgamesfun/solana@0.
|
|
14
|
-
`npx -y @xgamesfun/solana@0.
|
|
15
|
-
or `npx -y @xgamesfun/solana@0.
|
|
13
|
+
The tools are the `xsolana_*` MCP tools. Without MCP, the same from a terminal: `npx -y @xgamesfun/solana@0.28.1 <guide|examples|check|simulate|cost|explain|review|publish|status> [xsolana.json]`,
|
|
14
|
+
`npx -y @xgamesfun/solana@0.28.1 token <mint>` for a coin made elsewhere,
|
|
15
|
+
or `npx -y @xgamesfun/solana@0.28.1 tool <name> '<json>'` for any tool (always with the exact version).
|
|
16
16
|
|
|
17
17
|
## Rules (always)
|
|
18
18
|
|
|
@@ -137,7 +137,7 @@ or `npx -y @xgamesfun/solana@0.27.2 tool <name> '<json>'` for any tool (always w
|
|
|
137
137
|
9. **When they say "put it live"**: `xsolana_publish` lists every step and its cost and gives the commands, which you
|
|
138
138
|
run in the project folder exactly as given (they name the exact version; never drop it):
|
|
139
139
|
- **A new economy gets a key file**, unless the project has one:
|
|
140
|
-
`npx -y @xgamesfun/solana@0.
|
|
140
|
+
`npx -y @xgamesfun/solana@0.28.1 keygen ~/.config/xsolana/<name>.json`. Give the person the address it prints. A
|
|
141
141
|
Solana key file they already have and name themselves (`~/.config/solana/id.json`) works the same; never go
|
|
142
142
|
looking for one.
|
|
143
143
|
- **Say what the key file is** before anything is sent: the project's owner, and, unless the spec says otherwise,
|
|
@@ -152,7 +152,7 @@ or `npx -y @xgamesfun/solana@0.27.2 tool <name> '<json>'` for any tool (always w
|
|
|
152
152
|
(`xsolana_cost`), any seed in a coin that already exists, and every NFT a stash, a raffle or an auction names. A
|
|
153
153
|
collection they already have needs the key's address as its update authority. If they would rather not move
|
|
154
154
|
those, offer the browser wallet.
|
|
155
|
-
- **Show it**: `npx -y @xgamesfun/solana@0.
|
|
155
|
+
- **Show it**: `npx -y @xgamesfun/solana@0.28.1 approve xsolana.json --keypair <key file>` prints every step with
|
|
156
156
|
what it pays and trusts, the warnings, the notice and a code, and sends nothing. Give the person that printout as
|
|
157
157
|
it is, not a summary of it, and ask.
|
|
158
158
|
- **On their yes**, the same command with `--yes <code>`. What lands is written back into `xsolana.json`. If it
|
package/types/chain/pda.d.ts
CHANGED
|
@@ -3,6 +3,12 @@ export declare const TOKEN_PROGRAM = "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5D
|
|
|
3
3
|
export declare const TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
|
|
4
4
|
export declare const ASSOCIATED_TOKEN_PROGRAM = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
|
|
5
5
|
export declare const COMPUTE_BUDGET_PROGRAM = "ComputeBudget111111111111111111111111111111";
|
|
6
|
+
/**
|
|
7
|
+
* Lighthouse: a program of assertions (it reads accounts and fails the transaction when one is not as expected),
|
|
8
|
+
* which a wallet may add to a transaction before signing it (Phantom does). The same address on mainnet and devnet:
|
|
9
|
+
* its source's `declare_id!` and its README, github.com/Jac0xb/lighthouse.
|
|
10
|
+
*/
|
|
11
|
+
export declare const LIGHTHOUSE_PROGRAM = "L2TExMFKdjpN9kozasaurPirfHy9P8sbXoAN1qA3S95";
|
|
6
12
|
export declare const METAPLEX_METADATA_PROGRAM = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s";
|
|
7
13
|
/** Metaplex Core: the program of Core assets and collections. */
|
|
8
14
|
export declare const MPL_CORE_PROGRAM = "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d";
|
package/types/economy/plan.d.mts
CHANGED
|
@@ -1051,8 +1051,8 @@ export declare const SETUP_UNIT_PRICE = 1n;
|
|
|
1051
1051
|
/**
|
|
1052
1052
|
* A setup transaction's instructions as the owner's wallet is handed them: led by a compute unit limit and a compute
|
|
1053
1053
|
* unit price, each once. A wallet that adds its own priority fee (Phantom does) adds it only to a transaction that
|
|
1054
|
-
* sets neither, and the approval page
|
|
1055
|
-
* itself. The limit is all a transaction can have (1,400,000 units): nothing here measures what a step takes, a box's
|
|
1054
|
+
* sets neither, and the approval page takes no price a wallet puts on a transaction that has one, so every setup
|
|
1055
|
+
* transaction sets both itself: its fee is the plan's own, whatever the wallet. The limit is all a transaction can have (1,400,000 units): nothing here measures what a step takes, a box's
|
|
1056
1056
|
* write needs it, and no step may fail for want of compute. A limit or a price the instructions already carry is
|
|
1057
1057
|
* kept.
|
|
1058
1058
|
*/
|