@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
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** An Ed25519 key from its 32-byte seed: { address, sign(message) }. */
|
|
2
|
+
export declare function keyFromSeed(seed: any, name?: null): Promise<{
|
|
3
|
+
address: string;
|
|
4
|
+
name: null;
|
|
5
|
+
sign: (message: any) => Promise<Uint8Array<ArrayBuffer>>;
|
|
6
|
+
}>;
|
|
7
|
+
/** The text a wallet signs once a session for its settle keys. It moves nothing and says so. */
|
|
8
|
+
export declare const settleKeysText: (project: any, wallet: any) => string;
|
|
9
|
+
/**
|
|
10
|
+
* The page's storage of keys that can't be made again (`localStorage`), and a device key that encrypts them, kept in
|
|
11
|
+
* IndexedDB as a non-extractable AES-GCM key. Null where either is missing (then keys live in memory only).
|
|
12
|
+
*/
|
|
13
|
+
export declare function browserStore(): {
|
|
14
|
+
get: (k: any) => string | null;
|
|
15
|
+
set: (k: any, v: any) => void;
|
|
16
|
+
remove: (k: any) => void;
|
|
17
|
+
keys: () => (string | null)[];
|
|
18
|
+
cryptoKey: () => any;
|
|
19
|
+
} | null;
|
|
20
|
+
/**
|
|
21
|
+
* The keys of `wallet` ({ address, signMessage? }) in `project`. `store`: `browserStore()`'s shape ({ get, set, remove,
|
|
22
|
+
* keys, cryptoKey }), or null. `key(name)` makes the key named by an address (asking the wallet for its signature the
|
|
23
|
+
* first time in a session); `again(name)` makes it again for a job left unfinished, or finds it stored, or null;
|
|
24
|
+
* `stored()` lists the names of keys stored; `forget(name)` drops a stored key once its job is done and it is empty.
|
|
25
|
+
* `how()` says how keys are made: 'derived', 'stored' or 'memory'.
|
|
26
|
+
*/
|
|
27
|
+
export declare function keyring({ wallet, project, store }: {
|
|
28
|
+
project: any;
|
|
29
|
+
store?: null | undefined;
|
|
30
|
+
wallet: any;
|
|
31
|
+
}): {
|
|
32
|
+
how(): Promise<"derived" | "memory" | "stored">;
|
|
33
|
+
/** The key named `name` (an address) for a new job. */
|
|
34
|
+
key(name: any): Promise<{
|
|
35
|
+
address: string;
|
|
36
|
+
name: null;
|
|
37
|
+
sign: (message: any) => Promise<Uint8Array<ArrayBuffer>>;
|
|
38
|
+
}>;
|
|
39
|
+
/** The key named `name` again, for a job left unfinished: made again from the wallet's signature, or read from
|
|
40
|
+
* storage; null when neither can. `ask`: false to make it only from a signature already given this session. */
|
|
41
|
+
again(name: any, { ask }?: {
|
|
42
|
+
ask?: boolean | undefined;
|
|
43
|
+
}): Promise<{
|
|
44
|
+
address: string;
|
|
45
|
+
name: null;
|
|
46
|
+
sign: (message: any) => Promise<Uint8Array<ArrayBuffer>>;
|
|
47
|
+
} | null>;
|
|
48
|
+
/** The names of the keys this page stored for the wallet (none when keys are made from its signature). */
|
|
49
|
+
stored(): any;
|
|
50
|
+
forget(name: any): void;
|
|
51
|
+
};
|