@xgamesfun/solana 0.0.0-stage → 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/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 +103 -0
- package/examples/duel-arena.json +137 -0
- package/examples/elements-set.json +274 -0
- package/examples/event-badges.json +67 -0
- package/examples/expedition-guild.json +154 -0
- package/examples/fair-presale.json +48 -0
- package/examples/falling-drop.json +90 -0
- package/examples/guild-missions.json +137 -0
- package/examples/halving-seasons.json +107 -0
- package/examples/hero-trials.json +93 -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 +44 -0
- package/examples/partner-vault.json +112 -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 +118 -0
- package/examples/star-fleet.json +150 -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 +263 -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 +726 -0
- package/js/chain/base58.js +73 -0
- package/js/chain/borsh.js +270 -0
- package/js/chain/bytes.js +141 -0
- package/js/chain/core.js +181 -0
- package/js/chain/curve.js +52 -0
- package/js/chain/lookup.js +279 -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 +219 -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 +679 -0
- package/js/client/compressed.js +46 -0
- package/js/client/grant.js +299 -0
- package/js/client/idl/loot.js +2 -0
- package/js/client/idl/loot.json +17206 -0
- package/js/client/index.js +10 -0
- package/js/client/ix.js +2887 -0
- package/js/client/pda.js +114 -0
- package/js/client/policy.js +69 -0
- package/js/client/random.js +70 -0
- package/js/client/sizes.js +297 -0
- package/js/client/traits.js +44 -0
- package/js/connect/connect.mjs +182 -0
- package/js/economy/check.mjs +2236 -0
- package/js/economy/cost.mjs +185 -0
- package/js/economy/examples.mjs +114 -0
- package/js/economy/explain.mjs +239 -0
- package/js/economy/guide.mjs +232 -0
- package/js/economy/legal.mjs +15 -0
- package/js/economy/live.mjs +130 -0
- package/js/economy/model.mjs +698 -0
- package/js/economy/plan.mjs +1155 -0
- package/js/economy/schema.json +3071 -0
- package/js/economy/secrets.mjs +60 -0
- package/js/economy/simulate.mjs +1019 -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 +485 -0
- package/js/play/index.js +2855 -0
- package/js/play/keys.js +167 -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 +109 -0
- package/skills/xsolana-economy/references/after-launch.md +124 -0
- package/skills/xsolana-economy/references/apps.md +193 -0
- package/skills/xsolana-economy/references/sentence-to-spec.md +180 -0
- package/skills/xsolana-economy/references/telling-the-person.md +134 -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 +52 -0
- package/types/chain/curve.d.ts +1 -0
- package/types/chain/lookup.d.ts +194 -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 +68 -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 +318 -0
- package/types/client/compressed.d.ts +29 -0
- package/types/client/grant.d.ts +170 -0
- package/types/client/idl/loot.d.ts +4498 -0
- package/types/client/index.d.ts +9 -0
- package/types/client/ix.d.ts +5315 -0
- package/types/client/pda.d.ts +95 -0
- package/types/client/policy.d.ts +48 -0
- package/types/client/random.d.ts +26 -0
- package/types/client/sizes.d.ts +101 -0
- package/types/client/traits.d.ts +12 -0
- package/types/economy/check.d.mts +100 -0
- package/types/economy/cost.d.mts +69 -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 +124 -0
- package/types/economy/model.d.mts +431 -0
- package/types/economy/plan.d.mts +1014 -0
- package/types/economy/secrets.d.mts +4 -0
- package/types/economy/simulate.d.mts +164 -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 +635 -0
- package/types/play/index.d.ts +880 -0
- package/types/play/keys.d.ts +51 -0
- package/types/results/index.d.ts +155 -0
- package/types/results/wire.d.ts +122 -0
|
@@ -0,0 +1,1014 @@
|
|
|
1
|
+
/** Most transactions one wallet approval carries. */
|
|
2
|
+
export declare const PER_APPROVAL = 12;
|
|
3
|
+
export declare function itemArgs(it: any, m: any): {
|
|
4
|
+
kind: string;
|
|
5
|
+
rarity: number;
|
|
6
|
+
soulbound: boolean;
|
|
7
|
+
burnable: boolean;
|
|
8
|
+
name: any;
|
|
9
|
+
uri: any;
|
|
10
|
+
max_supply: any;
|
|
11
|
+
active: boolean;
|
|
12
|
+
collection: any;
|
|
13
|
+
traits: any;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The bytes of an order of box `b` (`orderBytes`), its spec's names standing in as addresses, with the shares its split
|
|
17
|
+
* stores. `opened`: an open's (`open_box`, `Order::sized`: each draw at its dearest outcome's prizes as they are kept,
|
|
18
|
+
* rows only for the tables its fresh items draw); otherwise a roll made inside another call (a craft, a grant's claim,
|
|
19
|
+
* a mission, a lottery's place, a roll lot: `Order::space_for`, the box's whole table budget a draw).
|
|
20
|
+
*/
|
|
21
|
+
export declare const boxOrderBytes: (b: any, m: any, opens?: number, { opened }?: {
|
|
22
|
+
opened?: boolean | undefined;
|
|
23
|
+
}) => number;
|
|
24
|
+
/** The most bytes of rows one table write carries: what a 1,232-byte transaction leaves after the upsert's accounts,
|
|
25
|
+
* its signature and its own bytes. */
|
|
26
|
+
export declare const TABLE_BATCH_BYTES = 800;
|
|
27
|
+
/** A spec table's rows as the program takes them ({ weight, left, label }), in batches that fit a transaction each. */
|
|
28
|
+
export declare function tableBatches(t: any): never[][];
|
|
29
|
+
/** The program's `Prize` for one part of a box outcome (`model.outcomeParts`). */
|
|
30
|
+
export declare function partPrize(o: any, m: any): "Raffled" | {
|
|
31
|
+
Stash: any[];
|
|
32
|
+
} | {
|
|
33
|
+
Compressed: {
|
|
34
|
+
item: any;
|
|
35
|
+
tree: string;
|
|
36
|
+
};
|
|
37
|
+
Item?: undefined;
|
|
38
|
+
Held?: undefined;
|
|
39
|
+
Nft?: undefined;
|
|
40
|
+
Roll?: undefined;
|
|
41
|
+
Tokens?: undefined;
|
|
42
|
+
} | {
|
|
43
|
+
Compressed?: undefined;
|
|
44
|
+
Item: any[];
|
|
45
|
+
Held?: undefined;
|
|
46
|
+
Nft?: undefined;
|
|
47
|
+
Roll?: undefined;
|
|
48
|
+
Tokens?: undefined;
|
|
49
|
+
} | {
|
|
50
|
+
Compressed?: undefined;
|
|
51
|
+
Item?: undefined;
|
|
52
|
+
Held: any[];
|
|
53
|
+
Nft?: undefined;
|
|
54
|
+
Roll?: undefined;
|
|
55
|
+
Tokens?: undefined;
|
|
56
|
+
} | {
|
|
57
|
+
Compressed?: undefined;
|
|
58
|
+
Item?: undefined;
|
|
59
|
+
Held?: undefined;
|
|
60
|
+
Nft: {
|
|
61
|
+
stash: any;
|
|
62
|
+
nft: any;
|
|
63
|
+
};
|
|
64
|
+
Roll?: undefined;
|
|
65
|
+
Tokens?: undefined;
|
|
66
|
+
} | {
|
|
67
|
+
Compressed?: undefined;
|
|
68
|
+
Item?: undefined;
|
|
69
|
+
Held?: undefined;
|
|
70
|
+
Nft?: undefined;
|
|
71
|
+
Roll: any[];
|
|
72
|
+
Tokens?: undefined;
|
|
73
|
+
} | {
|
|
74
|
+
Compressed?: undefined;
|
|
75
|
+
Item?: undefined;
|
|
76
|
+
Held?: undefined;
|
|
77
|
+
Nft?: undefined;
|
|
78
|
+
Roll?: undefined;
|
|
79
|
+
Tokens: {
|
|
80
|
+
from: {
|
|
81
|
+
Pool: any[];
|
|
82
|
+
Mint?: undefined;
|
|
83
|
+
} | {
|
|
84
|
+
Pool?: undefined;
|
|
85
|
+
Mint: string[];
|
|
86
|
+
};
|
|
87
|
+
amount: bigint;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
export declare function boxArgs(b: any, m: any): {
|
|
91
|
+
price: bigint;
|
|
92
|
+
currency: string;
|
|
93
|
+
rise: {
|
|
94
|
+
step: bigint;
|
|
95
|
+
growth_bps: number;
|
|
96
|
+
} | null;
|
|
97
|
+
fall: {
|
|
98
|
+
step: bigint;
|
|
99
|
+
every: number;
|
|
100
|
+
floor: bigint;
|
|
101
|
+
since: bigint;
|
|
102
|
+
shared: boolean;
|
|
103
|
+
} | null;
|
|
104
|
+
stock_odds: boolean;
|
|
105
|
+
when_out: string;
|
|
106
|
+
active: boolean;
|
|
107
|
+
shares: any;
|
|
108
|
+
slots: any;
|
|
109
|
+
entries: any;
|
|
110
|
+
gate: {
|
|
111
|
+
Wallets: any[];
|
|
112
|
+
Staked?: undefined;
|
|
113
|
+
List?: undefined;
|
|
114
|
+
Holds?: undefined;
|
|
115
|
+
} | {
|
|
116
|
+
Wallets?: undefined;
|
|
117
|
+
Staked: {
|
|
118
|
+
farm: string;
|
|
119
|
+
at_least: bigint;
|
|
120
|
+
};
|
|
121
|
+
List?: undefined;
|
|
122
|
+
Holds?: undefined;
|
|
123
|
+
} | {
|
|
124
|
+
Wallets?: undefined;
|
|
125
|
+
Staked?: undefined;
|
|
126
|
+
List: {
|
|
127
|
+
root: any;
|
|
128
|
+
depth: number;
|
|
129
|
+
};
|
|
130
|
+
Holds?: undefined;
|
|
131
|
+
} | {
|
|
132
|
+
Wallets?: undefined;
|
|
133
|
+
Staked?: undefined;
|
|
134
|
+
List?: undefined;
|
|
135
|
+
Holds: ({
|
|
136
|
+
of: {
|
|
137
|
+
Item: any[];
|
|
138
|
+
Collection?: undefined;
|
|
139
|
+
} | {
|
|
140
|
+
Collection: any[];
|
|
141
|
+
Item?: undefined;
|
|
142
|
+
};
|
|
143
|
+
key: any;
|
|
144
|
+
test: any;
|
|
145
|
+
} | null)[];
|
|
146
|
+
} | null;
|
|
147
|
+
odds: any;
|
|
148
|
+
window: {
|
|
149
|
+
opens_at: bigint;
|
|
150
|
+
closes_at: bigint;
|
|
151
|
+
};
|
|
152
|
+
per_wallet: {
|
|
153
|
+
total: any;
|
|
154
|
+
per_window: any;
|
|
155
|
+
window: number;
|
|
156
|
+
};
|
|
157
|
+
subject: {
|
|
158
|
+
of: {
|
|
159
|
+
Item: any[];
|
|
160
|
+
Collection?: undefined;
|
|
161
|
+
} | {
|
|
162
|
+
Collection: any[];
|
|
163
|
+
Item?: undefined;
|
|
164
|
+
};
|
|
165
|
+
key: any;
|
|
166
|
+
test: any;
|
|
167
|
+
} | null;
|
|
168
|
+
fates: any;
|
|
169
|
+
};
|
|
170
|
+
/** Where an outcome sends the NFT a box rolls on: back (null), burned, given (the treasury's wallet is filled in when the economy goes live), or into a stash. */
|
|
171
|
+
export declare const thenOf: (then: any, m: any) => "Burn" | {
|
|
172
|
+
Give?: undefined;
|
|
173
|
+
Stash: any[];
|
|
174
|
+
} | {
|
|
175
|
+
Stash?: undefined;
|
|
176
|
+
Give: any[];
|
|
177
|
+
} | null;
|
|
178
|
+
export declare function recipeArgs(r: any, m: any): {
|
|
179
|
+
active: boolean;
|
|
180
|
+
inputs: any;
|
|
181
|
+
outputs: any;
|
|
182
|
+
needs: any[];
|
|
183
|
+
keeps: any;
|
|
184
|
+
raises: any[];
|
|
185
|
+
window: {
|
|
186
|
+
opens_at: bigint;
|
|
187
|
+
closes_at: bigint;
|
|
188
|
+
};
|
|
189
|
+
per_wallet: {
|
|
190
|
+
total: any;
|
|
191
|
+
per_window: any;
|
|
192
|
+
window: number;
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
export declare function scheduleArgs(s: any, m: any): {
|
|
196
|
+
active: boolean;
|
|
197
|
+
action: {
|
|
198
|
+
from: {
|
|
199
|
+
Mint: string[];
|
|
200
|
+
Vest?: undefined;
|
|
201
|
+
Pool?: undefined;
|
|
202
|
+
};
|
|
203
|
+
to: string | {
|
|
204
|
+
Pool: any[];
|
|
205
|
+
Account?: undefined;
|
|
206
|
+
Wallet?: undefined;
|
|
207
|
+
Chosen?: undefined;
|
|
208
|
+
Holder?: undefined;
|
|
209
|
+
} | {
|
|
210
|
+
Account: (string | undefined)[];
|
|
211
|
+
Wallet?: undefined;
|
|
212
|
+
Chosen?: undefined;
|
|
213
|
+
Holder?: undefined;
|
|
214
|
+
Pool?: undefined;
|
|
215
|
+
} | {
|
|
216
|
+
Account?: undefined;
|
|
217
|
+
Wallet: (string | undefined)[];
|
|
218
|
+
Chosen?: undefined;
|
|
219
|
+
Holder?: undefined;
|
|
220
|
+
Pool?: undefined;
|
|
221
|
+
} | {
|
|
222
|
+
Account?: undefined;
|
|
223
|
+
Wallet?: undefined;
|
|
224
|
+
Chosen: {
|
|
225
|
+
item: any;
|
|
226
|
+
};
|
|
227
|
+
Holder?: undefined;
|
|
228
|
+
Pool?: undefined;
|
|
229
|
+
} | {
|
|
230
|
+
Account?: undefined;
|
|
231
|
+
Wallet?: undefined;
|
|
232
|
+
Chosen?: undefined;
|
|
233
|
+
Holder: (string | undefined)[];
|
|
234
|
+
Pool?: undefined;
|
|
235
|
+
};
|
|
236
|
+
amount: {
|
|
237
|
+
Fixed: bigint[];
|
|
238
|
+
};
|
|
239
|
+
halve_every: any;
|
|
240
|
+
} | {
|
|
241
|
+
from: {
|
|
242
|
+
Vest: string[];
|
|
243
|
+
Pool?: undefined;
|
|
244
|
+
Mint?: undefined;
|
|
245
|
+
};
|
|
246
|
+
to: string | {
|
|
247
|
+
Pool: any[];
|
|
248
|
+
Account?: undefined;
|
|
249
|
+
Wallet?: undefined;
|
|
250
|
+
Chosen?: undefined;
|
|
251
|
+
Holder?: undefined;
|
|
252
|
+
} | {
|
|
253
|
+
Account: (string | undefined)[];
|
|
254
|
+
Wallet?: undefined;
|
|
255
|
+
Chosen?: undefined;
|
|
256
|
+
Holder?: undefined;
|
|
257
|
+
Pool?: undefined;
|
|
258
|
+
} | {
|
|
259
|
+
Account?: undefined;
|
|
260
|
+
Wallet: (string | undefined)[];
|
|
261
|
+
Chosen?: undefined;
|
|
262
|
+
Holder?: undefined;
|
|
263
|
+
Pool?: undefined;
|
|
264
|
+
} | {
|
|
265
|
+
Account?: undefined;
|
|
266
|
+
Wallet?: undefined;
|
|
267
|
+
Chosen: {
|
|
268
|
+
item: any;
|
|
269
|
+
};
|
|
270
|
+
Holder?: undefined;
|
|
271
|
+
Pool?: undefined;
|
|
272
|
+
} | {
|
|
273
|
+
Account?: undefined;
|
|
274
|
+
Wallet?: undefined;
|
|
275
|
+
Chosen?: undefined;
|
|
276
|
+
Holder: (string | undefined)[];
|
|
277
|
+
Pool?: undefined;
|
|
278
|
+
};
|
|
279
|
+
amount: {
|
|
280
|
+
Bps: number[];
|
|
281
|
+
Fixed?: undefined;
|
|
282
|
+
} | {
|
|
283
|
+
Bps?: undefined;
|
|
284
|
+
Fixed: bigint[];
|
|
285
|
+
};
|
|
286
|
+
halve_every: any;
|
|
287
|
+
} | {
|
|
288
|
+
from: {
|
|
289
|
+
Vest?: undefined;
|
|
290
|
+
Pool: any[];
|
|
291
|
+
Mint?: undefined;
|
|
292
|
+
};
|
|
293
|
+
to: string | {
|
|
294
|
+
Pool: any[];
|
|
295
|
+
Account?: undefined;
|
|
296
|
+
Wallet?: undefined;
|
|
297
|
+
Chosen?: undefined;
|
|
298
|
+
Holder?: undefined;
|
|
299
|
+
} | {
|
|
300
|
+
Account: (string | undefined)[];
|
|
301
|
+
Wallet?: undefined;
|
|
302
|
+
Chosen?: undefined;
|
|
303
|
+
Holder?: undefined;
|
|
304
|
+
Pool?: undefined;
|
|
305
|
+
} | {
|
|
306
|
+
Account?: undefined;
|
|
307
|
+
Wallet: (string | undefined)[];
|
|
308
|
+
Chosen?: undefined;
|
|
309
|
+
Holder?: undefined;
|
|
310
|
+
Pool?: undefined;
|
|
311
|
+
} | {
|
|
312
|
+
Account?: undefined;
|
|
313
|
+
Wallet?: undefined;
|
|
314
|
+
Chosen: {
|
|
315
|
+
item: any;
|
|
316
|
+
};
|
|
317
|
+
Holder?: undefined;
|
|
318
|
+
Pool?: undefined;
|
|
319
|
+
} | {
|
|
320
|
+
Account?: undefined;
|
|
321
|
+
Wallet?: undefined;
|
|
322
|
+
Chosen?: undefined;
|
|
323
|
+
Holder: (string | undefined)[];
|
|
324
|
+
Pool?: undefined;
|
|
325
|
+
};
|
|
326
|
+
amount: {
|
|
327
|
+
Fixed?: undefined;
|
|
328
|
+
Bps: number[];
|
|
329
|
+
} | {
|
|
330
|
+
Bps?: undefined;
|
|
331
|
+
Fixed: bigint[];
|
|
332
|
+
};
|
|
333
|
+
halve_every: any;
|
|
334
|
+
};
|
|
335
|
+
every: bigint;
|
|
336
|
+
next_at: bigint;
|
|
337
|
+
max_runs: any;
|
|
338
|
+
};
|
|
339
|
+
/**
|
|
340
|
+
* The program's `Prize` for a prize line (`model.prizeLine`): tokens minted or from a pool (a fixed amount, or a share
|
|
341
|
+
* of the pool), an item (a compressed NFT of it into the project's tree, "@tree"), one NFT of a stash, or a roll of a box.
|
|
342
|
+
*/
|
|
343
|
+
export declare function prizeArgs(p: any, m: any): "Raffled" | {
|
|
344
|
+
Compressed: {
|
|
345
|
+
item: any;
|
|
346
|
+
tree: string;
|
|
347
|
+
};
|
|
348
|
+
Item?: undefined;
|
|
349
|
+
Held?: undefined;
|
|
350
|
+
Nft?: undefined;
|
|
351
|
+
Roll?: undefined;
|
|
352
|
+
Tokens?: undefined;
|
|
353
|
+
} | {
|
|
354
|
+
Compressed?: undefined;
|
|
355
|
+
Item: any[];
|
|
356
|
+
Held?: undefined;
|
|
357
|
+
Nft?: undefined;
|
|
358
|
+
Roll?: undefined;
|
|
359
|
+
Tokens?: undefined;
|
|
360
|
+
} | {
|
|
361
|
+
Compressed?: undefined;
|
|
362
|
+
Item?: undefined;
|
|
363
|
+
Held: any[];
|
|
364
|
+
Nft?: undefined;
|
|
365
|
+
Roll?: undefined;
|
|
366
|
+
Tokens?: undefined;
|
|
367
|
+
} | {
|
|
368
|
+
Compressed?: undefined;
|
|
369
|
+
Item?: undefined;
|
|
370
|
+
Held?: undefined;
|
|
371
|
+
Nft: {
|
|
372
|
+
stash: any;
|
|
373
|
+
nft: any;
|
|
374
|
+
};
|
|
375
|
+
Roll?: undefined;
|
|
376
|
+
Tokens?: undefined;
|
|
377
|
+
} | {
|
|
378
|
+
Compressed?: undefined;
|
|
379
|
+
Item?: undefined;
|
|
380
|
+
Held?: undefined;
|
|
381
|
+
Nft?: undefined;
|
|
382
|
+
Roll: any[];
|
|
383
|
+
Tokens?: undefined;
|
|
384
|
+
} | {
|
|
385
|
+
Compressed?: undefined;
|
|
386
|
+
Item?: undefined;
|
|
387
|
+
Held?: undefined;
|
|
388
|
+
Nft?: undefined;
|
|
389
|
+
Roll?: undefined;
|
|
390
|
+
Tokens: {
|
|
391
|
+
from: {
|
|
392
|
+
Pool: any[];
|
|
393
|
+
Mint?: undefined;
|
|
394
|
+
} | {
|
|
395
|
+
Pool?: undefined;
|
|
396
|
+
Mint: string[];
|
|
397
|
+
};
|
|
398
|
+
amount: bigint;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* A grant list's leaves: a plain address is the grant's amount in round 0; an entry { wallet, amount, round } names
|
|
403
|
+
* its own amount (whole units of `t`, the grant's token) and round, so one wallet listed under several rounds claims
|
|
404
|
+
* each once (monthly vesting, a season's airdrop).
|
|
405
|
+
*/
|
|
406
|
+
export declare const listLeaves: (list: any, t: any) => any;
|
|
407
|
+
/**
|
|
408
|
+
* A lottery's args: its own pot in `currency` (the project's by default), ticket money split by `split` (and
|
|
409
|
+
* `cutPercent` to the treasury) with the rest into the pot. No `every` draws once, at `firstDraw`.
|
|
410
|
+
*/
|
|
411
|
+
export declare function lotteryArgs(l: any, m: any): {
|
|
412
|
+
terms: {
|
|
413
|
+
price: bigint;
|
|
414
|
+
mint: string;
|
|
415
|
+
shares: any;
|
|
416
|
+
places: any;
|
|
417
|
+
ticket_mint: string;
|
|
418
|
+
draws_at: bigint;
|
|
419
|
+
nft_ticket: {
|
|
420
|
+
rule: {
|
|
421
|
+
of: {
|
|
422
|
+
Item: any[];
|
|
423
|
+
Collection?: undefined;
|
|
424
|
+
} | {
|
|
425
|
+
Collection: any[];
|
|
426
|
+
Item?: undefined;
|
|
427
|
+
};
|
|
428
|
+
key: any;
|
|
429
|
+
test: any;
|
|
430
|
+
} | null;
|
|
431
|
+
then: string | {
|
|
432
|
+
Stash: any[];
|
|
433
|
+
Give?: undefined;
|
|
434
|
+
} | {
|
|
435
|
+
Stash?: undefined;
|
|
436
|
+
Give: any[];
|
|
437
|
+
};
|
|
438
|
+
} | null;
|
|
439
|
+
returns: boolean;
|
|
440
|
+
min_sold: bigint;
|
|
441
|
+
};
|
|
442
|
+
every: bigint;
|
|
443
|
+
gate: {
|
|
444
|
+
Wallets: any[];
|
|
445
|
+
Staked?: undefined;
|
|
446
|
+
List?: undefined;
|
|
447
|
+
Holds?: undefined;
|
|
448
|
+
} | {
|
|
449
|
+
Wallets?: undefined;
|
|
450
|
+
Staked: {
|
|
451
|
+
farm: string;
|
|
452
|
+
at_least: bigint;
|
|
453
|
+
};
|
|
454
|
+
List?: undefined;
|
|
455
|
+
Holds?: undefined;
|
|
456
|
+
} | {
|
|
457
|
+
Wallets?: undefined;
|
|
458
|
+
Staked?: undefined;
|
|
459
|
+
List: {
|
|
460
|
+
root: any;
|
|
461
|
+
depth: number;
|
|
462
|
+
};
|
|
463
|
+
Holds?: undefined;
|
|
464
|
+
} | {
|
|
465
|
+
Wallets?: undefined;
|
|
466
|
+
Staked?: undefined;
|
|
467
|
+
List?: undefined;
|
|
468
|
+
Holds: ({
|
|
469
|
+
of: {
|
|
470
|
+
Item: any[];
|
|
471
|
+
Collection?: undefined;
|
|
472
|
+
} | {
|
|
473
|
+
Collection: any[];
|
|
474
|
+
Item?: undefined;
|
|
475
|
+
};
|
|
476
|
+
key: any;
|
|
477
|
+
test: any;
|
|
478
|
+
} | null)[];
|
|
479
|
+
} | null;
|
|
480
|
+
per_wallet: any;
|
|
481
|
+
};
|
|
482
|
+
/**
|
|
483
|
+
* A lottery round's header as its first purchase sizes it (`LotteryRound::new`: its `head`), and the token accounts a
|
|
484
|
+
* round may open (`accounts`: the payment mint's, the pot's, one for each run whose prize comes from a pool). The
|
|
485
|
+
* header holds a copy of the terms, a total for each share, two bits a place, a record for each run of tokens and an
|
|
486
|
+
* NFT slot for each place of the lottery's own stash.
|
|
487
|
+
*/
|
|
488
|
+
export declare function roundSize(l: any, m: any): {
|
|
489
|
+
head: number;
|
|
490
|
+
accounts: any;
|
|
491
|
+
};
|
|
492
|
+
/** How many rounds of a lottery are open or still paying out at once, and how many purchases a round takes, as the
|
|
493
|
+
* spec expects them (`expect`): by default two rounds of a lottery that draws again (one selling, one paying out) and
|
|
494
|
+
* one of a lottery that draws once; a round's purchases from the scenario's purchases a day over a round, else 100. */
|
|
495
|
+
export declare function roundsExpected(l: any, m: any): {
|
|
496
|
+
rounds: any;
|
|
497
|
+
entries: any;
|
|
498
|
+
};
|
|
499
|
+
/**
|
|
500
|
+
* The SOL, in lamports, a lottery holds for its rounds' rent: the spec's `roundRent` (0 turns it off), or by default
|
|
501
|
+
* what its expected rounds take at once (`roundsExpected`), each its header, its token accounts and its expected
|
|
502
|
+
* entries' bytes (`LotteryRound.lent`: in a round the lottery opened, its spare SOL pays each entry while it covers
|
|
503
|
+
* them, so buyers pay no program rent for a ticket), at devnet's and mainnet's rent, rounded up to 0.001 SOL. Short
|
|
504
|
+
* of it (a busier round, a cluster that charges more), the first buyer fronts the header and later buyers pay their
|
|
505
|
+
* own entries. Each round gives back what it took when it closes; the lottery gives the rest back to the owner when it closes.
|
|
506
|
+
*/
|
|
507
|
+
export declare function roundRentOf(l: any, m: any): bigint;
|
|
508
|
+
/**
|
|
509
|
+
* The args the authority opens a contest with, `at` (Unix seconds) its opening: its sides, when entries close and the
|
|
510
|
+
* result is due, its split, its gate (a list of wallets for a duel), the keys that may decide it, the least pot (an
|
|
511
|
+
* all-or-nothing crowdfund) and the stake every entry puts in.
|
|
512
|
+
*/
|
|
513
|
+
export declare function contestArgs(c: any, m: any, at?: any): {
|
|
514
|
+
sides: any;
|
|
515
|
+
closes_at: bigint;
|
|
516
|
+
result_by: bigint;
|
|
517
|
+
shares: any;
|
|
518
|
+
gate: {
|
|
519
|
+
Wallets: any[];
|
|
520
|
+
Staked?: undefined;
|
|
521
|
+
List?: undefined;
|
|
522
|
+
Holds?: undefined;
|
|
523
|
+
} | {
|
|
524
|
+
Wallets?: undefined;
|
|
525
|
+
Staked: {
|
|
526
|
+
farm: string;
|
|
527
|
+
at_least: bigint;
|
|
528
|
+
};
|
|
529
|
+
List?: undefined;
|
|
530
|
+
Holds?: undefined;
|
|
531
|
+
} | {
|
|
532
|
+
Wallets?: undefined;
|
|
533
|
+
Staked?: undefined;
|
|
534
|
+
List: {
|
|
535
|
+
root: any;
|
|
536
|
+
depth: number;
|
|
537
|
+
};
|
|
538
|
+
Holds?: undefined;
|
|
539
|
+
} | {
|
|
540
|
+
Wallets?: undefined;
|
|
541
|
+
Staked?: undefined;
|
|
542
|
+
List?: undefined;
|
|
543
|
+
Holds: ({
|
|
544
|
+
of: {
|
|
545
|
+
Item: any[];
|
|
546
|
+
Collection?: undefined;
|
|
547
|
+
} | {
|
|
548
|
+
Collection: any[];
|
|
549
|
+
Item?: undefined;
|
|
550
|
+
};
|
|
551
|
+
key: any;
|
|
552
|
+
test: any;
|
|
553
|
+
} | null)[];
|
|
554
|
+
} | null;
|
|
555
|
+
deciders: any;
|
|
556
|
+
min_pot: bigint;
|
|
557
|
+
stake: bigint;
|
|
558
|
+
prize: string | {
|
|
559
|
+
Compressed: {
|
|
560
|
+
item: any;
|
|
561
|
+
tree: string;
|
|
562
|
+
};
|
|
563
|
+
Item?: undefined;
|
|
564
|
+
Held?: undefined;
|
|
565
|
+
Nft?: undefined;
|
|
566
|
+
Roll?: undefined;
|
|
567
|
+
Tokens?: undefined;
|
|
568
|
+
} | {
|
|
569
|
+
Compressed?: undefined;
|
|
570
|
+
Item: any[];
|
|
571
|
+
Held?: undefined;
|
|
572
|
+
Nft?: undefined;
|
|
573
|
+
Roll?: undefined;
|
|
574
|
+
Tokens?: undefined;
|
|
575
|
+
} | {
|
|
576
|
+
Compressed?: undefined;
|
|
577
|
+
Item?: undefined;
|
|
578
|
+
Held: any[];
|
|
579
|
+
Nft?: undefined;
|
|
580
|
+
Roll?: undefined;
|
|
581
|
+
Tokens?: undefined;
|
|
582
|
+
} | {
|
|
583
|
+
Compressed?: undefined;
|
|
584
|
+
Item?: undefined;
|
|
585
|
+
Held?: undefined;
|
|
586
|
+
Nft: {
|
|
587
|
+
stash: any;
|
|
588
|
+
nft: any;
|
|
589
|
+
};
|
|
590
|
+
Roll?: undefined;
|
|
591
|
+
Tokens?: undefined;
|
|
592
|
+
} | {
|
|
593
|
+
Compressed?: undefined;
|
|
594
|
+
Item?: undefined;
|
|
595
|
+
Held?: undefined;
|
|
596
|
+
Nft?: undefined;
|
|
597
|
+
Roll: any[];
|
|
598
|
+
Tokens?: undefined;
|
|
599
|
+
} | {
|
|
600
|
+
Compressed?: undefined;
|
|
601
|
+
Item?: undefined;
|
|
602
|
+
Held?: undefined;
|
|
603
|
+
Nft?: undefined;
|
|
604
|
+
Roll?: undefined;
|
|
605
|
+
Tokens: {
|
|
606
|
+
from: {
|
|
607
|
+
Pool: any[];
|
|
608
|
+
Mint?: undefined;
|
|
609
|
+
} | {
|
|
610
|
+
Pool?: undefined;
|
|
611
|
+
Mint: string[];
|
|
612
|
+
};
|
|
613
|
+
amount: bigint;
|
|
614
|
+
};
|
|
615
|
+
} | null;
|
|
616
|
+
prize_split: boolean;
|
|
617
|
+
nft: {
|
|
618
|
+
of: {
|
|
619
|
+
Item: any[];
|
|
620
|
+
Collection?: undefined;
|
|
621
|
+
} | {
|
|
622
|
+
Collection: any[];
|
|
623
|
+
Item?: undefined;
|
|
624
|
+
};
|
|
625
|
+
key: any;
|
|
626
|
+
test: any;
|
|
627
|
+
} | null;
|
|
628
|
+
cap: any;
|
|
629
|
+
};
|
|
630
|
+
export declare function farmArgs(f: any, m: any): {
|
|
631
|
+
custody: any;
|
|
632
|
+
tiers: any;
|
|
633
|
+
boosts: any;
|
|
634
|
+
max_boost_bps: number;
|
|
635
|
+
gates: ({
|
|
636
|
+
of: {
|
|
637
|
+
Item: any[];
|
|
638
|
+
Collection?: undefined;
|
|
639
|
+
} | {
|
|
640
|
+
Collection: any[];
|
|
641
|
+
Item?: undefined;
|
|
642
|
+
};
|
|
643
|
+
key: any;
|
|
644
|
+
test: any;
|
|
645
|
+
} | null)[];
|
|
646
|
+
rate: {
|
|
647
|
+
per_day: bigint;
|
|
648
|
+
mints: boolean;
|
|
649
|
+
shared: boolean;
|
|
650
|
+
halve_every: number;
|
|
651
|
+
} | null;
|
|
652
|
+
growth: {
|
|
653
|
+
key: any;
|
|
654
|
+
per_day: any;
|
|
655
|
+
level: any;
|
|
656
|
+
steps: any;
|
|
657
|
+
streak: boolean;
|
|
658
|
+
profile: boolean;
|
|
659
|
+
at_least: bigint;
|
|
660
|
+
}[];
|
|
661
|
+
ends_at: bigint;
|
|
662
|
+
lock_key: any;
|
|
663
|
+
upkeep_key: any;
|
|
664
|
+
exit_to: string | {
|
|
665
|
+
Pool: any[];
|
|
666
|
+
} | null;
|
|
667
|
+
};
|
|
668
|
+
/** A fee's sink (`Sink`): "burn", "rewards" (the farm's own vault), or "pool:<key>", one of the project's pools. */
|
|
669
|
+
export declare const sinkOf: (to: any, m: any) => "Burn" | "Rewards" | {
|
|
670
|
+
Pool: any[];
|
|
671
|
+
};
|
|
672
|
+
/** Whether a spec's farm keeps a record of when its seats stop earning (`loot.farmKeepsEnds`): a tier's term or an upkeep,
|
|
673
|
+
* and it pays something. Each different time waiting costs whoever writes it `loot.END_BYTES` of rent. */
|
|
674
|
+
export declare const farmEnds: (f: any) => any;
|
|
675
|
+
/** An auction's args: its lot, reserve, least raise, times and split. "start" is when it goes live unless it says. */
|
|
676
|
+
export declare function auctionArgs(a: any, m: any): {
|
|
677
|
+
lot: {
|
|
678
|
+
Asset: any[];
|
|
679
|
+
} | {
|
|
680
|
+
Roll: any[];
|
|
681
|
+
} | {
|
|
682
|
+
Item: any[];
|
|
683
|
+
};
|
|
684
|
+
reserve: bigint;
|
|
685
|
+
min_raise_bps: number;
|
|
686
|
+
starts_at: bigint;
|
|
687
|
+
ends_at: bigint;
|
|
688
|
+
extend: number;
|
|
689
|
+
shares: any;
|
|
690
|
+
gate: {
|
|
691
|
+
Wallets: any[];
|
|
692
|
+
Staked?: undefined;
|
|
693
|
+
List?: undefined;
|
|
694
|
+
Holds?: undefined;
|
|
695
|
+
} | {
|
|
696
|
+
Wallets?: undefined;
|
|
697
|
+
Staked: {
|
|
698
|
+
farm: string;
|
|
699
|
+
at_least: bigint;
|
|
700
|
+
};
|
|
701
|
+
List?: undefined;
|
|
702
|
+
Holds?: undefined;
|
|
703
|
+
} | {
|
|
704
|
+
Wallets?: undefined;
|
|
705
|
+
Staked?: undefined;
|
|
706
|
+
List: {
|
|
707
|
+
root: any;
|
|
708
|
+
depth: number;
|
|
709
|
+
};
|
|
710
|
+
Holds?: undefined;
|
|
711
|
+
} | {
|
|
712
|
+
Wallets?: undefined;
|
|
713
|
+
Staked?: undefined;
|
|
714
|
+
List?: undefined;
|
|
715
|
+
Holds: ({
|
|
716
|
+
of: {
|
|
717
|
+
Item: any[];
|
|
718
|
+
Collection?: undefined;
|
|
719
|
+
} | {
|
|
720
|
+
Collection: any[];
|
|
721
|
+
Item?: undefined;
|
|
722
|
+
};
|
|
723
|
+
key: any;
|
|
724
|
+
test: any;
|
|
725
|
+
} | null)[];
|
|
726
|
+
} | null;
|
|
727
|
+
nft_bids: {
|
|
728
|
+
of: {
|
|
729
|
+
Item: any[];
|
|
730
|
+
Collection?: undefined;
|
|
731
|
+
} | {
|
|
732
|
+
Collection: any[];
|
|
733
|
+
Item?: undefined;
|
|
734
|
+
};
|
|
735
|
+
key: any;
|
|
736
|
+
test: any;
|
|
737
|
+
} | null;
|
|
738
|
+
};
|
|
739
|
+
export declare function grantArgs(g: any, m: any): {
|
|
740
|
+
gives: string | {
|
|
741
|
+
Compressed: {
|
|
742
|
+
item: any;
|
|
743
|
+
tree: string;
|
|
744
|
+
};
|
|
745
|
+
Item?: undefined;
|
|
746
|
+
Held?: undefined;
|
|
747
|
+
Nft?: undefined;
|
|
748
|
+
Roll?: undefined;
|
|
749
|
+
Tokens?: undefined;
|
|
750
|
+
} | {
|
|
751
|
+
Compressed?: undefined;
|
|
752
|
+
Item: any[];
|
|
753
|
+
Held?: undefined;
|
|
754
|
+
Nft?: undefined;
|
|
755
|
+
Roll?: undefined;
|
|
756
|
+
Tokens?: undefined;
|
|
757
|
+
} | {
|
|
758
|
+
Compressed?: undefined;
|
|
759
|
+
Item?: undefined;
|
|
760
|
+
Held: any[];
|
|
761
|
+
Nft?: undefined;
|
|
762
|
+
Roll?: undefined;
|
|
763
|
+
Tokens?: undefined;
|
|
764
|
+
} | {
|
|
765
|
+
Compressed?: undefined;
|
|
766
|
+
Item?: undefined;
|
|
767
|
+
Held?: undefined;
|
|
768
|
+
Nft: {
|
|
769
|
+
stash: any;
|
|
770
|
+
nft: any;
|
|
771
|
+
};
|
|
772
|
+
Roll?: undefined;
|
|
773
|
+
Tokens?: undefined;
|
|
774
|
+
} | {
|
|
775
|
+
Compressed?: undefined;
|
|
776
|
+
Item?: undefined;
|
|
777
|
+
Held?: undefined;
|
|
778
|
+
Nft?: undefined;
|
|
779
|
+
Roll: any[];
|
|
780
|
+
Tokens?: undefined;
|
|
781
|
+
} | {
|
|
782
|
+
Compressed?: undefined;
|
|
783
|
+
Item?: undefined;
|
|
784
|
+
Held?: undefined;
|
|
785
|
+
Nft?: undefined;
|
|
786
|
+
Roll?: undefined;
|
|
787
|
+
Tokens: {
|
|
788
|
+
from: {
|
|
789
|
+
Pool: any[];
|
|
790
|
+
Mint?: undefined;
|
|
791
|
+
} | {
|
|
792
|
+
Pool?: undefined;
|
|
793
|
+
Mint: string[];
|
|
794
|
+
};
|
|
795
|
+
amount: bigint;
|
|
796
|
+
};
|
|
797
|
+
};
|
|
798
|
+
vouchers: any[];
|
|
799
|
+
list_root: any;
|
|
800
|
+
key_root: any;
|
|
801
|
+
open: boolean;
|
|
802
|
+
limits: {
|
|
803
|
+
wallet: {
|
|
804
|
+
total: any;
|
|
805
|
+
per_window: any;
|
|
806
|
+
window: number;
|
|
807
|
+
};
|
|
808
|
+
per_person: any;
|
|
809
|
+
per_key: any;
|
|
810
|
+
all: {
|
|
811
|
+
total: any;
|
|
812
|
+
per_window: any;
|
|
813
|
+
window: number;
|
|
814
|
+
};
|
|
815
|
+
window: {
|
|
816
|
+
opens_at: bigint;
|
|
817
|
+
closes_at: bigint;
|
|
818
|
+
};
|
|
819
|
+
};
|
|
820
|
+
active: boolean;
|
|
821
|
+
gate: {
|
|
822
|
+
Wallets: any[];
|
|
823
|
+
Staked?: undefined;
|
|
824
|
+
List?: undefined;
|
|
825
|
+
Holds?: undefined;
|
|
826
|
+
} | {
|
|
827
|
+
Wallets?: undefined;
|
|
828
|
+
Staked: {
|
|
829
|
+
farm: string;
|
|
830
|
+
at_least: bigint;
|
|
831
|
+
};
|
|
832
|
+
List?: undefined;
|
|
833
|
+
Holds?: undefined;
|
|
834
|
+
} | {
|
|
835
|
+
Wallets?: undefined;
|
|
836
|
+
Staked?: undefined;
|
|
837
|
+
List: {
|
|
838
|
+
root: any;
|
|
839
|
+
depth: number;
|
|
840
|
+
};
|
|
841
|
+
Holds?: undefined;
|
|
842
|
+
} | {
|
|
843
|
+
Wallets?: undefined;
|
|
844
|
+
Staked?: undefined;
|
|
845
|
+
List?: undefined;
|
|
846
|
+
Holds: ({
|
|
847
|
+
of: {
|
|
848
|
+
Item: any[];
|
|
849
|
+
Collection?: undefined;
|
|
850
|
+
} | {
|
|
851
|
+
Collection: any[];
|
|
852
|
+
Item?: undefined;
|
|
853
|
+
};
|
|
854
|
+
key: any;
|
|
855
|
+
test: any;
|
|
856
|
+
} | null)[];
|
|
857
|
+
} | null;
|
|
858
|
+
shard_bits: number;
|
|
859
|
+
};
|
|
860
|
+
/**
|
|
861
|
+
* Every step that sets the economy up, in order: the tokens the project mints, the collection, the project, the pools, items, boxes (the shop's too), recipes, schedules, lotteries, grants,
|
|
862
|
+
* farms, auctions, then the seeds and the grants' funds. `only` limits it to these part ids (a change to a live economy).
|
|
863
|
+
*
|
|
864
|
+
* A farm opens before its seed lands in its rewards vault, and anyone may stake in between. That is safe: a sharing
|
|
865
|
+
* farm credits nothing at once, and releases what lands in its vault over its longest lock (a day at least) to the
|
|
866
|
+
* seats there as it is released, its clock stopped while nobody is in. A seed that lands
|
|
867
|
+
* before the first stake or after it is released the same way from that stake on, so seeding first would change nothing.
|
|
868
|
+
*/
|
|
869
|
+
export declare function setupSteps(economy: any, { now, only, live: given }?: {
|
|
870
|
+
live?: null | undefined;
|
|
871
|
+
now?: number | undefined;
|
|
872
|
+
only?: null | undefined;
|
|
873
|
+
}): {
|
|
874
|
+
steps: any[];
|
|
875
|
+
model: {
|
|
876
|
+
now: number;
|
|
877
|
+
name: any;
|
|
878
|
+
authority: any;
|
|
879
|
+
treasuryWallet: any;
|
|
880
|
+
tokens: Map<any, any>;
|
|
881
|
+
currencyKey: any;
|
|
882
|
+
currency: any;
|
|
883
|
+
collection: any;
|
|
884
|
+
collections: any;
|
|
885
|
+
treeHolds: any;
|
|
886
|
+
projectNumber: any;
|
|
887
|
+
items: any;
|
|
888
|
+
pools: any;
|
|
889
|
+
stashes: any;
|
|
890
|
+
tables: any;
|
|
891
|
+
boxes: never[];
|
|
892
|
+
payments: any;
|
|
893
|
+
recipes: any;
|
|
894
|
+
schedules: any;
|
|
895
|
+
lotteries: any;
|
|
896
|
+
farms: any;
|
|
897
|
+
contests: any;
|
|
898
|
+
auctions: any;
|
|
899
|
+
holds: any;
|
|
900
|
+
grants: any;
|
|
901
|
+
traits: any;
|
|
902
|
+
decisions: any;
|
|
903
|
+
scenario: any;
|
|
904
|
+
live: any;
|
|
905
|
+
};
|
|
906
|
+
};
|
|
907
|
+
/** The token accounts going live opens (`setupSteps`): [{ who ('the treasury', 'the project' or a wallet), token }], each
|
|
908
|
+
* once, for the coins the economy takes in. */
|
|
909
|
+
export declare function goLiveAccounts(m: any): any[];
|
|
910
|
+
/**
|
|
911
|
+
* The addresses a project's transactions name most, for its standing lookup table: loot's own fixed accounts (the
|
|
912
|
+
* platform, the oracle's), the project and its fee box, its treasury and collections, each coin's mint, its vault and
|
|
913
|
+
* the treasury's account of it, then each pool, item, box and stash. Each a function of the go-live context.
|
|
914
|
+
*/
|
|
915
|
+
export declare function standingAddresses(m: any): any[];
|
|
916
|
+
/** A stash's bytes with `n` NFTs: a table of NFTs (`table.rs`): its 51-byte header, a total for each group of 4,096
|
|
917
|
+
* rows and each block of 64, and 36 bytes an NFT (its weight and its address). */
|
|
918
|
+
export declare const stashBytes: (n: any) => number;
|
|
919
|
+
/** Who puts a spec's auction up, and so is named in its address: the owner for a collectible it holds, the authority for a new unit of an item. */
|
|
920
|
+
export declare const auctionSeller: (a: any, ctx: any) => any;
|
|
921
|
+
export declare const recordBytesOf: (kind: any, body: any) => number;
|
|
922
|
+
/** A farm's bytes as `open_farm` writes it: its args and its numbers. */
|
|
923
|
+
export declare const farmBytes: (f: any, m: any) => number;
|
|
924
|
+
/** Exact initial contest record size for its configured shares, gate, sides and deciders. */
|
|
925
|
+
export declare const contestBytes: (contest: any, m: any) => number;
|
|
926
|
+
/** Stand-in addresses for every name a plan uses, so it can be built and sized without a wallet. */
|
|
927
|
+
export declare function placeholderContext(m: any, { rent }?: {
|
|
928
|
+
rent?: ((bytes: any) => bigint) | undefined;
|
|
929
|
+
}): {
|
|
930
|
+
owner: string;
|
|
931
|
+
authority: any;
|
|
932
|
+
collection: string | null;
|
|
933
|
+
tree: string | null;
|
|
934
|
+
project: any;
|
|
935
|
+
treasury: any;
|
|
936
|
+
mints: {};
|
|
937
|
+
keys: {
|
|
938
|
+
'new:collection'?: string | undefined;
|
|
939
|
+
'new:tree'?: string | undefined;
|
|
940
|
+
};
|
|
941
|
+
rent: (bytes: any) => bigint;
|
|
942
|
+
slot: bigint;
|
|
943
|
+
};
|
|
944
|
+
/**
|
|
945
|
+
* What of `live` is made. While a setup is landing (`partial`), the project, its collection, its tree and each mint the
|
|
946
|
+
* setup makes count only once the step that makes it landed (`landed`): a setup cut short makes the rest again, with
|
|
947
|
+
* this session's fresh keys, instead of naming an account that was never made. What was live before a change, and
|
|
948
|
+
* that the change does not make, counts as it is. The treasury and authority count only with the project. The approval
|
|
949
|
+
* page holds what is left against the chain before it builds on it (`js/approve/live-check.mjs`).
|
|
950
|
+
*/
|
|
951
|
+
export declare function madeSoFar(live: any): any;
|
|
952
|
+
/** The context of a real setup: the owner's wallet, fresh keys for what it creates, and what is live already. */
|
|
953
|
+
export declare function setupContext(m: any, { owner: ownerKey, keys, live: given, rent }: {
|
|
954
|
+
keys: any;
|
|
955
|
+
live?: {} | undefined;
|
|
956
|
+
owner: any;
|
|
957
|
+
rent: any;
|
|
958
|
+
}): {
|
|
959
|
+
owner: any;
|
|
960
|
+
authority: any;
|
|
961
|
+
collection: any;
|
|
962
|
+
tree: any;
|
|
963
|
+
project: any;
|
|
964
|
+
treasury: any;
|
|
965
|
+
mints: {};
|
|
966
|
+
keys: any;
|
|
967
|
+
rent: any;
|
|
968
|
+
};
|
|
969
|
+
/** The bytes of a transaction of `instructions` the owner pays for: what `pack` holds against the budget. */
|
|
970
|
+
export declare const stepBytes: (instructions: any, ctx: any) => number;
|
|
971
|
+
/** Packs steps into transactions under the size budget, one signer set at a time; each step whole. */
|
|
972
|
+
export declare function pack(steps: any, ctx: any): {
|
|
973
|
+
signer: string;
|
|
974
|
+
steps: any[];
|
|
975
|
+
built: any[];
|
|
976
|
+
instructions: any;
|
|
977
|
+
signers: any[];
|
|
978
|
+
alone: boolean;
|
|
979
|
+
}[];
|
|
980
|
+
/**
|
|
981
|
+
* The plan for a spec: refusals, or every step packed into transactions. With `ctx` the transactions carry the
|
|
982
|
+
* real instructions; without it they are built on stand-in addresses (for sizing, cost and showing).
|
|
983
|
+
*/
|
|
984
|
+
export declare function plan(economy: any, { now, ctx, only, live }?: {
|
|
985
|
+
ctx?: null | undefined;
|
|
986
|
+
live?: null | undefined;
|
|
987
|
+
now?: number | undefined;
|
|
988
|
+
only?: null | undefined;
|
|
989
|
+
}): {
|
|
990
|
+
ok: boolean;
|
|
991
|
+
refusals: any[];
|
|
992
|
+
warnings: any[];
|
|
993
|
+
steps?: undefined;
|
|
994
|
+
transactions?: undefined;
|
|
995
|
+
approvals?: undefined;
|
|
996
|
+
freshKeys?: undefined;
|
|
997
|
+
} | {
|
|
998
|
+
refusals?: undefined;
|
|
999
|
+
ok: boolean;
|
|
1000
|
+
warnings: any[];
|
|
1001
|
+
steps: any[];
|
|
1002
|
+
transactions: {
|
|
1003
|
+
signer: string;
|
|
1004
|
+
steps: any[];
|
|
1005
|
+
built: any[];
|
|
1006
|
+
instructions: any;
|
|
1007
|
+
signers: any[];
|
|
1008
|
+
alone: boolean;
|
|
1009
|
+
}[];
|
|
1010
|
+
approvals: number;
|
|
1011
|
+
freshKeys: any[];
|
|
1012
|
+
};
|
|
1013
|
+
/** What each part needs while the economy runs: the instruction, and who signs it. */
|
|
1014
|
+
export declare function playSteps(economy: any): any[];
|