@provable-games/budokan-sdk 0.1.19 → 0.1.20
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/{client-B97mEKJc.d.cts → client-CoWIQozF.d.cts} +11 -27
- package/dist/{client-B97mEKJc.d.ts → client-CoWIQozF.d.ts} +11 -27
- package/dist/index.cjs +7 -106
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +17 -27
- package/dist/index.d.ts +17 -27
- package/dist/index.js +8 -105
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +155 -203
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +33 -31
- package/dist/react.d.ts +33 -31
- package/dist/react.js +153 -200
- package/dist/react.js.map +1 -1
- package/package.json +7 -2
package/dist/react.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { j as BudokanClientConfig, B as BudokanClient, T as Tournament, b as PaginatedResult, e as TournamentListParams, n as Phase, m as LeaderboardEntry, R as Registration, c as RewardClaim, d as RewardClaimSummary, h as PrizeStats, a as Prize, P as PrizeAggregation, Q as QualificationEntry, f as PlatformStats, p as WSEventMessage, o as WSChannel, C as ConnectionMode } from './client-CoWIQozF.cjs';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@provable-games/metagame-sdk';
|
|
6
6
|
|
|
@@ -52,10 +52,6 @@ interface UseTournamentCountResult {
|
|
|
52
52
|
* Hook to fetch the total count of tournaments matching a phase filter.
|
|
53
53
|
*/
|
|
54
54
|
declare function useTournamentCount(phase?: Phase): UseTournamentCountResult;
|
|
55
|
-
/**
|
|
56
|
-
* Hook to fetch the total count of tournaments a player is registered for.
|
|
57
|
-
*/
|
|
58
|
-
declare function usePlayerTournamentCount(address: string | undefined, phase?: Phase): UseTournamentCountResult;
|
|
59
55
|
|
|
60
56
|
interface UseLeaderboardResult {
|
|
61
57
|
leaderboard: LeaderboardEntry[] | null;
|
|
@@ -78,7 +74,6 @@ interface UseRegistrationsResult {
|
|
|
78
74
|
* Hook to fetch registrations for a tournament.
|
|
79
75
|
*/
|
|
80
76
|
declare function useRegistrations(tournamentId: string | undefined, params?: {
|
|
81
|
-
playerAddress?: string;
|
|
82
77
|
gameTokenIds?: string[];
|
|
83
78
|
hasSubmitted?: boolean;
|
|
84
79
|
isBanned?: boolean;
|
|
@@ -86,36 +81,43 @@ declare function useRegistrations(tournamentId: string | undefined, params?: {
|
|
|
86
81
|
offset?: number;
|
|
87
82
|
}): UseRegistrationsResult;
|
|
88
83
|
|
|
89
|
-
interface UsePlayerResult {
|
|
90
|
-
tournaments: PaginatedResult<PlayerTournament> | null;
|
|
91
|
-
stats: PlayerStats | null;
|
|
92
|
-
loading: boolean;
|
|
93
|
-
error: Error | null;
|
|
94
|
-
}
|
|
95
84
|
/**
|
|
96
|
-
*
|
|
85
|
+
* Tournaments where `owner` currently holds at least one Budokan-minted token.
|
|
86
|
+
* Stitches denshokan ownership → unique `contextId`s → `useTournaments`
|
|
87
|
+
* filtered by those IDs. Stays correct under transfers; transferred tokens
|
|
88
|
+
* drop out of the result, received tokens appear.
|
|
89
|
+
*
|
|
90
|
+
* Requires the consuming app to wrap its tree in a `DenshokanProvider`
|
|
91
|
+
* alongside the `BudokanProvider`.
|
|
97
92
|
*/
|
|
98
|
-
declare function
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
93
|
+
declare function useTournamentsByOwner(owner: string | undefined, params?: {
|
|
94
|
+
phase?: Phase;
|
|
95
|
+
limit?: number;
|
|
96
|
+
offset?: number;
|
|
97
|
+
sort?: TournamentListParams["sort"];
|
|
98
|
+
includePrizeSummary?: TournamentListParams["includePrizeSummary"];
|
|
99
|
+
}): UseTournamentsResult;
|
|
105
100
|
/**
|
|
106
|
-
*
|
|
101
|
+
* Count of tournaments where `owner` currently holds a Budokan-minted token.
|
|
102
|
+
* When `phase` is omitted the count comes for free from the denshokan result;
|
|
103
|
+
* when phase-filtered it makes a second `useTournaments` call (with limit=1)
|
|
104
|
+
* and reads `.total`.
|
|
107
105
|
*/
|
|
108
|
-
declare function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
loading: boolean;
|
|
112
|
-
error: Error | null;
|
|
113
|
-
refetch: () => Promise<void>;
|
|
114
|
-
}
|
|
106
|
+
declare function useTournamentsByOwnerCount(owner: string | undefined, params?: {
|
|
107
|
+
phase?: Phase;
|
|
108
|
+
}): UseTournamentCountResult;
|
|
115
109
|
/**
|
|
116
|
-
*
|
|
110
|
+
* Registrations in `tournamentId` for tokens that `owner` currently holds.
|
|
111
|
+
* Source of truth is denshokan ownership scoped to the tournament's
|
|
112
|
+
* `contextId`; registration metadata (ban / submission / entry-number) is
|
|
113
|
+
* fetched by `gameTokenIds` filter against the tournament.
|
|
117
114
|
*/
|
|
118
|
-
declare function
|
|
115
|
+
declare function useRegistrationsByOwner(tournamentId: string | undefined, owner: string | undefined, params?: {
|
|
116
|
+
hasSubmitted?: boolean;
|
|
117
|
+
isBanned?: boolean;
|
|
118
|
+
limit?: number;
|
|
119
|
+
offset?: number;
|
|
120
|
+
}): UseRegistrationsResult;
|
|
119
121
|
|
|
120
122
|
interface UseRewardClaimsResult {
|
|
121
123
|
rewardClaims: PaginatedResult<RewardClaim> | null;
|
|
@@ -221,4 +223,4 @@ declare function useConnectionStatus(): {
|
|
|
221
223
|
datasourceMode: ConnectionMode;
|
|
222
224
|
};
|
|
223
225
|
|
|
224
|
-
export { BudokanProvider, type BudokanProviderProps, type UseActivityStatsResult, type UseLeaderboardResult, type
|
|
226
|
+
export { BudokanProvider, type BudokanProviderProps, type UseActivityStatsResult, type UseLeaderboardResult, type UsePrizeAggregationResult, type UsePrizeStatsResult, type UsePrizesResult, type UseQualificationsResult, type UseRegistrationsResult, type UseRewardClaimsResult, type UseRewardClaimsSummaryResult, type UseSubscriptionResult, type UseTournamentCountResult, type UseTournamentResult, type UseTournamentsResult, useActivityStats, useBudokanClient, useConnectionStatus, useLeaderboard, usePrizeAggregation, usePrizeStats, usePrizes, useQualifications, useRegistrations, useRegistrationsByOwner, useRewardClaims, useRewardClaimsSummary, useSubscription, useTournament, useTournamentCount, useTournaments, useTournamentsByOwner, useTournamentsByOwnerCount };
|
package/dist/react.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { j as BudokanClientConfig, B as BudokanClient, T as Tournament, b as PaginatedResult, e as TournamentListParams, n as Phase, m as LeaderboardEntry, R as Registration, c as RewardClaim, d as RewardClaimSummary, h as PrizeStats, a as Prize, P as PrizeAggregation, Q as QualificationEntry, f as PlatformStats, p as WSEventMessage, o as WSChannel, C as ConnectionMode } from './client-CoWIQozF.js';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
import '@provable-games/metagame-sdk';
|
|
6
6
|
|
|
@@ -52,10 +52,6 @@ interface UseTournamentCountResult {
|
|
|
52
52
|
* Hook to fetch the total count of tournaments matching a phase filter.
|
|
53
53
|
*/
|
|
54
54
|
declare function useTournamentCount(phase?: Phase): UseTournamentCountResult;
|
|
55
|
-
/**
|
|
56
|
-
* Hook to fetch the total count of tournaments a player is registered for.
|
|
57
|
-
*/
|
|
58
|
-
declare function usePlayerTournamentCount(address: string | undefined, phase?: Phase): UseTournamentCountResult;
|
|
59
55
|
|
|
60
56
|
interface UseLeaderboardResult {
|
|
61
57
|
leaderboard: LeaderboardEntry[] | null;
|
|
@@ -78,7 +74,6 @@ interface UseRegistrationsResult {
|
|
|
78
74
|
* Hook to fetch registrations for a tournament.
|
|
79
75
|
*/
|
|
80
76
|
declare function useRegistrations(tournamentId: string | undefined, params?: {
|
|
81
|
-
playerAddress?: string;
|
|
82
77
|
gameTokenIds?: string[];
|
|
83
78
|
hasSubmitted?: boolean;
|
|
84
79
|
isBanned?: boolean;
|
|
@@ -86,36 +81,43 @@ declare function useRegistrations(tournamentId: string | undefined, params?: {
|
|
|
86
81
|
offset?: number;
|
|
87
82
|
}): UseRegistrationsResult;
|
|
88
83
|
|
|
89
|
-
interface UsePlayerResult {
|
|
90
|
-
tournaments: PaginatedResult<PlayerTournament> | null;
|
|
91
|
-
stats: PlayerStats | null;
|
|
92
|
-
loading: boolean;
|
|
93
|
-
error: Error | null;
|
|
94
|
-
}
|
|
95
84
|
/**
|
|
96
|
-
*
|
|
85
|
+
* Tournaments where `owner` currently holds at least one Budokan-minted token.
|
|
86
|
+
* Stitches denshokan ownership → unique `contextId`s → `useTournaments`
|
|
87
|
+
* filtered by those IDs. Stays correct under transfers; transferred tokens
|
|
88
|
+
* drop out of the result, received tokens appear.
|
|
89
|
+
*
|
|
90
|
+
* Requires the consuming app to wrap its tree in a `DenshokanProvider`
|
|
91
|
+
* alongside the `BudokanProvider`.
|
|
97
92
|
*/
|
|
98
|
-
declare function
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
}
|
|
93
|
+
declare function useTournamentsByOwner(owner: string | undefined, params?: {
|
|
94
|
+
phase?: Phase;
|
|
95
|
+
limit?: number;
|
|
96
|
+
offset?: number;
|
|
97
|
+
sort?: TournamentListParams["sort"];
|
|
98
|
+
includePrizeSummary?: TournamentListParams["includePrizeSummary"];
|
|
99
|
+
}): UseTournamentsResult;
|
|
105
100
|
/**
|
|
106
|
-
*
|
|
101
|
+
* Count of tournaments where `owner` currently holds a Budokan-minted token.
|
|
102
|
+
* When `phase` is omitted the count comes for free from the denshokan result;
|
|
103
|
+
* when phase-filtered it makes a second `useTournaments` call (with limit=1)
|
|
104
|
+
* and reads `.total`.
|
|
107
105
|
*/
|
|
108
|
-
declare function
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
loading: boolean;
|
|
112
|
-
error: Error | null;
|
|
113
|
-
refetch: () => Promise<void>;
|
|
114
|
-
}
|
|
106
|
+
declare function useTournamentsByOwnerCount(owner: string | undefined, params?: {
|
|
107
|
+
phase?: Phase;
|
|
108
|
+
}): UseTournamentCountResult;
|
|
115
109
|
/**
|
|
116
|
-
*
|
|
110
|
+
* Registrations in `tournamentId` for tokens that `owner` currently holds.
|
|
111
|
+
* Source of truth is denshokan ownership scoped to the tournament's
|
|
112
|
+
* `contextId`; registration metadata (ban / submission / entry-number) is
|
|
113
|
+
* fetched by `gameTokenIds` filter against the tournament.
|
|
117
114
|
*/
|
|
118
|
-
declare function
|
|
115
|
+
declare function useRegistrationsByOwner(tournamentId: string | undefined, owner: string | undefined, params?: {
|
|
116
|
+
hasSubmitted?: boolean;
|
|
117
|
+
isBanned?: boolean;
|
|
118
|
+
limit?: number;
|
|
119
|
+
offset?: number;
|
|
120
|
+
}): UseRegistrationsResult;
|
|
119
121
|
|
|
120
122
|
interface UseRewardClaimsResult {
|
|
121
123
|
rewardClaims: PaginatedResult<RewardClaim> | null;
|
|
@@ -221,4 +223,4 @@ declare function useConnectionStatus(): {
|
|
|
221
223
|
datasourceMode: ConnectionMode;
|
|
222
224
|
};
|
|
223
225
|
|
|
224
|
-
export { BudokanProvider, type BudokanProviderProps, type UseActivityStatsResult, type UseLeaderboardResult, type
|
|
226
|
+
export { BudokanProvider, type BudokanProviderProps, type UseActivityStatsResult, type UseLeaderboardResult, type UsePrizeAggregationResult, type UsePrizeStatsResult, type UsePrizesResult, type UseQualificationsResult, type UseRegistrationsResult, type UseRewardClaimsResult, type UseRewardClaimsSummaryResult, type UseSubscriptionResult, type UseTournamentCountResult, type UseTournamentResult, type UseTournamentsResult, useActivityStats, useBudokanClient, useConnectionStatus, useLeaderboard, usePrizeAggregation, usePrizeStats, usePrizes, useQualifications, useRegistrations, useRegistrationsByOwner, useRewardClaims, useRewardClaimsSummary, useSubscription, useTournament, useTournamentCount, useTournaments, useTournamentsByOwner, useTournamentsByOwnerCount };
|