@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,95 @@
|
|
|
1
|
+
import { MPL_CORE_PROGRAM } from '../chain/pda.js';
|
|
2
|
+
export declare const LOOT_PROGRAM: string;
|
|
3
|
+
/** MagicBlock's VRF program and its default queue, the only queue the program accepts. */
|
|
4
|
+
export declare const VRF_PROGRAM = "Vrf1RNUjXmQGjmQrQLvJHs9SNkvDJEsRVFPkfSQUwGz";
|
|
5
|
+
export declare const VRF_QUEUE = "Cuj97ggrhhidhbu39TijNVqE74xvKJ69gDervRUXAxGh";
|
|
6
|
+
export { MPL_CORE_PROGRAM };
|
|
7
|
+
export declare const BPF_LOADER_UPGRADEABLE = "BPFLoaderUpgradeab1e11111111111111111111111";
|
|
8
|
+
/** Compressed NFTs: Bubblegum, and the account compression program and noop of its v2 trees. */
|
|
9
|
+
export declare const BUBBLEGUM_PROGRAM = "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY";
|
|
10
|
+
export declare const COMPRESSION_PROGRAM = "mcmt6YrQEMKw8Mw43FmpRLmf7BqRnFMKmAcbxE3xkAW";
|
|
11
|
+
export declare const NOOP_PROGRAM = "mnoopTCrg4p8ry25e4bcWA9XZjbNjMTfgYVGGEdRsf3";
|
|
12
|
+
/** The PDA of these seeds under the loot program, with its bump. */
|
|
13
|
+
export declare const lootAddress: (seeds: any, program?: string) => any;
|
|
14
|
+
export declare const pda: {
|
|
15
|
+
platform: () => any;
|
|
16
|
+
/** A project: any wallet (its creator) opens as many as it likes, each with a number of its own (`id`, a u64). A
|
|
17
|
+
* new owner keeps the address. */
|
|
18
|
+
project: (creator: any, id?: number) => any;
|
|
19
|
+
/** The project's fee box: where the platform's fees on its transactions wait. */
|
|
20
|
+
fees: (project: any) => any;
|
|
21
|
+
pool: (project: any, index: any) => any;
|
|
22
|
+
item: (project: any, id: any) => any;
|
|
23
|
+
box: (project: any, id: any) => any;
|
|
24
|
+
/** NFTs the project holds to give away as prizes: a box entry of a stash gives one of them at random. */
|
|
25
|
+
stash: (project: any, id: any) => any;
|
|
26
|
+
/** A table of weighted rows the project writes and seals (a card among thousands, a trait's values), or commits by a Merkle root. */
|
|
27
|
+
table: (project: any, id: any) => any;
|
|
28
|
+
/** What the project keeps about a wallet (its player's profile: XP, level, rank). */
|
|
29
|
+
profile: (project: any, wallet: any) => any;
|
|
30
|
+
schedule: (project: any, id: any) => any;
|
|
31
|
+
lottery: (project: any, id: any) => any;
|
|
32
|
+
recipe: (project: any, id: any) => any;
|
|
33
|
+
contest: (project: any, id: any) => any;
|
|
34
|
+
/** An auction: an id is its seller's own. Its bids wait in the project's vault for its mint (`vault`). */
|
|
35
|
+
auction: (project: any, seller: any, id: any) => any;
|
|
36
|
+
farm: (project: any, id: any) => any;
|
|
37
|
+
grant: (project: any, id: any) => any;
|
|
38
|
+
order: (project: any, player: any, nonce: any) => any;
|
|
39
|
+
/** Every collectible the program mints of its own accord (an order's, a prize's, an auction's lot): its address
|
|
40
|
+
* names its item and its serial, minted once at most. */
|
|
41
|
+
itemAsset: (item: any, serial: any) => any;
|
|
42
|
+
/** A contest's pot, or a lottery's: `["pot", contest or lottery]`. */
|
|
43
|
+
pot: (record: any) => any;
|
|
44
|
+
/** One round of a lottery: its record, opened by the round's first purchase (`["round", lottery, incarnation, round]`). */
|
|
45
|
+
round: (lottery: any, incarnation: any, round: any) => any;
|
|
46
|
+
/** A lottery round's own token account of `mint`, which the round's record owns. */
|
|
47
|
+
roundTokens: (round: any, mint: any) => any;
|
|
48
|
+
/** A contest's list of entries, one record a player (page 0). */
|
|
49
|
+
entries: (contest: any, incarnation: any, page?: number) => any;
|
|
50
|
+
/** A hold names its NFT and its end (Unix seconds): a release sent late never finds a later hold of the NFT. */
|
|
51
|
+
hold: (asset: any, freeAt: any) => any;
|
|
52
|
+
/** An offer: an id is its maker's own. Its money waits in the project's vault for its mint (`vault`). */
|
|
53
|
+
offer: (project: any, maker: any, id: any) => any;
|
|
54
|
+
/** A lottery's own stash: the NFTs its places promise (`Prize::Held`), which leave only as its prizes. */
|
|
55
|
+
lotteryStash: (lottery: any) => any;
|
|
56
|
+
/** A contest's prize split by stake, set aside when it is decided: `["prize", contest]`. */
|
|
57
|
+
prizeVault: (contest: any) => any;
|
|
58
|
+
/** A sealed schedule's own vault, which only its runs pay out of: `["vest", schedule]`. */
|
|
59
|
+
vest: (schedule: any) => any;
|
|
60
|
+
/** A listing of an NFT for sale or for rent: one per NFT a project holds, so its address names the NFT. */
|
|
61
|
+
listing: (project: any, asset: any) => any;
|
|
62
|
+
staked: (farm: any) => any;
|
|
63
|
+
rewards: (farm: any) => any;
|
|
64
|
+
/** A farm's record of when its seats stop earning, for a farm that keeps one (`Farm.keeps_ends`). */
|
|
65
|
+
ends: (farm: any) => any;
|
|
66
|
+
/** A seat: a player's in a farm of tokens, a collectible's (its asset) in a farm of collectibles. */
|
|
67
|
+
seat: (farm: any, by: any) => any;
|
|
68
|
+
/** What the project writes about an NFT it has no authority over (its Sheet): `nft` is a Core asset, a Token Metadata mint or a compressed NFT's asset id. */
|
|
69
|
+
sheet: (project: any, nft: any) => any;
|
|
70
|
+
/** A compressed NFT as last proven (`prove_leaf`), read while the leaf is unchanged and its root is still in the tree's change log. */
|
|
71
|
+
leaf: (asset: any) => any;
|
|
72
|
+
/** The root of the traits the project vouches for, under its own `key` (a collection's address, by convention). */
|
|
73
|
+
traits: (project: any, key_: any) => any;
|
|
74
|
+
/** Bubblegum's config of a tree: `[tree]`. */
|
|
75
|
+
treeConfig: (tree: any) => any;
|
|
76
|
+
/** A compressed NFT's asset id: Bubblegum's `["asset", tree, nonce]`, `nonce` the count minted before it. */
|
|
77
|
+
compressedAsset: (tree: any, nonce: any) => any;
|
|
78
|
+
/** A wallet's counts in a project: how many times it bought from each box, crafted each recipe or held tickets in
|
|
79
|
+
* a lottery's round that limits it (`decodeCounts`). */
|
|
80
|
+
counts: (project: any, wallet: any) => any;
|
|
81
|
+
/** Shard `shard` of a grant's limit records: what each wallet, person, badge and voucher key claimed. */
|
|
82
|
+
claims: (grant: any, incarnation: any, shard: any) => any;
|
|
83
|
+
/** Shard `shard` of the rounds a grant paid. */
|
|
84
|
+
rounds: (grant: any, incarnation: any, shard: any) => any;
|
|
85
|
+
/** The program's identity, which signs its requests to the oracle. */
|
|
86
|
+
identity: () => any;
|
|
87
|
+
/** The identity the oracle signs callbacks with: the VRF program's PDA for this program. */
|
|
88
|
+
oracleIdentity: () => any;
|
|
89
|
+
/** The program's ProgramData account (its upgrade authority signs `init_platform`). */
|
|
90
|
+
programData: () => any;
|
|
91
|
+
};
|
|
92
|
+
/** `owner`'s associated token account of `mint` (owner may be a PDA: a project's vault, a pool is not one). */
|
|
93
|
+
export declare const ata: (owner: any, mint: any, tokenProgram?: string) => any;
|
|
94
|
+
/** A project's vault for `mint`: its associated token account, where every open order's payment is held. */
|
|
95
|
+
export declare const vault: (project: any, mint: any, tokenProgram?: string) => any;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/** How long the oracle has to answer before a roll or a draw may be asked again, and a pending order refunded (seconds). */
|
|
2
|
+
export declare const STALE_SECONDS: bigint;
|
|
3
|
+
/** How long after a lottery's first ask the next ask cancels its round, and an asked order holding a payment or an NFT
|
|
4
|
+
* may be refunded (seconds). */
|
|
5
|
+
export declare const LOTTERY_TIMEOUT_SECONDS: bigint;
|
|
6
|
+
/**
|
|
7
|
+
* The earliest an order can be refunded, as `{ slot, at }` (the program wants a later slot than `slot` and a later
|
|
8
|
+
* second than `at`), or null when it never can be as it stands: a failed order from the next slot; a paid order the
|
|
9
|
+
* oracle never answered 10 minutes after it was asked (`STALE_SECONDS`); an asked roll holding a payment or an NFT 7 days
|
|
10
|
+
* after its first ask. A rolled order has an outcome to carry out, and is settled. A waiting roll, or an asked one holding
|
|
11
|
+
* nothing, is asked (again): `rollAskable`.
|
|
12
|
+
*/
|
|
13
|
+
export declare function orderRefundAt(order: any): {
|
|
14
|
+
slot: bigint;
|
|
15
|
+
at: null;
|
|
16
|
+
} | {
|
|
17
|
+
slot: bigint;
|
|
18
|
+
at: bigint;
|
|
19
|
+
} | {
|
|
20
|
+
slot: null;
|
|
21
|
+
at: bigint;
|
|
22
|
+
} | null;
|
|
23
|
+
/** Whether an order can be refunded at `slot` and `now` (Unix seconds, the chain's clock): `orderRefundAt`. */
|
|
24
|
+
export declare function orderRefundable(order: any, slot: any, now: any): boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Whether its player or the project's keys may ask the oracle for a mission's or a recipe's roll at `slot` and `now`
|
|
27
|
+
* (Unix seconds, the chain's clock): never asked, or never answered within `STALE_SECONDS`. Once asked, a later ask comes
|
|
28
|
+
* in a later slot than the last (`SameSlot`: never the same seed twice), so a roll that found nothing in stock and waits
|
|
29
|
+
* again is asked from the next slot on.
|
|
30
|
+
*/
|
|
31
|
+
export declare const rollAskable: (order: any, slot: any, now: any) => boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Whether a contest is off at `now` (Unix seconds), as the program reads its verdict: called off, its result
|
|
34
|
+
* overdue, or short of its least pot once entries closed. Every entry of one that is off takes its money back.
|
|
35
|
+
*/
|
|
36
|
+
export declare function contestOff(contest: any, now: any): boolean;
|
|
37
|
+
/** Whether a lottery round's draw (`round`: its decoded record) was asked for and the oracle has not answered within
|
|
38
|
+
* `STALE_SECONDS` by `now` (Unix seconds, the chain's clock): anyone may ask again. */
|
|
39
|
+
export declare const lotteryDrawStuck: (round: any, now: any) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Whether a lottery round's draw (`round`: its decoded record) was asked for and the oracle has not answered within
|
|
42
|
+
* `LOTTERY_TIMEOUT_SECONDS` of the first ask (asking again doesn't move it) by `now` (Unix seconds, the chain's clock):
|
|
43
|
+
* the next ask of that round (`drawLotteryIx` with its address) cancels it, and every entry is refunded. A round nobody
|
|
44
|
+
* asked to draw is never cancelled.
|
|
45
|
+
*/
|
|
46
|
+
export declare const lotteryCancellable: (round: any, now: any) => boolean;
|
|
47
|
+
/** A farm seat's `earns_until` when nothing ends its earning (i64::MAX): no tier term and no fuel it reads. */
|
|
48
|
+
export declare const NO_END: bigint;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** What a path's first word names (`random::tag`): an entry of a box, a stash's NFT, a lottery's ticket, a fresh trait. */
|
|
2
|
+
export declare const TAG: Readonly<{
|
|
3
|
+
ENTRY: 1;
|
|
4
|
+
STASH: 2;
|
|
5
|
+
LOTTERY: 3;
|
|
6
|
+
TRAIT: 4;
|
|
7
|
+
}>;
|
|
8
|
+
/** The most words a path holds. */
|
|
9
|
+
export declare const MAX_PATH = 8;
|
|
10
|
+
/** A stream of the oracle's 32-byte `answer` at `path` (whole numbers): seed = sha256("loot-roll-v1" | answer | path as
|
|
11
|
+
* u32 little-endian words); its nth number the first 8 bytes, little-endian, of sha256(seed | n as u64 little-endian). */
|
|
12
|
+
export declare function stream(answer: any, path?: any[]): {
|
|
13
|
+
next(): bigint;
|
|
14
|
+
};
|
|
15
|
+
/** A number from 0 to `n` - 1, every one as likely: a draw past the last whole multiple of `n` is drawn again. null for
|
|
16
|
+
* `n` 0. */
|
|
17
|
+
export declare function uniform(s: any, n: any): number | null;
|
|
18
|
+
/** The row `at` lands on, the weights walked in order. null past the last. */
|
|
19
|
+
export declare function walk(weights: any, at: any): any;
|
|
20
|
+
/** A row by weight (a weight of 0 never drawn); null when none weighs anything, or they sum past 64 bits. */
|
|
21
|
+
export declare function weighted(s: any, weights: any): any;
|
|
22
|
+
/** A number from `min` to `max`, both included, every one as likely (either order). */
|
|
23
|
+
export declare function range(s: any, min: any, max: any): any;
|
|
24
|
+
/** A fresh unit's range trait `t` (its place among the item's traits) as the program draws it at the mint: from the
|
|
25
|
+
* order's `answer`, `at` the unit's place in the order's `won`. */
|
|
26
|
+
export declare const rangeTrait: (answer: any, at: any, t: any, min: any, max: any) => any;
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/** The space reserved by a fixed-size account, including its discriminator. */
|
|
2
|
+
export declare function allocationBytes(name: any): any;
|
|
3
|
+
/** The exact bytes of a dynamically allocated account. */
|
|
4
|
+
export declare const accountBytes: (name: any, value: any) => number;
|
|
5
|
+
/** A seat; a loan's hold (with room for its debt); a hold a player asks for, made without one (`Hold::PLAIN`). */
|
|
6
|
+
export declare const ACCOUNT_BYTES: Readonly<{
|
|
7
|
+
Seat: any;
|
|
8
|
+
Loan: any;
|
|
9
|
+
Hold: number;
|
|
10
|
+
}>;
|
|
11
|
+
/** A project's bytes with `collections` collections, as the program sizes the account. */
|
|
12
|
+
export declare const projectBytes: (collections?: number) => number;
|
|
13
|
+
/** The most accounts the oracle's answer to a roll carries (`MAX_CALLBACK_ACCOUNTS`). */
|
|
14
|
+
export declare const MAX_CALLBACK_ACCOUNTS = 21;
|
|
15
|
+
/**
|
|
16
|
+
* The most accounts a roll of `entries` hands the oracle (`catalog::callback_accounts`): the order, the box and the
|
|
17
|
+
* ticket; one for each prize that needs one at the roll (an item, a pool, a stash); and with tokens, the two token
|
|
18
|
+
* programs, the project, and a mint and a vault for each source of tokens.
|
|
19
|
+
*/
|
|
20
|
+
export declare function callbackAccounts(entries: any): number;
|
|
21
|
+
/**
|
|
22
|
+
* How many fresh items' table accounts the oracle's answer to a roll of `entries` can carry (`order::table_budget`):
|
|
23
|
+
* what the box's own accounts leave of `MAX_CALLBACK_ACCOUNTS`. Negative: the box can't be rolled at all.
|
|
24
|
+
*/
|
|
25
|
+
export declare const tableBudget: (entries: any) => number;
|
|
26
|
+
/** The most an order can be (`MAX_ORDER_BYTES`, not in the IDL): a box whose one open's order would be more is refused
|
|
27
|
+
* at its upsert (`BadEntries`). In practice a pack is bounded first by what one oracle answer draws (`drawsFit`). */
|
|
28
|
+
export declare const MAX_ORDER_BYTES = 10240;
|
|
29
|
+
/**
|
|
30
|
+
* The rows of fresh items' tables a draw of each entry writes into its order (`order::rows_of`), walked with the box's
|
|
31
|
+
* table budget as the roll's accounts are (`entryAccounts`: an item whose tables don't fit what is left draws none).
|
|
32
|
+
* `items` maps an item's id to its decoded Item; one left out is taken as not fresh.
|
|
33
|
+
*/
|
|
34
|
+
export declare function entryRows(entries: any, items?: {}): any;
|
|
35
|
+
/**
|
|
36
|
+
* The bytes of an order of `lootBox` with `shares` shares and `opens` opens. With `items` (an item's id to its decoded
|
|
37
|
+
* Item), as `open_box` sizes it (`Order::sized`): each draw at its dearest entry's prizes as the `Won` they become (an
|
|
38
|
+
* item 14 bytes, tokens or an NFT 41, a roll none) and 4 bytes for each table row its fresh items draw now
|
|
39
|
+
* (`entryRows`); its odds and its largest fate. Without `items`, as a roll made inside another call sizes it (a craft,
|
|
40
|
+
* a grant's claim, a mission, a roll lot: `Order::space_for`): the box's whole table budget a draw for a box that
|
|
41
|
+
* gives items. A pack's order grows with its cards.
|
|
42
|
+
*/
|
|
43
|
+
export declare function orderBytes(lootBox: any, shares: number | undefined, opens: number | undefined, items: any): number;
|
|
44
|
+
/**
|
|
45
|
+
* The heap reading a box takes beyond its entries (`order::box_bytes`): its odds, gate, shares, subject, slots and
|
|
46
|
+
* fates, read whole with it, by their bytes and their number. `box`: the box's args, as `upsertBoxIx` takes them.
|
|
47
|
+
*/
|
|
48
|
+
export declare function boxBytes({ odds, gate, shares, subject, slots, fates }: {
|
|
49
|
+
fates?: never[] | undefined;
|
|
50
|
+
gate?: null | undefined;
|
|
51
|
+
odds?: never[] | undefined;
|
|
52
|
+
shares?: never[] | undefined;
|
|
53
|
+
slots?: never[] | undefined;
|
|
54
|
+
subject?: null | undefined;
|
|
55
|
+
}): bigint;
|
|
56
|
+
/**
|
|
57
|
+
* Whether all of `opens` opens of `entries` by `slots` fit one oracle answer (`order::draws_fit`), each draw at the
|
|
58
|
+
* dearest its slot could make, with what is known from the box alone (no table rows, a stash of one group), its `odds`,
|
|
59
|
+
* `shares` and `fates` counted, and `bytes` (`boxBytes`) of heap reading the box takes beyond its entries. `slots` may
|
|
60
|
+
* be a number: that many draws among every entry. The answer's heap counts for a box that rolls, or one sold through
|
|
61
|
+
* the oracle (`oracle`: a box that doesn't roll but one `buy` can't carry, `buyFits`). The program refuses a box whose
|
|
62
|
+
* one open doesn't fit at its upsert, and a purchase that doesn't at `open_box`, where it also reads what the accounts
|
|
63
|
+
* hold (`PackTooLarge`).
|
|
64
|
+
*/
|
|
65
|
+
export declare function drawsFit(entries: any, slots: any, opens?: number, { odds, shares, fates, bytes, oracle }?: {
|
|
66
|
+
bytes?: bigint | undefined;
|
|
67
|
+
fates?: number | undefined;
|
|
68
|
+
odds?: number | undefined;
|
|
69
|
+
oracle?: boolean | undefined;
|
|
70
|
+
shares?: number | undefined;
|
|
71
|
+
}): boolean;
|
|
72
|
+
/**
|
|
73
|
+
* Whether one `buy` of a box that doesn't roll (one entry, given `draws` times: its slots' counts) fits one transaction
|
|
74
|
+
* (`catalog::buy_fits`): its accounts, its instructions and its compute, each prize's at the most it takes. A named NFT
|
|
75
|
+
* is given once at most. A box that doesn't fit sells through the oracle (`open_box`), its answer's heap counted
|
|
76
|
+
* (`drawsFit` with `oracle`), and can't give a roll (`PackTooLarge`). `box`: the box's args.
|
|
77
|
+
*/
|
|
78
|
+
export declare function buyFits(box: any, draws?: any): boolean;
|
|
79
|
+
/** The most program rent and fee one order takes from its player, in lamports (0.01 SOL): a client cap (`opensAnOrder`). */
|
|
80
|
+
export declare const ORDER_COST_CAP = 10000000n;
|
|
81
|
+
/**
|
|
82
|
+
* The most opens of `lootBox` a client puts in one order: what one oracle answer draws (`drawsFit`), and what keeps the
|
|
83
|
+
* order's rent and the player's fee within `ORDER_COST_CAP` (`orderBytes` with `items`, so with the box's shares). At
|
|
84
|
+
* least one: a box whose one open is over the cap is still bought one open an order. A purchase of more is several
|
|
85
|
+
* orders, each its own answer.
|
|
86
|
+
*/
|
|
87
|
+
export declare function opensAnOrder(lootBox: any, { shares, items, rentPerByte }?: {
|
|
88
|
+
items?: {} | undefined;
|
|
89
|
+
rentPerByte?: bigint | undefined;
|
|
90
|
+
shares?: any;
|
|
91
|
+
}): number;
|
|
92
|
+
export declare const LIST_HEAD_BYTES = 7;
|
|
93
|
+
/** A limit record (a wallet's count of a box, a recipe or a lottery round; a grant's claim count): key, count, window, in it. */
|
|
94
|
+
export declare const LIMIT_RECORD_BYTES = 28;
|
|
95
|
+
/** A round a grant paid a wallet: its key alone. */
|
|
96
|
+
export declare const ROUND_RECORD_BYTES = 16;
|
|
97
|
+
/** A contest's entry: of tokens, and of NFTs (the NFT, its place on its side, the picks taken). */
|
|
98
|
+
export declare const CONTEST_ENTRY_BYTES: Readonly<{
|
|
99
|
+
tokens: 43;
|
|
100
|
+
nfts: 83;
|
|
101
|
+
}>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** A leaf: an NFT's address and its traits ([{ key, value }], in order). */
|
|
2
|
+
export declare const traitsLeaf: (nft: any, attributes: any) => Uint8Array<ArrayBuffer>;
|
|
3
|
+
/** Two nodes joined, the smaller first, so a proof needs no left or right. */
|
|
4
|
+
export declare const traitsNode: (a: any, b: any) => Uint8Array<ArrayBuffer>;
|
|
5
|
+
/**
|
|
6
|
+
* The tree of `entries` ([{ nft, attributes }]): { root, proof(nft) → [node, …] bottom up }. A node left without a pair
|
|
7
|
+
* at a level goes up as it is.
|
|
8
|
+
*/
|
|
9
|
+
export declare function traitsTree(entries: any): {
|
|
10
|
+
root: any;
|
|
11
|
+
proof(nft: any): any[];
|
|
12
|
+
};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The transaction a player sends to craft `recipe`, estimated (txsize.mjs): the craft's own accounts, then each
|
|
3
|
+
* line's (craft.rs; a roll's box and order), a compute limit (a big recipe needs more
|
|
4
|
+
* than the default) and, for each token it gives, the player's token account created if missing.
|
|
5
|
+
*/
|
|
6
|
+
export declare function craftSize(recipe: any, m: any, { detail }?: {
|
|
7
|
+
detail?: boolean | undefined;
|
|
8
|
+
}): any;
|
|
9
|
+
/**
|
|
10
|
+
* The transaction a player sends to open box `b`, estimated (txsize.mjs) as a wallet sends it: its compute limit and
|
|
11
|
+
* price, the player's token account of the box's currency created if missing (and for SOL, the wrap around the
|
|
12
|
+
* purchase), then `open_box` (order.rs): its own accounts (an NFT slot the program leaves empty stands in as the
|
|
13
|
+
* program's address), an account for each outcome that wins something, each prize mint with the game's vault for it,
|
|
14
|
+
* and the NFT the player shows for a gate or odds (at its largest, a Token Metadata one's mint, metadata, token
|
|
15
|
+
* account and Sheet).
|
|
16
|
+
*/
|
|
17
|
+
export declare function openBoxSize(b: any, m: any, { detail }?: {
|
|
18
|
+
detail?: boolean | undefined;
|
|
19
|
+
}): any;
|
|
20
|
+
/** The longest proof a compressed NFT's tree can leave: Bubblegum v2 refuses a smaller canopy. */
|
|
21
|
+
export declare const LONGEST_PROOF = 17;
|
|
22
|
+
/** How many accounts a transaction may lock: so the most a settle can name. */
|
|
23
|
+
export declare const ACCOUNT_LOCKS = 64;
|
|
24
|
+
/** A v0 transaction's lookup table and the lookup-table program: the transaction deactivates the table it loads from. */
|
|
25
|
+
export declare const TABLE_LOCKS = 2;
|
|
26
|
+
/**
|
|
27
|
+
* The accounts a settle of box `b` locks for outcome `o`, counted as the client builds it (`settleIx`, sent by anyone
|
|
28
|
+
* after a Compute Budget instruction, in a v0 transaction with a lookup table, the Sheets of NFTs it doesn't write left
|
|
29
|
+
* out), at its largest: { count, memo, picks, corePicks, payees, compressedSubject }. `memo`: a payee the project
|
|
30
|
+
* didn't pick (a holder's share, a buyer's chosen wallet, a wallet's) can turn on required memos for their own
|
|
31
|
+
* Token-2022 account at any time, and every settle then passes the memo program, one account more.
|
|
32
|
+
* Matches the program's own measurements: a roll on a compressed NFT of a 17-node
|
|
33
|
+
* proof is 41 with nothing won; each prize of tokens in a mint of its own 3, each holder's share 3, a hook asking
|
|
34
|
+
* one account of its own 3, a compressed NFT picked from a stash 22, a Core one of its own collection 2 (Core 1).
|
|
35
|
+
*/
|
|
36
|
+
export declare function settleAccounts(b: any, o: any, m: any, { proof }?: {
|
|
37
|
+
proof?: number | undefined;
|
|
38
|
+
}): {
|
|
39
|
+
count: number;
|
|
40
|
+
keys: string[];
|
|
41
|
+
memo: boolean;
|
|
42
|
+
picks: number;
|
|
43
|
+
corePicks: number;
|
|
44
|
+
payees: number;
|
|
45
|
+
compressedSubject: boolean;
|
|
46
|
+
};
|
|
47
|
+
/** The compute a transaction may have: no settle can take more. */
|
|
48
|
+
export declare const MAX_COMPUTE_UNITS = 1400000;
|
|
49
|
+
/**
|
|
50
|
+
* The compute a settle of box `b`'s outcome `o` takes, estimated at its most from measurements on devnet's
|
|
51
|
+
* features: about 60,000 units for the settle itself, 250,000 for each Token Metadata
|
|
52
|
+
* NFT it moves (a pNFT's, with its rule set), 100,000 for a compressed one (or the NFT it rolls on, of a collection
|
|
53
|
+
* not the game's own), 60,000 for a Core one, 40,000 for each collectible it mints and 20,000 for a roll it makes, and
|
|
54
|
+
* 30,000 for each token payout (a prize, each share of the price, the treasury's), twice that in a coin with a
|
|
55
|
+
* transfer hook. Three pNFTs of stashes, the NFT rolled on and four holders' shares (measured 942,389 to 985,942)
|
|
56
|
+
* come out at about 1,170,000.
|
|
57
|
+
*/
|
|
58
|
+
export declare function settleUnits(b: any, o: any, m: any): number;
|
|
59
|
+
/**
|
|
60
|
+
* The settle of box `b`'s outcome `o` as xsolana's senders build it (js/play, the keeper's sweep: `settleIx` after a
|
|
61
|
+
* compute limit, and a heap frame for three NFT moves or more), estimated (txsize.mjs) at its largest:
|
|
62
|
+
* { legacy: its bytes as a legacy transaction, tableRent: the lamports a lookup table of its accounts holds while it
|
|
63
|
+
* is open, locks: the accounts it locks (`settleAccounts`) }. A settle bigger than a legacy transaction goes as v0,
|
|
64
|
+
* its accounts loaded from a table its sender makes first.
|
|
65
|
+
*/
|
|
66
|
+
export declare function settleSize(b: any, o: any, m: any): {
|
|
67
|
+
legacy: any;
|
|
68
|
+
tableRent: bigint;
|
|
69
|
+
locks: number;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* The transaction a player sends to buy box `b` (buy.rs), estimated as `openBoxSize` is: its compute limit and price,
|
|
73
|
+
* the player's token account of the currency created if missing, then `buy`: its own accounts, what the gate takes
|
|
74
|
+
* (a list's proof, or the NFT shown), the accounts its shares name, and each prize's (prize.rs; a roll's box and
|
|
75
|
+
* order), for each draw of a sale (a fixed amount of tokens once). `count`: the sales in one purchase.
|
|
76
|
+
*/
|
|
77
|
+
export declare function buySize(b: any, m: any, { detail, count }?: {
|
|
78
|
+
count?: number | undefined;
|
|
79
|
+
detail?: boolean | undefined;
|
|
80
|
+
}): any;
|
|
81
|
+
/** The address a plan stands in for the owner's wallet before one connects (plan.mjs `placeholderContext`). Nobody
|
|
82
|
+
* holds its key, and the approval page calls it "your wallet" until a wallet connects: no spec may name it. */
|
|
83
|
+
export declare const STAND_IN_OWNER: string;
|
|
84
|
+
/**
|
|
85
|
+
* Checks an economy spec. `now` (Unix seconds) dates "publish".
|
|
86
|
+
* Returns { ok, refusals: [{ code, where, message, fix }], warnings: [{ code, where, message, fix? }] }.
|
|
87
|
+
*/
|
|
88
|
+
export declare function check(economy: any, { network, now }?: {
|
|
89
|
+
network?: string | undefined;
|
|
90
|
+
now?: number | undefined;
|
|
91
|
+
}): {
|
|
92
|
+
ok: boolean;
|
|
93
|
+
refusals: any[];
|
|
94
|
+
warnings: any[];
|
|
95
|
+
};
|
|
96
|
+
/** A one-line summary for each refusal and warning, as a person reads them. */
|
|
97
|
+
export declare function describe({ refusals, warnings }: {
|
|
98
|
+
refusals: any;
|
|
99
|
+
warnings: any;
|
|
100
|
+
}): string;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/** Setup cost from a plan (plan.mjs `plan`). */
|
|
2
|
+
export declare function setupCost(plan: any, economy: any): {
|
|
3
|
+
accounts: any;
|
|
4
|
+
rentSol: any;
|
|
5
|
+
programFeesSol: any;
|
|
6
|
+
networkFeesSol: any;
|
|
7
|
+
seeds: {};
|
|
8
|
+
totalSol: any;
|
|
9
|
+
transactions: any;
|
|
10
|
+
approvals: any;
|
|
11
|
+
notes: string[];
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* What each action costs whoever signs it while the economy runs: games.fun's fee, the network's, and for anything
|
|
15
|
+
* that asks MagicBlock's oracle for a random number (a box's open, a lottery's draw, the authority's `roll`) the
|
|
16
|
+
* oracle's own fee (`oracleSol`, model.mjs ORACLE_FEE).
|
|
17
|
+
*/
|
|
18
|
+
export declare function actionCosts(economy: any, { now }?: Readonly<Record<string, any>>): any[];
|
|
19
|
+
/** Setup and play costs for a spec, or its refusals. */
|
|
20
|
+
/** `only` and `live`: a change to a live economy, priced as only what it publishes (live.mjs `changedParts`). */
|
|
21
|
+
export declare function cost(economy: any, { now, only, live }?: {
|
|
22
|
+
live?: null | undefined;
|
|
23
|
+
now?: number | undefined;
|
|
24
|
+
only?: null | undefined;
|
|
25
|
+
}): {
|
|
26
|
+
ok: boolean;
|
|
27
|
+
refusals: any[];
|
|
28
|
+
warnings: any[];
|
|
29
|
+
steps?: undefined;
|
|
30
|
+
transactions?: undefined;
|
|
31
|
+
approvals?: undefined;
|
|
32
|
+
freshKeys?: undefined;
|
|
33
|
+
} | {
|
|
34
|
+
refusals?: undefined;
|
|
35
|
+
ok: boolean;
|
|
36
|
+
warnings: any[];
|
|
37
|
+
steps: any[];
|
|
38
|
+
transactions: {
|
|
39
|
+
signer: string;
|
|
40
|
+
steps: any[];
|
|
41
|
+
built: any[];
|
|
42
|
+
instructions: any;
|
|
43
|
+
signers: any[];
|
|
44
|
+
alone: boolean;
|
|
45
|
+
}[];
|
|
46
|
+
approvals: number;
|
|
47
|
+
freshKeys: any[];
|
|
48
|
+
} | {
|
|
49
|
+
ok: boolean;
|
|
50
|
+
setup: {
|
|
51
|
+
accounts: any;
|
|
52
|
+
rentSol: any;
|
|
53
|
+
programFeesSol: any;
|
|
54
|
+
networkFeesSol: any;
|
|
55
|
+
seeds: {};
|
|
56
|
+
totalSol: any;
|
|
57
|
+
transactions: any;
|
|
58
|
+
approvals: any;
|
|
59
|
+
notes: string[];
|
|
60
|
+
};
|
|
61
|
+
actions: any[];
|
|
62
|
+
fees: {
|
|
63
|
+
playerSol: any;
|
|
64
|
+
projectSol: any;
|
|
65
|
+
oracleSol: any;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
/** The cost in plain words. */
|
|
69
|
+
export declare function explainCost(c: any): string;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Every worked example: { name, spec }. */
|
|
2
|
+
export declare function examples(): any;
|
|
3
|
+
/** One example's whole spec, by name. */
|
|
4
|
+
export declare function example(name: any): any;
|
|
5
|
+
export declare const ideas: () => any;
|
|
6
|
+
/** The parts a spec uses, and features it shows. */
|
|
7
|
+
export declare function partsUsed(spec: any): string[];
|
|
8
|
+
/**
|
|
9
|
+
* What loot can't do exactly that `query` asks for, with the nearest versions: the closest few. `atLeast`: only limits
|
|
10
|
+
* that match at least this well (search passes the best matching capability's score: when a capability matches the
|
|
11
|
+
* words better, its "how" is the answer and a weaker "can't" beside it only misleads; a tie shows both).
|
|
12
|
+
*/
|
|
13
|
+
export declare function limits(query: any, { limit, atLeast }?: {
|
|
14
|
+
atLeast?: number | undefined;
|
|
15
|
+
limit?: number | undefined;
|
|
16
|
+
}): any;
|
|
17
|
+
/** Asks that look impossible but are one field or a short combination, closest to `query`. */
|
|
18
|
+
export declare function hows(query: any, { limit }?: {
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}): any;
|
|
21
|
+
/** The examples, ideas, hows and limits closest to `query`. */
|
|
22
|
+
export declare function search(query: any, { limit, fit }?: Readonly<Record<string, any>>): {
|
|
23
|
+
examples: any;
|
|
24
|
+
ideas: any;
|
|
25
|
+
hows: any;
|
|
26
|
+
limits: any;
|
|
27
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export declare function explainEconomy(economy: any, { now }?: {
|
|
2
|
+
now?: number | undefined;
|
|
3
|
+
}): {
|
|
4
|
+
ok: boolean;
|
|
5
|
+
refusals: any[];
|
|
6
|
+
warnings: any[];
|
|
7
|
+
text: string;
|
|
8
|
+
needsAuthority?: undefined;
|
|
9
|
+
chance?: undefined;
|
|
10
|
+
setupSol?: undefined;
|
|
11
|
+
} | {
|
|
12
|
+
refusals?: undefined;
|
|
13
|
+
ok: boolean;
|
|
14
|
+
text: string;
|
|
15
|
+
warnings: any[];
|
|
16
|
+
needsAuthority: boolean;
|
|
17
|
+
chance: boolean;
|
|
18
|
+
setupSol: any;
|
|
19
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
/** Each part: what it is for, who acts at play time and its fee, and the nested shapes worth showing. */
|
|
2
|
+
export declare const PARTS: {
|
|
3
|
+
tokens: {
|
|
4
|
+
def: string;
|
|
5
|
+
says: string;
|
|
6
|
+
acts: string;
|
|
7
|
+
};
|
|
8
|
+
currency: {
|
|
9
|
+
says: string;
|
|
10
|
+
};
|
|
11
|
+
collection: {
|
|
12
|
+
def: string;
|
|
13
|
+
says: string;
|
|
14
|
+
};
|
|
15
|
+
items: {
|
|
16
|
+
def: string;
|
|
17
|
+
nested: string[];
|
|
18
|
+
says: string;
|
|
19
|
+
acts: string;
|
|
20
|
+
};
|
|
21
|
+
pools: {
|
|
22
|
+
def: string;
|
|
23
|
+
says: string;
|
|
24
|
+
acts: string;
|
|
25
|
+
};
|
|
26
|
+
stashes: {
|
|
27
|
+
def: string;
|
|
28
|
+
says: string;
|
|
29
|
+
acts: string;
|
|
30
|
+
};
|
|
31
|
+
boxes: {
|
|
32
|
+
def: string;
|
|
33
|
+
nested: string[];
|
|
34
|
+
says: string;
|
|
35
|
+
acts: string;
|
|
36
|
+
};
|
|
37
|
+
payments: {
|
|
38
|
+
def: string;
|
|
39
|
+
nested: string[];
|
|
40
|
+
says: string;
|
|
41
|
+
acts: string;
|
|
42
|
+
};
|
|
43
|
+
recipes: {
|
|
44
|
+
def: string;
|
|
45
|
+
nested: string[];
|
|
46
|
+
says: string;
|
|
47
|
+
acts: string;
|
|
48
|
+
};
|
|
49
|
+
schedules: {
|
|
50
|
+
def: string;
|
|
51
|
+
says: string;
|
|
52
|
+
acts: string;
|
|
53
|
+
};
|
|
54
|
+
lotteries: {
|
|
55
|
+
def: string;
|
|
56
|
+
nested: string[];
|
|
57
|
+
says: string;
|
|
58
|
+
acts: string;
|
|
59
|
+
};
|
|
60
|
+
farms: {
|
|
61
|
+
def: string;
|
|
62
|
+
nested: string[];
|
|
63
|
+
says: string;
|
|
64
|
+
acts: string;
|
|
65
|
+
};
|
|
66
|
+
contests: {
|
|
67
|
+
def: string;
|
|
68
|
+
nested: string[];
|
|
69
|
+
says: string;
|
|
70
|
+
acts: string;
|
|
71
|
+
};
|
|
72
|
+
auctions: {
|
|
73
|
+
def: string;
|
|
74
|
+
nested: string[];
|
|
75
|
+
says: string;
|
|
76
|
+
acts: string;
|
|
77
|
+
};
|
|
78
|
+
holds: {
|
|
79
|
+
def: string;
|
|
80
|
+
says: string;
|
|
81
|
+
acts: string;
|
|
82
|
+
};
|
|
83
|
+
grants: {
|
|
84
|
+
def: string;
|
|
85
|
+
nested: string[];
|
|
86
|
+
says: string;
|
|
87
|
+
acts: string;
|
|
88
|
+
};
|
|
89
|
+
decisions: {
|
|
90
|
+
def: string;
|
|
91
|
+
says: string;
|
|
92
|
+
acts: string;
|
|
93
|
+
};
|
|
94
|
+
keys: {
|
|
95
|
+
says: string;
|
|
96
|
+
};
|
|
97
|
+
scenario: {
|
|
98
|
+
def: string;
|
|
99
|
+
says: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
export declare const CONVENTIONS: string[];
|
|
103
|
+
/**
|
|
104
|
+
* What no part of loot does, and the combinations that come closest: { what, words (to match a person's own words),
|
|
105
|
+
* why, nearest: [the version, and what it gives up] }. A limit is never the end of the answer: say what is missing,
|
|
106
|
+
* then offer the nearest versions with their numbers, best first, and build the one the person picks. A feature that
|
|
107
|
+
* ships later moves its entry to HOW.
|
|
108
|
+
*/
|
|
109
|
+
export declare const CANNOT: {
|
|
110
|
+
what: string;
|
|
111
|
+
words: string;
|
|
112
|
+
why: string;
|
|
113
|
+
nearest: string[];
|
|
114
|
+
}[];
|
|
115
|
+
/**
|
|
116
|
+
* Asks that look impossible but are one field or a short combination: { what, words, how }. Shown by xsolana_examples when a
|
|
117
|
+
* person's words match.
|
|
118
|
+
*/
|
|
119
|
+
export declare const HOW: {
|
|
120
|
+
what: string;
|
|
121
|
+
words: string;
|
|
122
|
+
how: string;
|
|
123
|
+
}[];
|
|
124
|
+
/** The parts (one, or all) with their fields from the schema. */
|
|
125
|
+
export declare function catalog(only: any): {
|
|
126
|
+
part: string;
|
|
127
|
+
type: any;
|
|
128
|
+
says: string;
|
|
129
|
+
atPlayTime?: any;
|
|
130
|
+
fields: {
|
|
131
|
+
name: string;
|
|
132
|
+
type: any;
|
|
133
|
+
required?: boolean | undefined;
|
|
134
|
+
default?: any;
|
|
135
|
+
says?: any;
|
|
136
|
+
}[];
|
|
137
|
+
nested?: any;
|
|
138
|
+
}[];
|
|
139
|
+
/** The guide in words: every part (or one, with its nested shapes), the conventions and what loot cannot do. */
|
|
140
|
+
export declare function guideText(only: any): string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Each legal flag's sentence, for the person who approves, by the checker's warning code. */
|
|
2
|
+
export declare const LEGAL: Readonly<{
|
|
3
|
+
'W-CHANCE-PRIZE': "Players pay for a chance at money (a box or a lottery that pays a prize, a bet on an outcome). That is gambling in many places: before real money, get a lawyer, and gate it by age and region.";
|
|
4
|
+
'W-CHANCE-ITEMS': "Players pay for random items they can resell (a loot box). Some places treat that as gambling and many require the odds shown: show them on the page, and get a lawyer before real money.";
|
|
5
|
+
'W-AUCTION-SHILL': "Anyone, the seller included, can bid to push an auction’s price up (shill bidding): a reserve is the honest way to set a floor.";
|
|
6
|
+
'W-REVENUE-SHARE': "Stakers are paid from what players spend, which regulators look at when they decide whether a token is a security: before real money, get a lawyer, or pay rewards from emissions instead.";
|
|
7
|
+
}>;
|
|
8
|
+
/** The legal flags a checker verdict raises, each once, in the order the checker raised them: [{ code, says }]. */
|
|
9
|
+
export declare const legalFlags: (verdict: any) => {
|
|
10
|
+
code: any;
|
|
11
|
+
says: any;
|
|
12
|
+
}[];
|