@provable-games/budokan-sdk 0.1.24 → 0.1.26
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/dist/index.cjs +610 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +307 -3
- package/dist/index.d.ts +307 -3
- package/dist/index.js +588 -5
- package/dist/index.js.map +1 -1
- package/dist/{player-C2GE9Lop.d.cts → player-CbAYHoW8.d.cts} +49 -7
- package/dist/{player-C2GE9Lop.d.ts → player-CbAYHoW8.d.ts} +49 -7
- package/dist/react.cjs +163 -4
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +163 -4
- package/dist/react.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { T as Tournament, P as PrizeAggregation, a as Prize, b as PaginatedResult, Q as QualificationEntry, R as Registration, c as RewardClaim, d as RewardClaimSummary, e as TournamentListParams, f as PlatformStats, g as PrizeStats, W as WSSubscribeOptions, h as WSEventHandler } from './player-
|
|
2
|
-
export { B as BudokanClient,
|
|
1
|
+
import { T as Tournament, P as PrizeAggregation, a as Prize, b as PaginatedResult, Q as QualificationEntry, R as Registration, c as RewardClaim, d as RewardClaimSummary, e as TournamentListParams, f as PlatformStats, g as PrizeStats, W as WSSubscribeOptions, h as WSEventHandler, i as TokenPrize, E as ExtensionPrize$1, j as PlayerPlacement, k as Phase } from './player-CbAYHoW8.js';
|
|
2
|
+
export { B as BudokanClient, l as BudokanClientConfig, C as ConnectionMode, m as ConnectionStatus, n as ConnectionStatusState, D as DataSource, o as Erc20Prize, p as Erc721Prize, G as GameConfig, L as LeaderboardConfig, q as LeaderboardEntry, r as PlayerRewards, S as Schedule, s as WSChannel, t as WSEventMessage, u as WSMessage, v as WSSubscribeMessage, w as WSUnsubscribeMessage, x as createBudokanClient } from './player-CbAYHoW8.js';
|
|
3
|
+
import { ExtensionPrize, PrizeLike, Prize as Prize$1 } from '@provable-games/metagame-sdk';
|
|
3
4
|
export { EntryFee } from '@provable-games/metagame-sdk';
|
|
4
5
|
import 'starknet';
|
|
5
6
|
|
|
@@ -180,6 +181,80 @@ declare function camelToSnake<T>(obj: unknown): T;
|
|
|
180
181
|
|
|
181
182
|
declare function withRetry<T>(fn: () => Promise<T>, attempts?: number, delay?: number): Promise<T>;
|
|
182
183
|
|
|
184
|
+
type MetagameTokenPrize = Prize$1;
|
|
185
|
+
type MetagameExtensionPrize = ExtensionPrize;
|
|
186
|
+
type MetagamePrizeLike = PrizeLike;
|
|
187
|
+
declare function isRawTokenPrize(prize: Prize): prize is TokenPrize;
|
|
188
|
+
declare function isRawExtensionPrize(prize: Prize): prize is ExtensionPrize$1;
|
|
189
|
+
declare function isTokenPrize(prize: Prize): prize is TokenPrize;
|
|
190
|
+
declare function isExtensionPrize(prize: Prize): prize is ExtensionPrize$1;
|
|
191
|
+
/**
|
|
192
|
+
* Returns true when a prize is a valid Budokan token/extension prize and has a
|
|
193
|
+
* hydrated leaderboard position suitable for the metagame prize shape.
|
|
194
|
+
*/
|
|
195
|
+
declare function isMetagameAdaptablePrize(prize: Prize): prize is TokenPrize | ExtensionPrize$1;
|
|
196
|
+
/**
|
|
197
|
+
* Returns validated raw token prizes. Extension records are skipped without
|
|
198
|
+
* validation; malformed `erc20`/`erc721` records throw instead of being
|
|
199
|
+
* silently dropped. RPC records with `payoutPosition === 0` are returned here
|
|
200
|
+
* for raw token-prize visibility.
|
|
201
|
+
*/
|
|
202
|
+
declare function getRawTokenPrizes(prizes: readonly Prize[]): TokenPrize[];
|
|
203
|
+
/**
|
|
204
|
+
* Returns validated hydrated token prizes. Extension records are skipped
|
|
205
|
+
* without validation, and valid raw token prizes with `payoutPosition === 0`
|
|
206
|
+
* are skipped; malformed `erc20`/`erc721` records throw instead of being
|
|
207
|
+
* silently dropped.
|
|
208
|
+
*/
|
|
209
|
+
declare function getTokenPrizes(prizes: readonly Prize[]): TokenPrize[];
|
|
210
|
+
/**
|
|
211
|
+
* Converts a guard-validated Budokan token prize into the Metagame SDK token
|
|
212
|
+
* prize shape. Metagame token prizes do not carry Budokan distribution fields,
|
|
213
|
+
* so distributed ERC20 prizes are represented by their aggregate `amount` at
|
|
214
|
+
* `payoutPosition`; use the original Budokan `Prize` for payout-split math.
|
|
215
|
+
* For ERC721 prizes, metagame-sdk@0.1.13 uses `amount` to carry the token ID.
|
|
216
|
+
* Throws when `payoutPosition` is zero because the RPC path uses zero for
|
|
217
|
+
* unhydrated token-prize positions and metagame positions are leaderboard slots.
|
|
218
|
+
*/
|
|
219
|
+
declare function toMetagameTokenPrize(prize: TokenPrize): MetagameTokenPrize;
|
|
220
|
+
/**
|
|
221
|
+
* Converts a guard-validated Budokan extension prize into the Metagame SDK
|
|
222
|
+
* extension-prize shape. Throws when `payoutPosition` is zero because metagame
|
|
223
|
+
* positions are leaderboard slots and the RPC path uses zero for unhydrated
|
|
224
|
+
* prize positions.
|
|
225
|
+
*/
|
|
226
|
+
declare function toMetagameExtensionPrize(prize: ExtensionPrize$1): MetagameExtensionPrize;
|
|
227
|
+
/**
|
|
228
|
+
* Converts supported Budokan prize variants into Metagame SDK prize shapes.
|
|
229
|
+
* Throws when a prize has malformed fields or an unhydrated payout position.
|
|
230
|
+
* Raw-but-valid zero-position prizes throw the unhydrated-position error.
|
|
231
|
+
* See `toMetagameTokenPrize` for token prize distribution behavior.
|
|
232
|
+
*/
|
|
233
|
+
declare function toMetagamePrize(prize: Prize): MetagamePrizeLike;
|
|
234
|
+
/**
|
|
235
|
+
* Non-throwing metagame adapter. Returns null for malformed prize records and
|
|
236
|
+
* for valid RPC-sourced prizes whose `payoutPosition` is not hydrated yet.
|
|
237
|
+
*/
|
|
238
|
+
declare function tryToMetagamePrize(prize: Prize): MetagamePrizeLike | null;
|
|
239
|
+
/**
|
|
240
|
+
* Converts supported Budokan prize variants into Metagame SDK prize shapes.
|
|
241
|
+
* Throws when any prize has malformed fields or an unhydrated payout position.
|
|
242
|
+
* See `toMetagameTokenPrize` for token prize distribution behavior.
|
|
243
|
+
*/
|
|
244
|
+
declare function toMetagamePrizes(prizes: readonly Prize[]): MetagamePrizeLike[];
|
|
245
|
+
/**
|
|
246
|
+
* Non-throwing batch metagame adapter. Skips malformed records and valid
|
|
247
|
+
* RPC-sourced prizes whose `payoutPosition` is not hydrated yet.
|
|
248
|
+
*/
|
|
249
|
+
declare function tryToMetagamePrizes(prizes: readonly Prize[]): MetagamePrizeLike[];
|
|
250
|
+
/**
|
|
251
|
+
* Converts Budokan token prizes into Metagame SDK token prize shapes. Extension
|
|
252
|
+
* records are skipped without validation. Throws for malformed token records
|
|
253
|
+
* and unhydrated token positions. See `toMetagameTokenPrize` for distribution
|
|
254
|
+
* behavior.
|
|
255
|
+
*/
|
|
256
|
+
declare function toMetagameTokenPrizes(prizes: readonly Prize[]): MetagameTokenPrize[];
|
|
257
|
+
|
|
183
258
|
interface ChainConfig {
|
|
184
259
|
rpcUrl: string;
|
|
185
260
|
apiBaseUrl: string;
|
|
@@ -517,6 +592,8 @@ type RewardType = {
|
|
|
517
592
|
kind: "entry_fee_tournament_creator";
|
|
518
593
|
} | {
|
|
519
594
|
kind: "entry_fee_game_creator";
|
|
595
|
+
} | {
|
|
596
|
+
kind: "entry_fee_protocol_fee";
|
|
520
597
|
} | {
|
|
521
598
|
kind: "entry_fee_refund";
|
|
522
599
|
tokenId: string;
|
|
@@ -619,6 +696,233 @@ interface ReceiptWithEvents {
|
|
|
619
696
|
*/
|
|
620
697
|
declare function parseTournamentIdFromReceipt(receipt: ReceiptWithEvents, budokanAddress: string): bigint | undefined;
|
|
621
698
|
|
|
699
|
+
/**
|
|
700
|
+
* Pure distribution + entry-fee math for Budokan.
|
|
701
|
+
*
|
|
702
|
+
* This module is the single source of truth for "how much does position N
|
|
703
|
+
* get?" — the same arithmetic the budokan client used to duplicate in
|
|
704
|
+
* `computeEntryFeeAmount` / `computePrizePercentages` / `processEntryFeePrizes`.
|
|
705
|
+
*
|
|
706
|
+
* All functions are pure: no I/O, no contract calls, no `Date.now()`. Token
|
|
707
|
+
* amounts are `bigint` in smallest token units; basis-point shares are plain
|
|
708
|
+
* numbers (0–10000). USD conversion, decimals, and formatting stay in the
|
|
709
|
+
* consumer.
|
|
710
|
+
*
|
|
711
|
+
* Distribution percentages are computed with the shared `calculateDistribution`
|
|
712
|
+
* from `@provable-games/metagame-sdk` — the *exact* function the budokan client
|
|
713
|
+
* renders payouts with — so amounts match between the SDK, budokan.gg, and any
|
|
714
|
+
* third-party integration. (The final on-chain claim amount is computed by the
|
|
715
|
+
* contract's fixed-point math; these values are the canonical client-side
|
|
716
|
+
* estimate, suitable for display and for filtering unclaimable zero slices.)
|
|
717
|
+
*
|
|
718
|
+
* Entry-fee split semantics follow the contract
|
|
719
|
+
* (`packages/rewards/src/budokan_rewards.cairo::_claim_entry_fee_position`):
|
|
720
|
+
* the position pool is the entry-fee pool **minus** the tournament-creator,
|
|
721
|
+
* game-creator, refund, *and protocol-fee* shares. The client historically
|
|
722
|
+
* omitted the protocol fee here and over-counted the position pool — this
|
|
723
|
+
* module fixes that by taking `protocolFeeShare` as an explicit input.
|
|
724
|
+
*/
|
|
725
|
+
|
|
726
|
+
type DistributionKind = "linear" | "exponential" | "uniform" | "custom" | "unknown";
|
|
727
|
+
interface ParsedDistribution {
|
|
728
|
+
type: DistributionKind;
|
|
729
|
+
/**
|
|
730
|
+
* Raw weight as stored on-chain (scaled ×10 — e.g. `10` = 1.0). `0` for
|
|
731
|
+
* Uniform/Custom. `distributionPercentages` divides by 10 internally.
|
|
732
|
+
*/
|
|
733
|
+
weight: number;
|
|
734
|
+
/** For Custom distributions, the raw u16 basis-point shares (one per paid position). */
|
|
735
|
+
customWeights?: number[];
|
|
736
|
+
}
|
|
737
|
+
/**
|
|
738
|
+
* Normalize the many wire shapes of the Cairo `Distribution` enum into a flat
|
|
739
|
+
* `{ type, weight, customWeights }`. Handles:
|
|
740
|
+
* - starknet.js v9 CairoCustomEnum: `{ variant: { Exponential: 100 } }`
|
|
741
|
+
* - SDK / PascalCase: `{ Exponential: 100 }`
|
|
742
|
+
* - lower-cased JSON (indexer/API): `{ exponential: 100 }`
|
|
743
|
+
* - explicit `{ type, weight }`
|
|
744
|
+
* - `Option`-wrapped weights (`{ Some: n }`)
|
|
745
|
+
*
|
|
746
|
+
* Unknown / missing input → `{ type: "unknown", weight: 0 }`, which
|
|
747
|
+
* `distributionPercentages` treats as Uniform.
|
|
748
|
+
*/
|
|
749
|
+
declare function parseDistribution(dist: unknown): ParsedDistribution;
|
|
750
|
+
/**
|
|
751
|
+
* Build a `ParsedDistribution` from the flat fields the SDK carries on a
|
|
752
|
+
* sponsored `Prize` (`distributionType` / `distributionWeight` /
|
|
753
|
+
* `distributionShares`).
|
|
754
|
+
*/
|
|
755
|
+
declare function prizeDistribution(prize: Pick<Prize, "distributionType" | "distributionWeight" | "distributionShares">): ParsedDistribution;
|
|
756
|
+
/**
|
|
757
|
+
* Per-position percentages (each 0–100, summing to ~100) for a distribution
|
|
758
|
+
* across `count` paid positions. Generalizes the client's
|
|
759
|
+
* `computeEntryFeePercentages` / `computePrizePercentages`.
|
|
760
|
+
*
|
|
761
|
+
* - linear/exponential: delegates to metagame-sdk's `calculateDistribution`
|
|
762
|
+
* (weight is divided by 10 to undo the on-chain ×10 scaling).
|
|
763
|
+
* - uniform / unknown: equal split.
|
|
764
|
+
* - custom: raw basis-point shares ÷ 100; falls back to uniform when the
|
|
765
|
+
* shares array length doesn't match `count`.
|
|
766
|
+
*/
|
|
767
|
+
declare function distributionPercentages(dist: ParsedDistribution, count: number): number[];
|
|
768
|
+
/** Input shape for entry-fee split math. Mirrors the on-chain built-in `EntryFee`
|
|
769
|
+
* plus the per-tournament protocol-fee snapshot (carried on `Tournament`). */
|
|
770
|
+
interface EntryFeeSplitInput {
|
|
771
|
+
/** Per-entry fee in smallest token units (decimal string or bigint). */
|
|
772
|
+
amount: string | bigint;
|
|
773
|
+
/** Number of paid entries collected. */
|
|
774
|
+
entryCount: number;
|
|
775
|
+
/** Basis-point shares (0–10000). Omitted / null → 0. */
|
|
776
|
+
tournamentCreatorShare?: number | null;
|
|
777
|
+
gameCreatorShare?: number | null;
|
|
778
|
+
refundShare?: number | null;
|
|
779
|
+
/** Protocol-fee bps snapshotted for the tournament (`Tournament.protocolFeeShare`). */
|
|
780
|
+
protocolFeeShare?: number | null;
|
|
781
|
+
}
|
|
782
|
+
interface EntryFeeSplit {
|
|
783
|
+
/** Total fee pool = amount × entryCount. */
|
|
784
|
+
total: bigint;
|
|
785
|
+
/** Pool shared across leaderboard positions = floor(availableShare × total / 10000). */
|
|
786
|
+
positionPool: bigint;
|
|
787
|
+
tournamentCreator: bigint;
|
|
788
|
+
gameCreator: bigint;
|
|
789
|
+
refund: bigint;
|
|
790
|
+
protocolFee: bigint;
|
|
791
|
+
/** Basis points left for positions after fixed shares (clamped ≥ 0). */
|
|
792
|
+
availableShareBps: number;
|
|
793
|
+
}
|
|
794
|
+
/**
|
|
795
|
+
* Split a built-in entry-fee pool into its on-chain components. The position
|
|
796
|
+
* pool reserves the tournament-creator, game-creator, refund, *and* protocol
|
|
797
|
+
* fee — matching `_claim_entry_fee_position`'s `available_share`.
|
|
798
|
+
*
|
|
799
|
+
* Note: each component is floored independently (sub-wei dust may not sum to
|
|
800
|
+
* `total`, exactly as on-chain).
|
|
801
|
+
*/
|
|
802
|
+
declare function entryFeeSplit(input: EntryFeeSplitInput): EntryFeeSplit;
|
|
803
|
+
/** The on-chain `EntryFee` distribution shape this module needs to size a
|
|
804
|
+
* position payout. A superset of `EntryFeeSplitInput`. */
|
|
805
|
+
interface EntryFeePositionInput extends EntryFeeSplitInput {
|
|
806
|
+
/** Raw on-chain `Distribution` (any wire shape — parsed internally). */
|
|
807
|
+
distribution: unknown;
|
|
808
|
+
/** Number of paid positions (`distribution_count`). */
|
|
809
|
+
distributionCount: number;
|
|
810
|
+
}
|
|
811
|
+
/**
|
|
812
|
+
* Amount a single leaderboard `position` (1-indexed) claims from the entry-fee
|
|
813
|
+
* pool. Generalizes the client's `computeEntryFeeAmount` — and fixes its
|
|
814
|
+
* protocol-fee over-count by reserving `protocolFeeShare`.
|
|
815
|
+
*
|
|
816
|
+
* Returns `0n` when the position is outside the paid range, the pool is empty,
|
|
817
|
+
* or the share rounds to zero (the contract makes such positions unclaimable).
|
|
818
|
+
*/
|
|
819
|
+
declare function entryFeePositionPayout(input: EntryFeePositionInput, position: number): bigint;
|
|
820
|
+
/**
|
|
821
|
+
* Amount a single `position` (1-indexed) claims from a distributed sponsored
|
|
822
|
+
* ERC20 prize. Generalizes the client's per-position `computePrizePercentages`
|
|
823
|
+
* + amount slicing. Returns `0n` for non-distributed / non-ERC20 prizes, a
|
|
824
|
+
* position outside the paid range, or a zero slice.
|
|
825
|
+
*/
|
|
826
|
+
declare function sponsorPrizePayout(prize: Prize, position: number): bigint;
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Player reward resolution — "which rewards can this player still claim, and
|
|
830
|
+
* what `claim_reward` calls assemble them?"
|
|
831
|
+
*
|
|
832
|
+
* Generalizes the budokan client's `buildPlayerClaimCalls` + `computeEarnings`
|
|
833
|
+
* + `getClaimablePrizes`. Pure: walks placements + prize/entry-fee data +
|
|
834
|
+
* existing claims and returns not-yet-claimed, non-zero rewards plus the
|
|
835
|
+
* `Call`s to claim them (via the tested `buildClaimRewardCall` encoder — so
|
|
836
|
+
* the claim-encoding bug class the SDK was created to kill can't recur).
|
|
837
|
+
*
|
|
838
|
+
* Scope (matches the client): the connected player's own placements only —
|
|
839
|
+
* entry-fee position prizes + sponsored prizes. Creator shares, protocol fee,
|
|
840
|
+
* and per-token refunds are pool/owner concerns, not placement-derived, and
|
|
841
|
+
* are intentionally excluded.
|
|
842
|
+
*/
|
|
843
|
+
|
|
844
|
+
type ClaimableRewardSource = "entry_fee_position" | "sponsor_single" | "sponsor_distributed";
|
|
845
|
+
interface ClaimableReward {
|
|
846
|
+
tournamentId: string;
|
|
847
|
+
/** Human label for UI/telemetry (`tournament.name` or `#id`). */
|
|
848
|
+
tournamentName: string;
|
|
849
|
+
/** Reward descriptor — feed straight to `buildClaimRewardCall` / `buildClaimCalls`. */
|
|
850
|
+
reward: RewardType;
|
|
851
|
+
/** Where the reward comes from (UI grouping / telemetry). */
|
|
852
|
+
source: ClaimableRewardSource;
|
|
853
|
+
/** 1-indexed leaderboard position the reward is for. */
|
|
854
|
+
position: number;
|
|
855
|
+
/** Token contract (ERC20/ERC721). */
|
|
856
|
+
tokenAddress: string | null;
|
|
857
|
+
tokenType: "erc20" | "erc721";
|
|
858
|
+
/** ERC20 amount in smallest units; `undefined` for ERC721 (one NFT). */
|
|
859
|
+
amount?: bigint;
|
|
860
|
+
/** ERC721 token id, when applicable. */
|
|
861
|
+
tokenId?: string | null;
|
|
862
|
+
}
|
|
863
|
+
interface GetClaimableRewardsInput {
|
|
864
|
+
placements: PlayerPlacement[];
|
|
865
|
+
tournaments: Tournament[];
|
|
866
|
+
prizes: Prize[];
|
|
867
|
+
/** Existing reward-claim records. Only those with `claimed === true` filter rewards out. */
|
|
868
|
+
existingClaims: RewardClaim[];
|
|
869
|
+
}
|
|
870
|
+
/**
|
|
871
|
+
* The not-yet-claimed, non-zero rewards across the player's placements.
|
|
872
|
+
*
|
|
873
|
+
* Skips:
|
|
874
|
+
* - already-claimed rewards (would revert),
|
|
875
|
+
* - 0-amount ERC20 slices (contract truncation makes them unclaimable),
|
|
876
|
+
* - creator/protocol/refund shares (not placement-derived).
|
|
877
|
+
*/
|
|
878
|
+
declare function getClaimableRewards(input: GetClaimableRewardsInput): ClaimableReward[];
|
|
879
|
+
/**
|
|
880
|
+
* Turn resolved {@link ClaimableReward}s into `claim_reward` `Call`s for
|
|
881
|
+
* `account.execute([...])`. Order is preserved.
|
|
882
|
+
*/
|
|
883
|
+
declare function buildClaimCalls(rewards: ClaimableReward[], budokanAddress: string): Call[];
|
|
884
|
+
|
|
885
|
+
/**
|
|
886
|
+
* Tournament phase derivation — the single source of truth for "what phase is
|
|
887
|
+
* this tournament in right now?", mirroring the contract exactly
|
|
888
|
+
* (`packages/budokan/src/libs/schedule.cairo::current_phase`).
|
|
889
|
+
*
|
|
890
|
+
* The client used to recompute this inline (`isStarted/isEnded/isSubmitted`);
|
|
891
|
+
* this generalizes it so the client, bot, and any integration agree with the
|
|
892
|
+
* chain on phase boundaries (all comparisons are strict `<`, so a boundary
|
|
893
|
+
* second belongs to the *later* phase, matching the Cairo `if` ladder).
|
|
894
|
+
*/
|
|
895
|
+
|
|
896
|
+
/** Minimal schedule + creation-time shape needed to derive a phase. Matches
|
|
897
|
+
* the relevant subset of `Tournament` (top-level delay fields + on-chain
|
|
898
|
+
* created-at), so a full `Tournament` satisfies it directly. */
|
|
899
|
+
interface PhaseInput {
|
|
900
|
+
/** Unix seconds (string or number) the tournament was created on-chain. */
|
|
901
|
+
createdAtOnchain?: string | number | null;
|
|
902
|
+
registrationStartDelay?: number | null;
|
|
903
|
+
registrationEndDelay?: number | null;
|
|
904
|
+
gameStartDelay?: number | null;
|
|
905
|
+
gameEndDelay?: number | null;
|
|
906
|
+
submissionDuration?: number | null;
|
|
907
|
+
/** Fallback structured schedule (used when top-level delays are absent). */
|
|
908
|
+
schedule?: {
|
|
909
|
+
registrationStartDelay: number;
|
|
910
|
+
registrationEndDelay: number;
|
|
911
|
+
gameStartDelay: number;
|
|
912
|
+
gameEndDelay: number;
|
|
913
|
+
submissionDuration: number;
|
|
914
|
+
} | null;
|
|
915
|
+
}
|
|
916
|
+
/**
|
|
917
|
+
* Derive the current {@link Phase}. Returns `null` when the on-chain
|
|
918
|
+
* creation time is unknown (can't anchor the schedule).
|
|
919
|
+
*
|
|
920
|
+
* @param t - tournament schedule + `createdAtOnchain`
|
|
921
|
+
* @param nowSeconds - Unix seconds to evaluate at (defaults to wall-clock now).
|
|
922
|
+
* Pass an explicit value for deterministic/testable derivation.
|
|
923
|
+
*/
|
|
924
|
+
declare function tournamentPhase(t: PhaseInput, nowSeconds?: number): Phase | null;
|
|
925
|
+
|
|
622
926
|
/**
|
|
623
927
|
* Entry-requirement validator extensions.
|
|
624
928
|
*
|
|
@@ -725,4 +1029,4 @@ interface TournamentValidatorConfig {
|
|
|
725
1029
|
*/
|
|
726
1030
|
declare function buildTournamentValidatorConfig(cfg: TournamentValidatorConfig): string[];
|
|
727
1031
|
|
|
728
|
-
export { type AddPrizeArgs, BudokanApiError, BudokanConnectionError, BudokanError, BudokanTimeoutError, CHAINS, type Call, type ChainConfig, type CreateTournamentArgs, DataSourceError, type DistributionSpec, type EnterTournamentArgs, type EntryFeeArgs, type EntryRequirementArgs, type EntryRequirementSpec, type Erc20BalanceConfig, type ExtensionPresetKind, type GameDefaults, type MerkleConfig, type OpusTrovesConfig, PaginatedResult, PlatformStats, Prize, PrizeAggregation, type PrizeSpec, PrizeStats, QualificationEntry, type ReceiptWithEvents, Registration, RewardClaim, RewardClaimSummary, type RewardType, RpcError, type TokenTypeSpec, Tournament, TournamentListParams, TournamentNotFoundError, type TournamentRequirementType, type TournamentValidatorConfig, WSEventHandler, WSManager, WSSubscribeOptions, type WhitelistChain, type WhitelistedGame, buildAddPrizeCall, buildClaimRewardCall, buildCreateTournamentCall, buildEnterTournamentCall, buildErc20ApproveCall, buildErc20BalanceConfig, buildMerkleConfig, buildOpusTrovesConfig, buildSubmitScoreCall, buildTournamentValidatorConfig, camelToSnake, explorerAddressUrl, explorerBaseUrl, explorerTxUrl, extensionAddressFor, findWhitelistedGame, getActivityStats, getChainConfig, getGameDefaults, getGameStats, getGameTournaments, getPrizeStats, getTournament, getTournamentPrizeAggregation, getTournamentPrizes, getTournamentQualifications, getTournamentRegistrations, getTournamentRewardClaims, getTournamentRewardClaimsSummary, getTournaments, getWhitelistedGames, isGameWhitelisted, normalizeAddress, parseTournamentIdFromReceipt, snakeToCamel, tournamentPageUrl, u256ToLowHigh, withRetry };
|
|
1032
|
+
export { type AddPrizeArgs, BudokanApiError, BudokanConnectionError, BudokanError, BudokanTimeoutError, CHAINS, type Call, type ChainConfig, type ClaimableReward, type ClaimableRewardSource, type CreateTournamentArgs, DataSourceError, type DistributionKind, type DistributionSpec, type EnterTournamentArgs, type EntryFeeArgs, type EntryFeePositionInput, type EntryFeeSplit, type EntryFeeSplitInput, type EntryRequirementArgs, type EntryRequirementSpec, type Erc20BalanceConfig, type ExtensionPresetKind, ExtensionPrize$1 as ExtensionPrize, type GameDefaults, type GetClaimableRewardsInput, type MerkleConfig, type MetagameExtensionPrize, type MetagamePrizeLike, type MetagameTokenPrize, type OpusTrovesConfig, PaginatedResult, type ParsedDistribution, Phase, type PhaseInput, PlatformStats, PlayerPlacement, Prize, PrizeAggregation, type PrizeSpec, PrizeStats, QualificationEntry, type ReceiptWithEvents, Registration, RewardClaim, RewardClaimSummary, type RewardType, RpcError, TokenPrize, type TokenTypeSpec, Tournament, TournamentListParams, TournamentNotFoundError, type TournamentRequirementType, type TournamentValidatorConfig, WSEventHandler, WSManager, WSSubscribeOptions, type WhitelistChain, type WhitelistedGame, buildAddPrizeCall, buildClaimCalls, buildClaimRewardCall, buildCreateTournamentCall, buildEnterTournamentCall, buildErc20ApproveCall, buildErc20BalanceConfig, buildMerkleConfig, buildOpusTrovesConfig, buildSubmitScoreCall, buildTournamentValidatorConfig, camelToSnake, distributionPercentages, entryFeePositionPayout, entryFeeSplit, explorerAddressUrl, explorerBaseUrl, explorerTxUrl, extensionAddressFor, findWhitelistedGame, getActivityStats, getChainConfig, getClaimableRewards, getGameDefaults, getGameStats, getGameTournaments, getPrizeStats, getRawTokenPrizes, getTokenPrizes, getTournament, getTournamentPrizeAggregation, getTournamentPrizes, getTournamentQualifications, getTournamentRegistrations, getTournamentRewardClaims, getTournamentRewardClaimsSummary, getTournaments, getWhitelistedGames, isExtensionPrize, isGameWhitelisted, isMetagameAdaptablePrize, isRawExtensionPrize, isRawTokenPrize, isTokenPrize, normalizeAddress, parseDistribution, parseTournamentIdFromReceipt, prizeDistribution, snakeToCamel, sponsorPrizePayout, toMetagameExtensionPrize, toMetagamePrize, toMetagamePrizes, toMetagameTokenPrize, toMetagameTokenPrizes, tournamentPageUrl, tournamentPhase, tryToMetagamePrize, tryToMetagamePrizes, u256ToLowHigh, withRetry };
|