@provable-games/budokan-sdk 0.1.20 → 0.1.21
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-CoWIQozF.d.cts → client-0HDPKrdw.d.cts} +1 -23
- package/dist/{client-CoWIQozF.d.ts → client-0HDPKrdw.d.ts} +1 -23
- package/dist/index.cjs +0 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -7
- package/dist/index.d.ts +3 -7
- package/dist/index.js +1 -25
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +0 -24
- 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 +0 -24
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
|
@@ -191,23 +191,6 @@ interface RewardClaimSummary {
|
|
|
191
191
|
totalUnclaimed: number;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
interface ActivityEvent {
|
|
195
|
-
id: string;
|
|
196
|
-
eventType: string;
|
|
197
|
-
tournamentId: string | null;
|
|
198
|
-
playerAddress: string | null;
|
|
199
|
-
data: Record<string, unknown>;
|
|
200
|
-
blockNumber: string;
|
|
201
|
-
txHash: string;
|
|
202
|
-
eventIndex: number;
|
|
203
|
-
}
|
|
204
|
-
interface ActivityParams {
|
|
205
|
-
eventType?: string;
|
|
206
|
-
tournamentId?: string;
|
|
207
|
-
playerAddress?: string;
|
|
208
|
-
limit?: number;
|
|
209
|
-
offset?: number;
|
|
210
|
-
}
|
|
211
194
|
interface PlatformStats {
|
|
212
195
|
totalTournaments: number;
|
|
213
196
|
totalPrizes: number;
|
|
@@ -451,11 +434,6 @@ declare class BudokanClient {
|
|
|
451
434
|
* API-only -- no RPC fallback available.
|
|
452
435
|
*/
|
|
453
436
|
getTournamentPrizeAggregation(tournamentId: string): Promise<PrizeAggregation[]>;
|
|
454
|
-
/**
|
|
455
|
-
* Fetch activity events with optional filtering.
|
|
456
|
-
* API-only — no RPC fallback available.
|
|
457
|
-
*/
|
|
458
|
-
getActivity(params?: ActivityParams): Promise<PaginatedResult<ActivityEvent>>;
|
|
459
437
|
/**
|
|
460
438
|
* Fetch platform-wide activity stats.
|
|
461
439
|
* API-only — no RPC fallback available.
|
|
@@ -494,4 +472,4 @@ declare class BudokanClient {
|
|
|
494
472
|
*/
|
|
495
473
|
declare function createBudokanClient(config: BudokanClientConfig): BudokanClient;
|
|
496
474
|
|
|
497
|
-
export {
|
|
475
|
+
export { BudokanClient as B, type ConnectionMode as C, type DataSource as D, type GameConfig as G, type LeaderboardConfig as L, type PrizeAggregation as P, type QualificationEntry as Q, type Registration as R, type Schedule as S, type Tournament as T, type WSSubscribeOptions as W, type Prize as a, type PaginatedResult as b, type RewardClaim as c, type RewardClaimSummary as d, type TournamentListParams as e, type PlatformStats as f, type PrizeStats as g, type WSEventHandler as h, type BudokanClientConfig as i, ConnectionStatus as j, type ConnectionStatusState as k, type LeaderboardEntry as l, type Phase as m, type WSChannel as n, type WSEventMessage as o, type WSMessage as p, type WSSubscribeMessage as q, type WSUnsubscribeMessage as r, createBudokanClient as s };
|
|
@@ -191,23 +191,6 @@ interface RewardClaimSummary {
|
|
|
191
191
|
totalUnclaimed: number;
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
interface ActivityEvent {
|
|
195
|
-
id: string;
|
|
196
|
-
eventType: string;
|
|
197
|
-
tournamentId: string | null;
|
|
198
|
-
playerAddress: string | null;
|
|
199
|
-
data: Record<string, unknown>;
|
|
200
|
-
blockNumber: string;
|
|
201
|
-
txHash: string;
|
|
202
|
-
eventIndex: number;
|
|
203
|
-
}
|
|
204
|
-
interface ActivityParams {
|
|
205
|
-
eventType?: string;
|
|
206
|
-
tournamentId?: string;
|
|
207
|
-
playerAddress?: string;
|
|
208
|
-
limit?: number;
|
|
209
|
-
offset?: number;
|
|
210
|
-
}
|
|
211
194
|
interface PlatformStats {
|
|
212
195
|
totalTournaments: number;
|
|
213
196
|
totalPrizes: number;
|
|
@@ -451,11 +434,6 @@ declare class BudokanClient {
|
|
|
451
434
|
* API-only -- no RPC fallback available.
|
|
452
435
|
*/
|
|
453
436
|
getTournamentPrizeAggregation(tournamentId: string): Promise<PrizeAggregation[]>;
|
|
454
|
-
/**
|
|
455
|
-
* Fetch activity events with optional filtering.
|
|
456
|
-
* API-only — no RPC fallback available.
|
|
457
|
-
*/
|
|
458
|
-
getActivity(params?: ActivityParams): Promise<PaginatedResult<ActivityEvent>>;
|
|
459
437
|
/**
|
|
460
438
|
* Fetch platform-wide activity stats.
|
|
461
439
|
* API-only — no RPC fallback available.
|
|
@@ -494,4 +472,4 @@ declare class BudokanClient {
|
|
|
494
472
|
*/
|
|
495
473
|
declare function createBudokanClient(config: BudokanClientConfig): BudokanClient;
|
|
496
474
|
|
|
497
|
-
export {
|
|
475
|
+
export { BudokanClient as B, type ConnectionMode as C, type DataSource as D, type GameConfig as G, type LeaderboardConfig as L, type PrizeAggregation as P, type QualificationEntry as Q, type Registration as R, type Schedule as S, type Tournament as T, type WSSubscribeOptions as W, type Prize as a, type PaginatedResult as b, type RewardClaim as c, type RewardClaimSummary as d, type TournamentListParams as e, type PlatformStats as f, type PrizeStats as g, type WSEventHandler as h, type BudokanClientConfig as i, ConnectionStatus as j, type ConnectionStatusState as k, type LeaderboardEntry as l, type Phase as m, type WSChannel as n, type WSEventMessage as o, type WSMessage as p, type WSSubscribeMessage as q, type WSUnsubscribeMessage as r, createBudokanClient as s };
|
package/dist/index.cjs
CHANGED
|
@@ -369,23 +369,6 @@ function fetchOpts3(ctx) {
|
|
|
369
369
|
timeout: ctx?.timeout
|
|
370
370
|
};
|
|
371
371
|
}
|
|
372
|
-
async function getActivity(baseUrl, params, ctx) {
|
|
373
|
-
const qs = buildQueryString({
|
|
374
|
-
event_type: params?.eventType,
|
|
375
|
-
tournament_id: params?.tournamentId,
|
|
376
|
-
player_address: params?.playerAddress,
|
|
377
|
-
limit: params?.limit,
|
|
378
|
-
offset: params?.offset
|
|
379
|
-
});
|
|
380
|
-
const result = await apiFetch(`${baseUrl}/activity${qs}`, fetchOpts3(ctx));
|
|
381
|
-
const { total, limit: resLimit, offset: resOffset } = extractPagination(result, { limit: params?.limit, offset: params?.offset });
|
|
382
|
-
return {
|
|
383
|
-
data: result.data.map((item) => snakeToCamel(item)),
|
|
384
|
-
total,
|
|
385
|
-
limit: resLimit,
|
|
386
|
-
offset: resOffset
|
|
387
|
-
};
|
|
388
|
-
}
|
|
389
372
|
async function getActivityStats(baseUrl, ctx) {
|
|
390
373
|
const result = await apiFetch(
|
|
391
374
|
`${baseUrl}/activity/stats`,
|
|
@@ -4598,13 +4581,6 @@ var BudokanClient = class {
|
|
|
4598
4581
|
return getTournamentPrizeAggregation(this.resolvedConfig.apiBaseUrl, tournamentId, this.apiCtx);
|
|
4599
4582
|
}
|
|
4600
4583
|
// ---- Activity Queries (API-only, activity is indexed) ----
|
|
4601
|
-
/**
|
|
4602
|
-
* Fetch activity events with optional filtering.
|
|
4603
|
-
* API-only — no RPC fallback available.
|
|
4604
|
-
*/
|
|
4605
|
-
async getActivity(params) {
|
|
4606
|
-
return getActivity(this.resolvedConfig.apiBaseUrl, params, this.apiCtx);
|
|
4607
|
-
}
|
|
4608
4584
|
/**
|
|
4609
4585
|
* Fetch platform-wide activity stats.
|
|
4610
4586
|
* API-only — no RPC fallback available.
|
|
@@ -4671,7 +4647,6 @@ exports.TournamentNotFoundError = TournamentNotFoundError;
|
|
|
4671
4647
|
exports.WSManager = WSManager;
|
|
4672
4648
|
exports.camelToSnake = camelToSnake;
|
|
4673
4649
|
exports.createBudokanClient = createBudokanClient;
|
|
4674
|
-
exports.getActivity = getActivity;
|
|
4675
4650
|
exports.getActivityStats = getActivityStats;
|
|
4676
4651
|
exports.getChainConfig = getChainConfig;
|
|
4677
4652
|
exports.getGameStats = getGameStats;
|