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