@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.
- package/DISCLAIMER.md +41 -0
- package/LICENSE +202 -0
- package/NOTICE +13 -0
- package/README.md +172 -2
- package/bin/xsolana.mjs +189 -0
- package/examples/artwork-auction.json +51 -0
- package/examples/blind-forge.json +128 -0
- package/examples/coin-flip-arena.json +108 -0
- package/examples/duel-arena.json +137 -0
- package/examples/elements-set.json +281 -0
- package/examples/event-badges.json +67 -0
- package/examples/expedition-guild.json +161 -0
- package/examples/fair-presale.json +48 -0
- package/examples/falling-drop.json +90 -0
- package/examples/guild-missions.json +144 -0
- package/examples/halving-seasons.json +112 -0
- package/examples/hero-trials.json +96 -0
- package/examples/ideas.json +789 -0
- package/examples/level-ladder.json +65 -0
- package/examples/merge-2048.json +128 -0
- package/examples/nft-raffle.json +33 -0
- package/examples/paper-hands-farm.json +56 -0
- package/examples/partner-vault.json +115 -0
- package/examples/sacrifice-raffle.json +118 -0
- package/examples/scorched-treasury.json +84 -0
- package/examples/shelter-fair.json +164 -0
- package/examples/spark-pity.json +153 -0
- package/examples/stakers-draw.json +125 -0
- package/examples/star-fleet.json +157 -0
- package/examples/starforce.json +116 -0
- package/examples/stud-farm.json +134 -0
- package/examples/team-vesting.json +70 -0
- package/examples/trade-in-shop.json +168 -0
- package/js/approve/details.mjs +262 -0
- package/js/approve/ed25519.mjs +36 -0
- package/js/approve/live-check.mjs +144 -0
- package/js/approve/page.html +86 -0
- package/js/approve/page.js +203 -0
- package/js/approve/server.mjs +711 -0
- package/js/chain/base58.js +73 -0
- package/js/chain/borsh.js +261 -0
- package/js/chain/bytes.js +141 -0
- package/js/chain/core.js +169 -0
- package/js/chain/curve.js +52 -0
- package/js/chain/lookup.js +273 -0
- package/js/chain/mint.js +96 -0
- package/js/chain/pda.js +66 -0
- package/js/chain/programs.js +102 -0
- package/js/chain/rpc.js +217 -0
- package/js/chain/sha256.js +68 -0
- package/js/chain/token.js +85 -0
- package/js/chain/token2022.js +247 -0
- package/js/chain/tx.js +224 -0
- package/js/client/accounts.js +347 -0
- package/js/client/compressed.js +46 -0
- package/js/client/grant.js +240 -0
- package/js/client/idl/loot.js +2 -0
- package/js/client/idl/loot.json +17064 -0
- package/js/client/index.js +9 -0
- package/js/client/ix.js +2156 -0
- package/js/client/pda.js +110 -0
- package/js/client/policy.js +48 -0
- package/js/client/sizes.js +54 -0
- package/js/client/traits.js +44 -0
- package/js/connect/connect.mjs +182 -0
- package/js/economy/check.mjs +1991 -0
- package/js/economy/cost.mjs +170 -0
- package/js/economy/examples.mjs +114 -0
- package/js/economy/explain.mjs +235 -0
- package/js/economy/guide.mjs +231 -0
- package/js/economy/legal.mjs +15 -0
- package/js/economy/live.mjs +107 -0
- package/js/economy/model.mjs +583 -0
- package/js/economy/plan.mjs +887 -0
- package/js/economy/schema.json +2923 -0
- package/js/economy/secrets.mjs +60 -0
- package/js/economy/simulate.mjs +952 -0
- package/js/economy/txsize.mjs +45 -0
- package/js/economy/validate.mjs +85 -0
- package/js/index.js +10 -0
- package/js/mcp/server.mjs +113 -0
- package/js/mcp/tools.mjs +479 -0
- package/js/play/index.js +2109 -0
- package/js/results/index.js +184 -0
- package/js/results/wire.js +90 -0
- package/package.json +100 -4
- package/release.json +8 -0
- package/skills/xsolana-economy/SKILL.md +105 -0
- package/skills/xsolana-economy/references/after-launch.md +114 -0
- package/skills/xsolana-economy/references/apps.md +157 -0
- package/skills/xsolana-economy/references/sentence-to-spec.md +172 -0
- package/skills/xsolana-economy/references/telling-the-person.md +93 -0
- package/types/chain/base58.d.ts +10 -0
- package/types/chain/borsh.d.ts +23 -0
- package/types/chain/bytes.d.ts +45 -0
- package/types/chain/core.d.ts +50 -0
- package/types/chain/curve.d.ts +1 -0
- package/types/chain/lookup.d.ts +191 -0
- package/types/chain/mint.d.ts +25 -0
- package/types/chain/pda.d.ts +25 -0
- package/types/chain/programs.d.ts +65 -0
- package/types/chain/rpc.d.ts +66 -0
- package/types/chain/sha256.d.ts +1 -0
- package/types/chain/token.d.ts +141 -0
- package/types/chain/token2022.d.ts +53 -0
- package/types/chain/tx.d.ts +60 -0
- package/types/client/accounts.d.ts +178 -0
- package/types/client/compressed.d.ts +29 -0
- package/types/client/grant.d.ts +125 -0
- package/types/client/idl/loot.d.ts +4467 -0
- package/types/client/index.d.ts +8 -0
- package/types/client/ix.d.ts +1687 -0
- package/types/client/pda.d.ts +91 -0
- package/types/client/policy.d.ts +23 -0
- package/types/client/sizes.d.ts +13 -0
- package/types/client/traits.d.ts +12 -0
- package/types/economy/check.d.mts +105 -0
- package/types/economy/cost.d.mts +68 -0
- package/types/economy/examples.d.mts +27 -0
- package/types/economy/explain.d.mts +19 -0
- package/types/economy/guide.d.mts +140 -0
- package/types/economy/legal.d.mts +12 -0
- package/types/economy/live.d.mts +109 -0
- package/types/economy/model.d.mts +363 -0
- package/types/economy/plan.d.mts +1013 -0
- package/types/economy/secrets.d.mts +4 -0
- package/types/economy/simulate.d.mts +156 -0
- package/types/economy/txsize.d.mts +17 -0
- package/types/economy/validate.d.mts +3 -0
- package/types/index.d.ts +9 -0
- package/types/mcp/tools.d.mts +627 -0
- package/types/play/index.d.ts +469 -0
- package/types/results/index.d.ts +155 -0
- package/types/results/wire.d.ts +122 -0
|
@@ -0,0 +1,363 @@
|
|
|
1
|
+
/** The two flat fees, in lamports, as the platform sets them by default; the program caps each at 0.01 SOL. */
|
|
2
|
+
export declare const FEES: Readonly<{
|
|
3
|
+
player: 2000000n;
|
|
4
|
+
project: 10000n;
|
|
5
|
+
}>;
|
|
6
|
+
/**
|
|
7
|
+
* What MagicBlock's VRF oracle queue (Cuj97ggr…, ephemeral-vrf-sdk 0.17.2 consts.rs DEFAULT_QUEUE) takes for each
|
|
8
|
+
* random number asked of it: VRF_LAMPORTS_COST = 500,000 lamports, 0.0005 SOL (magicblock-labs/ephemeral-vrf,
|
|
9
|
+
* api/src/consts.rs; the high-priority queue's 800,000 is not the one loot uses). Paid by whoever asks: the player
|
|
10
|
+
* on `open_box` (order.rs), whoever sends `draw_lottery` (lottery.rs, its `payer`), the authority on `roll`
|
|
11
|
+
* (roll.rs). Measured on devnet: 500,000 lamports per open.
|
|
12
|
+
*/
|
|
13
|
+
export declare const ORACLE_FEE = 500000n;
|
|
14
|
+
/**
|
|
15
|
+
* Put in the order itself on every purchase, with the player fee on top of it (order.rs: ESCROW_LAMPORTS + fee); what
|
|
16
|
+
* a collectible's rent doesn't use goes back at settle, and a refund returns all of it (constants.rs).
|
|
17
|
+
*/
|
|
18
|
+
export declare const ESCROW_LAMPORTS = 6000000n;
|
|
19
|
+
/** Rent: (bytes + 128) × 5,080 lamports, as `solana rent` reads it on devnet and mainnet-beta. */
|
|
20
|
+
export declare const RENT_PER_BYTE = 5080n;
|
|
21
|
+
export declare const ACCOUNT_OVERHEAD = 128n;
|
|
22
|
+
/**
|
|
23
|
+
* The most rent a byte has cost on any Solana cluster: 3,480 lamports a byte-year for two years, the rate before
|
|
24
|
+
* devnet and mainnet lowered it (a local validator and LiteSVM still charge it). An RPC that asks more is not believed.
|
|
25
|
+
*/
|
|
26
|
+
export declare const MOST_RENT_PER_BYTE = 6960n;
|
|
27
|
+
export declare const rent: (bytes: any) => bigint;
|
|
28
|
+
/**
|
|
29
|
+
* A collectible's Core account, paid from the SOL its order holds (or by whoever gives it): its rent (a Core asset of
|
|
30
|
+
* about 190 bytes) plus Metaplex Core's creation fee of 0.0015 SOL, which the account keeps. The full simulation
|
|
31
|
+
* measures 0.00309 to 0.00313 SOL across its fixtures.
|
|
32
|
+
*/
|
|
33
|
+
export declare const COLLECTIBLE_RENT = 3100000n;
|
|
34
|
+
/** The network's base fee per signature. Priority fees are extra and up to the wallet. */
|
|
35
|
+
export declare const SIGNATURE_FEE = 5000n;
|
|
36
|
+
export declare const LAMPORTS_PER_SOL = 1000000000n;
|
|
37
|
+
export declare const WSOL = "So11111111111111111111111111111111111111112";
|
|
38
|
+
/** The program's limits. */
|
|
39
|
+
export declare const LIMITS: Readonly<{
|
|
40
|
+
shares: 4;
|
|
41
|
+
entries: 8;
|
|
42
|
+
callbackAccounts: 21;
|
|
43
|
+
lines: 8;
|
|
44
|
+
collectiblesPerCraft: 8;
|
|
45
|
+
places: 8;
|
|
46
|
+
tiers: 4;
|
|
47
|
+
boosts: 4;
|
|
48
|
+
growths: 4;
|
|
49
|
+
gates: 4;
|
|
50
|
+
odds: 4;
|
|
51
|
+
vouchers: 3;
|
|
52
|
+
deciders: 3;
|
|
53
|
+
gateWallets: 16;
|
|
54
|
+
nameBytes: 32;
|
|
55
|
+
uriBytes: 200;
|
|
56
|
+
keyBytes: 32;
|
|
57
|
+
maxBoostBps: 1000000;
|
|
58
|
+
maxTierBps: 110000;
|
|
59
|
+
}>;
|
|
60
|
+
/** Attribute names the program writes itself, which a recipe cannot copy and `Set` cannot change (craft.rs, make.rs). */
|
|
61
|
+
export declare const RESERVED_ATTRIBUTES: readonly string[];
|
|
62
|
+
export declare const RARITIES: readonly string[];
|
|
63
|
+
/** A refusal raised while reading a value; the checker turns it into a refusal with a code. */
|
|
64
|
+
export declare class SpecError extends Error {
|
|
65
|
+
code: any;
|
|
66
|
+
fix: any;
|
|
67
|
+
constructor(code: any, message: any, fix: any);
|
|
68
|
+
}
|
|
69
|
+
/** A plain decimal string for an amount written as a number or text (no exponent). */
|
|
70
|
+
export declare function decimalText(amount: any): string;
|
|
71
|
+
/** "0.1" of a currency with 9 decimals → 100000000n. Refuses more decimals than the currency has. */
|
|
72
|
+
export declare function toUnits(amount: any, decimals: any): bigint;
|
|
73
|
+
/** 100000000n with 9 decimals → "0.1". */
|
|
74
|
+
export declare function fromUnits(units: any, decimals: any): string;
|
|
75
|
+
/** A count written as an amount (a contest of NFTs counts NFTs): 2 or "2" → 2n. Null when it is not a whole number. */
|
|
76
|
+
export declare function wholeCount(value: any): bigint | null;
|
|
77
|
+
/** 2.5 (percent) → 250 basis points. Null when it is not a whole number of hundredths. */
|
|
78
|
+
export declare function toBps(percent: any): number | null;
|
|
79
|
+
/** "7d" → 604800. A number is seconds already. */
|
|
80
|
+
export declare function toSeconds(duration: any): number;
|
|
81
|
+
/**
|
|
82
|
+
* How long what lands in a farm's rewards pool takes to be released to its seats, in seconds (a farm that shares its
|
|
83
|
+
* pool, `farm.rs` `release_span`): its longest lock tier, and a day at least.
|
|
84
|
+
*/
|
|
85
|
+
export declare const releaseSeconds: (f: any) => number;
|
|
86
|
+
/** A farm's release span in words: "a day", "30 days", "36 hours". */
|
|
87
|
+
export declare function releaseWords(f: any): string;
|
|
88
|
+
/**
|
|
89
|
+
* What the end of a sharing farm that `runs` means, in words, or null (no end, or a fixed rate): its release keeps its
|
|
90
|
+
* pace, so what it has not let go by the end stays in the pool, the project's, and so does what a seat gives back after
|
|
91
|
+
* the end; a seat that may be dead (a watched NFT sold, an upkeep run out) is refreshed a release span before it.
|
|
92
|
+
*/
|
|
93
|
+
export declare function farmEndWords(f: any): string | null;
|
|
94
|
+
/** A raise's or a shift's `by`: a number, or for a time a duration, which may be negative ("-1d"). */
|
|
95
|
+
export declare function toBy(by: any): any;
|
|
96
|
+
/** "publish", "publish+7d" or a date → Unix seconds, counted from `now` (Unix seconds) for the first two. */
|
|
97
|
+
export declare function toTime(time: any, now: any): any;
|
|
98
|
+
export declare const rarityNumber: (rarity: any) => number;
|
|
99
|
+
export declare const utf8Bytes: (s: any) => number;
|
|
100
|
+
export declare const isAddress: (s: any) => boolean;
|
|
101
|
+
/** Where an NFT paid goes, in the program's words (`Spend`, `Then`): "burn", "treasury" (its wallet, filled in at go-live), { giveTo }, or { stash }. */
|
|
102
|
+
export declare const spendOf: (then: any, m: any) => "Burn" | {
|
|
103
|
+
Stash: any[];
|
|
104
|
+
Give?: undefined;
|
|
105
|
+
} | {
|
|
106
|
+
Stash?: undefined;
|
|
107
|
+
Give: any[];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* The spec with references resolved and ids given. Unknown references stay as they are (the checker reports
|
|
111
|
+
* them); call `check` first when it matters.
|
|
112
|
+
*/
|
|
113
|
+
export declare function model(economy: any, { now }?: {
|
|
114
|
+
now?: number | undefined;
|
|
115
|
+
}): {
|
|
116
|
+
now: number;
|
|
117
|
+
name: any;
|
|
118
|
+
authority: any;
|
|
119
|
+
/** The wallet whose account for the currency is the treasury, when it isn't the owner's ("wallet:<address>"). */
|
|
120
|
+
treasuryWallet: any;
|
|
121
|
+
tokens: Map<any, any>;
|
|
122
|
+
currencyKey: any;
|
|
123
|
+
currency: any;
|
|
124
|
+
/** The collection the setup makes (null when the spec says `"collection": false`: a project of tokens only). */
|
|
125
|
+
collection: any;
|
|
126
|
+
/** Core collections the owner already has that the project also takes (its update authority is the owner). */
|
|
127
|
+
collections: any;
|
|
128
|
+
/** How many compressed NFTs the project's tree holds (`compressedTree`), when a prize gives one. */
|
|
129
|
+
treeHolds: any;
|
|
130
|
+
/** The project's number among its owner's: its address is ["project", owner, number]. */
|
|
131
|
+
projectNumber: any;
|
|
132
|
+
items: any;
|
|
133
|
+
pools: any[];
|
|
134
|
+
stashes: any;
|
|
135
|
+
boxes: never[];
|
|
136
|
+
payments: any;
|
|
137
|
+
recipes: any;
|
|
138
|
+
schedules: any;
|
|
139
|
+
lotteries: any;
|
|
140
|
+
farms: any;
|
|
141
|
+
contests: any;
|
|
142
|
+
auctions: any;
|
|
143
|
+
holds: any;
|
|
144
|
+
grants: any;
|
|
145
|
+
traits: any;
|
|
146
|
+
decisions: any;
|
|
147
|
+
scenario: any;
|
|
148
|
+
live: any;
|
|
149
|
+
};
|
|
150
|
+
/**
|
|
151
|
+
* The NFTs a stash lists, each as the program's `piece` takes it: a Core asset (`asset`, its `collection`: its own, the
|
|
152
|
+
* stash's, or the game's when neither says), a Token Metadata NFT (`mint`, `programmable`, `ruleSet`), or a compressed
|
|
153
|
+
* NFT (`compressed`, its asset id).
|
|
154
|
+
*/
|
|
155
|
+
export declare function stashNfts(s: any): any;
|
|
156
|
+
/**
|
|
157
|
+
* A prize as the spec writes it (`$defs/prize`), read the one way: a line { gives, … } as a recipe's `out` lines are:
|
|
158
|
+
* "item" (`item`), "tokens" (`amount`, `from` "mint" with `currency`, or "pool:<key>"), "share" (`percent` of `pool`),
|
|
159
|
+
* "nft" (`nft`, an address the stash `stash` lists) or "roll" (a roll of `box`; in a recipe, on the collectible kept
|
|
160
|
+
* at `on`). A grant's older `gives` ({ item }, { pool, amount }, { roll }) reads as its line. Null for none.
|
|
161
|
+
*/
|
|
162
|
+
export declare function prizeLine(p: any): any;
|
|
163
|
+
/** The pool a prize line pays from: a share's, or tokens' "pool:<key>". */
|
|
164
|
+
export declare const prizePool: (p: any) => any;
|
|
165
|
+
/** The token a prize line pays in: its pool's, or the one it mints. */
|
|
166
|
+
export declare const prizeToken: (p: any, m: any) => any;
|
|
167
|
+
/**
|
|
168
|
+
* Every prize the spec gives (prize.rs): a grant's, a lottery place's, a contest's winners', a mission tier's and a
|
|
169
|
+
* recipe's `out` lines. [{ prize (a line), where, by, route, strict, once }] `strict`: the route refuses a prize it
|
|
170
|
+
* can't give (a grant's claim, a craft); any other goes on without it. `once`: the route gives it once at most (a
|
|
171
|
+
* grant of one claim in all).
|
|
172
|
+
*/
|
|
173
|
+
export declare function prizes(m: any): any[];
|
|
174
|
+
/**
|
|
175
|
+
* The project's tree of compressed NFTs (`open_tree`), when a prize gives one (`"compressed": true`), else null: deep
|
|
176
|
+
* enough for `treeHolds` (14 to 20 levels, Bubblegum's sizes for a buffer of 64), its canopy keeping a proof at 10
|
|
177
|
+
* nodes or a few more (at most 8 levels: past that the rent grows faster than the proofs shrink). { depth, buffer,
|
|
178
|
+
* canopy, bytes }
|
|
179
|
+
*/
|
|
180
|
+
export declare function compressedTree(m: any): {
|
|
181
|
+
depth: number;
|
|
182
|
+
buffer: number;
|
|
183
|
+
canopy: number;
|
|
184
|
+
bytes: number;
|
|
185
|
+
} | null;
|
|
186
|
+
/**
|
|
187
|
+
* Every route that gives a roll of a box, with the box it names: a prize's roll (`prizes`), an auction's lot, a
|
|
188
|
+
* mission's roll on the NFT leaving it and a recipe's roll on a collectible it keeps. [{ box, by, route }]
|
|
189
|
+
*/
|
|
190
|
+
export declare function prizeRolls(m: any): {
|
|
191
|
+
box: any;
|
|
192
|
+
by: any;
|
|
193
|
+
route: any;
|
|
194
|
+
}[];
|
|
195
|
+
/**
|
|
196
|
+
* Every roll of a box any route makes, for the checks keyed on "a box something rolls": `prizeRolls`, every box
|
|
197
|
+
* outcome's (or bundle part's) roll of another box (route "box", made at its settle), and, followed through chains,
|
|
198
|
+
* each route that rolls a box whose outcome rolls another (a grant's roll of “mid”, whose outcome rolls “inner”, is a
|
|
199
|
+
* roll of “inner” by the grant, `through` ["mid"]). [{ box, by, route, through? }]
|
|
200
|
+
*/
|
|
201
|
+
export declare function rollsOf(m: any): {
|
|
202
|
+
box: any;
|
|
203
|
+
by: any;
|
|
204
|
+
route: any;
|
|
205
|
+
}[];
|
|
206
|
+
/** A prize line in words: "one Badge", "100 GOLD from “rewards”", "100 GOLD, minted", "10% of “jackpot”", "the NFT ab12…cd34 of “vault”", "a roll of “Chest”". */
|
|
207
|
+
export declare function prizeWords(p: any, m: any): string;
|
|
208
|
+
/**
|
|
209
|
+
* What one box outcome gives (catalog.rs, at most three prizes an entry), each in the box's own words: "item",
|
|
210
|
+
* "pay" (a fixed amount from a pool), "share" (a percent of a pool), "stash" (an NFT of a stash at random), "mint"
|
|
211
|
+
* (tokens minted), "nft" (one NFT a stash lists) or "roll" (a roll of another box). A bundle gives its `prizes`; "burn"
|
|
212
|
+
* and "nothing" give none.
|
|
213
|
+
*/
|
|
214
|
+
export declare function outcomeParts(o: any): any;
|
|
215
|
+
/** Whether an outcome burns the payment in place of the box's split: "burn", or a bundle that says `burns`. */
|
|
216
|
+
export declare const outcomeBurns: (o: any) => boolean;
|
|
217
|
+
/** Whether a box leaves its outcome to the oracle (catalog.rs `rolls`): more than one outcome, or an NFT at random. */
|
|
218
|
+
export declare const boxRolls: (b: any) => any;
|
|
219
|
+
/** Whether a box sells with `buy`, in one transaction (buy.rs): it doesn't roll, and rolls on no NFT. */
|
|
220
|
+
export declare const boxBuys: (b: any) => boolean;
|
|
221
|
+
/** A lottery's place as { percent, prize }: a number is a share of the pot and no prize. */
|
|
222
|
+
export declare const placeOf: (p: any) => {
|
|
223
|
+
percent: any;
|
|
224
|
+
prize: any;
|
|
225
|
+
};
|
|
226
|
+
/** "pool:house" → { kind: 'pool', key: 'house' }; "burn" → { kind: 'burn' }. */
|
|
227
|
+
export declare function destination(to: any): {
|
|
228
|
+
kind: string;
|
|
229
|
+
key?: undefined;
|
|
230
|
+
} | {
|
|
231
|
+
kind: string;
|
|
232
|
+
key: string;
|
|
233
|
+
};
|
|
234
|
+
/** The share with its basis points, or null bps when the percent is not whole hundredths. */
|
|
235
|
+
export declare const sharesOf: (split: any) => any;
|
|
236
|
+
/**
|
|
237
|
+
* The program's `To` for a destination, with pool indexes resolved (the IDL's own shape). A wallet ("wallet:<address>")
|
|
238
|
+
* is paid at its own token account of the part's currency (the program opens it when it is not there); "treasury" is the game's treasury wallet's; "chosen"
|
|
239
|
+
* (or "chosen:<item>") is the one the buyer names when they buy; "lottery:<key>" is that lottery's pot
|
|
240
|
+
* ("@pot:<id>", which the plan resolves once the game is known).
|
|
241
|
+
*/
|
|
242
|
+
export declare function toEnum(to: any, m: any): "Burn" | "Treasury" | {
|
|
243
|
+
Pool: any[];
|
|
244
|
+
Account?: undefined;
|
|
245
|
+
Wallet?: undefined;
|
|
246
|
+
Chosen?: undefined;
|
|
247
|
+
Holder?: undefined;
|
|
248
|
+
} | {
|
|
249
|
+
Pool?: undefined;
|
|
250
|
+
Account: (string | undefined)[];
|
|
251
|
+
Wallet?: undefined;
|
|
252
|
+
Chosen?: undefined;
|
|
253
|
+
Holder?: undefined;
|
|
254
|
+
} | {
|
|
255
|
+
Pool?: undefined;
|
|
256
|
+
Account?: undefined;
|
|
257
|
+
Wallet: (string | undefined)[];
|
|
258
|
+
Chosen?: undefined;
|
|
259
|
+
Holder?: undefined;
|
|
260
|
+
} | {
|
|
261
|
+
Pool?: undefined;
|
|
262
|
+
Account?: undefined;
|
|
263
|
+
Wallet?: undefined;
|
|
264
|
+
Chosen: {
|
|
265
|
+
item: any;
|
|
266
|
+
};
|
|
267
|
+
Holder?: undefined;
|
|
268
|
+
} | {
|
|
269
|
+
Pool?: undefined;
|
|
270
|
+
Account?: undefined;
|
|
271
|
+
Wallet?: undefined;
|
|
272
|
+
Chosen?: undefined;
|
|
273
|
+
Holder: (string | undefined)[];
|
|
274
|
+
};
|
|
275
|
+
/**
|
|
276
|
+
* The program's `Rule` for a spec rule: which NFTs (a collection's, or an item's the game mints), an attribute and its
|
|
277
|
+
* test. With neither, the collection the game has authority over: `@collection`, filled in when the economy goes live.
|
|
278
|
+
*/
|
|
279
|
+
export declare function ruleOf(rule: any, m: any): {
|
|
280
|
+
of: {
|
|
281
|
+
Item: any[];
|
|
282
|
+
Collection?: undefined;
|
|
283
|
+
} | {
|
|
284
|
+
Item?: undefined;
|
|
285
|
+
Collection: any[];
|
|
286
|
+
};
|
|
287
|
+
key: any;
|
|
288
|
+
test: any;
|
|
289
|
+
} | null;
|
|
290
|
+
/** One thing or a list of them, as a list: a farm's `gate` and `growth` take either. */
|
|
291
|
+
export declare const listOf: (x: any) => any[];
|
|
292
|
+
/**
|
|
293
|
+
* The program's `Gate` for a spec gate: a few wallets (`wallets`), a list of any size (`list`: an allowlist, its root and
|
|
294
|
+
* depth: the client's `gateList`), a stake (`staked`: at least `atLeast` of a farm's token in the wallet's seat; the farm's address
|
|
295
|
+
* is "@farm:<id>", filled in when the project is known), or a rule a collectible the player shows must pass.
|
|
296
|
+
*/
|
|
297
|
+
export declare const gateOf: (gate: any, m: any) => {
|
|
298
|
+
Wallets: any[];
|
|
299
|
+
Staked?: undefined;
|
|
300
|
+
List?: undefined;
|
|
301
|
+
Holds?: undefined;
|
|
302
|
+
} | {
|
|
303
|
+
Wallets?: undefined;
|
|
304
|
+
Staked: {
|
|
305
|
+
farm: string;
|
|
306
|
+
at_least: bigint;
|
|
307
|
+
};
|
|
308
|
+
List?: undefined;
|
|
309
|
+
Holds?: undefined;
|
|
310
|
+
} | {
|
|
311
|
+
Wallets?: undefined;
|
|
312
|
+
Staked?: undefined;
|
|
313
|
+
List: {
|
|
314
|
+
root: any;
|
|
315
|
+
depth: number;
|
|
316
|
+
};
|
|
317
|
+
Holds?: undefined;
|
|
318
|
+
} | {
|
|
319
|
+
Wallets?: undefined;
|
|
320
|
+
Staked?: undefined;
|
|
321
|
+
List?: undefined;
|
|
322
|
+
Holds: ({
|
|
323
|
+
of: {
|
|
324
|
+
Item: any[];
|
|
325
|
+
Collection?: undefined;
|
|
326
|
+
} | {
|
|
327
|
+
Item?: undefined;
|
|
328
|
+
Collection: any[];
|
|
329
|
+
};
|
|
330
|
+
key: any;
|
|
331
|
+
test: any;
|
|
332
|
+
} | null)[];
|
|
333
|
+
} | null;
|
|
334
|
+
/** The program's `PerWallet` for a part's "perWallet" (in all) and "perWalletEach" ({ count, every }). */
|
|
335
|
+
export declare const perWalletOf: (part: any) => {
|
|
336
|
+
total: any;
|
|
337
|
+
per_window: any;
|
|
338
|
+
window: number;
|
|
339
|
+
};
|
|
340
|
+
/** The program's `Window` for a part's "opens" and "closes" (times; 0 leaves a side open). */
|
|
341
|
+
export declare const windowOf: (part: any, now: any) => {
|
|
342
|
+
opens_at: bigint;
|
|
343
|
+
closes_at: bigint;
|
|
344
|
+
};
|
|
345
|
+
/** A lottery's split of ticket money: its own, and "cutPercent" as a share to the treasury. */
|
|
346
|
+
export declare const lotterySplit: (l: any) => any[];
|
|
347
|
+
/** The program's `Effect` for a spec effect: a flat share, or a share per point of the attribute. */
|
|
348
|
+
export declare function effectOf(effect: any): {
|
|
349
|
+
PerPoint: {
|
|
350
|
+
bps: number;
|
|
351
|
+
most: any;
|
|
352
|
+
};
|
|
353
|
+
Flat?: undefined;
|
|
354
|
+
} | {
|
|
355
|
+
PerPoint?: undefined;
|
|
356
|
+
Flat: number[];
|
|
357
|
+
};
|
|
358
|
+
/** A box's outcomes with their program weights: chances become whole weights (hundredths of a basis point). */
|
|
359
|
+
export declare function weights(box: any): any;
|
|
360
|
+
/** Every place the spec names a pool as somewhere money leaves from, with what takes it. */
|
|
361
|
+
export declare function poolTakers(m: any): any[];
|
|
362
|
+
/** Every place the spec sends money into a pool. */
|
|
363
|
+
export declare function poolFillers(m: any): any[];
|