@provable-games/budokan-sdk 0.1.15 → 0.1.17
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-d2NE8oS8.d.cts → client-CP4dxHGv.d.cts} +3 -0
- package/dist/{client-d2NE8oS8.d.ts → client-CP4dxHGv.d.ts} +3 -0
- package/dist/index.cjs +11 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +11 -5
- 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 +11 -5
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tournament, L as LeaderboardEntry, 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 PlayerStats, g as PlayerTournamentParams, h as PlayerTournament, i as PlatformStats, A as ActivityParams, j as ActivityEvent, k as PrizeStats, W as WSSubscribeOptions, l as WSEventHandler } from './client-
|
|
2
|
-
export { B as BudokanClient, m as BudokanClientConfig, C as ConnectionMode, n as ConnectionStatus, o as ConnectionStatusState, D as DataSource, G as GameConfig, p as LeaderboardConfig, q as Phase, S as Schedule, r as WSChannel, s as WSEventMessage, t as WSMessage, u as WSSubscribeMessage, v as WSUnsubscribeMessage, w as createBudokanClient } from './client-
|
|
1
|
+
import { T as Tournament, L as LeaderboardEntry, 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 PlayerStats, g as PlayerTournamentParams, h as PlayerTournament, i as PlatformStats, A as ActivityParams, j as ActivityEvent, k as PrizeStats, W as WSSubscribeOptions, l as WSEventHandler } from './client-CP4dxHGv.cjs';
|
|
2
|
+
export { B as BudokanClient, m as BudokanClientConfig, C as ConnectionMode, n as ConnectionStatus, o as ConnectionStatusState, D as DataSource, G as GameConfig, p as LeaderboardConfig, q as Phase, S as Schedule, r as WSChannel, s as WSEventMessage, t as WSMessage, u as WSSubscribeMessage, v as WSUnsubscribeMessage, w as createBudokanClient } from './client-CP4dxHGv.cjs';
|
|
3
3
|
export { EntryFee } from '@provable-games/metagame-sdk';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tournament, L as LeaderboardEntry, 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 PlayerStats, g as PlayerTournamentParams, h as PlayerTournament, i as PlatformStats, A as ActivityParams, j as ActivityEvent, k as PrizeStats, W as WSSubscribeOptions, l as WSEventHandler } from './client-
|
|
2
|
-
export { B as BudokanClient, m as BudokanClientConfig, C as ConnectionMode, n as ConnectionStatus, o as ConnectionStatusState, D as DataSource, G as GameConfig, p as LeaderboardConfig, q as Phase, S as Schedule, r as WSChannel, s as WSEventMessage, t as WSMessage, u as WSSubscribeMessage, v as WSUnsubscribeMessage, w as createBudokanClient } from './client-
|
|
1
|
+
import { T as Tournament, L as LeaderboardEntry, 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 PlayerStats, g as PlayerTournamentParams, h as PlayerTournament, i as PlatformStats, A as ActivityParams, j as ActivityEvent, k as PrizeStats, W as WSSubscribeOptions, l as WSEventHandler } from './client-CP4dxHGv.js';
|
|
2
|
+
export { B as BudokanClient, m as BudokanClientConfig, C as ConnectionMode, n as ConnectionStatus, o as ConnectionStatusState, D as DataSource, G as GameConfig, p as LeaderboardConfig, q as Phase, S as Schedule, r as WSChannel, s as WSEventMessage, t as WSMessage, u as WSSubscribeMessage, v as WSUnsubscribeMessage, w as createBudokanClient } from './client-CP4dxHGv.js';
|
|
3
3
|
export { EntryFee } from '@provable-games/metagame-sdk';
|
|
4
4
|
import 'starknet';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -598,15 +598,15 @@ var CHAINS = {
|
|
|
598
598
|
rpcUrl: "https://api.cartridge.gg/x/starknet/mainnet/rpc/v0_10",
|
|
599
599
|
apiBaseUrl: "https://budokan-api-production.up.railway.app",
|
|
600
600
|
wsUrl: "wss://budokan-api-production.up.railway.app/ws",
|
|
601
|
-
budokanAddress: "
|
|
602
|
-
viewerAddress: "
|
|
601
|
+
budokanAddress: "0x00f4941e73cc38f67f79ae1f7cdae48f28ca5a6c0e013f6136818e777f61c6ee",
|
|
602
|
+
viewerAddress: "0x027c264f4417dfd25d0626bce7304e9b3140ab06afeaf639b2678d2a05f1beb3"
|
|
603
603
|
},
|
|
604
604
|
sepolia: {
|
|
605
605
|
rpcUrl: "https://starknet-sepolia.public.blastapi.io",
|
|
606
606
|
apiBaseUrl: "https://budokan-api-sepolia.up.railway.app",
|
|
607
607
|
wsUrl: "wss://budokan-api-sepolia.up.railway.app/ws",
|
|
608
|
-
budokanAddress: "
|
|
609
|
-
viewerAddress: "
|
|
608
|
+
budokanAddress: "0x0169083e63f3caff2c15f83eb238b1f4ab8f74903c0e6b5d433b448972c578d4",
|
|
609
|
+
viewerAddress: "0x02cc4473948170cf42c2f3abc6391fd4401650375ee8e4661b7b6966cda4f15e"
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
function getChainConfig(chain) {
|
|
@@ -1012,6 +1012,7 @@ function parsePrize(raw) {
|
|
|
1012
1012
|
let tokenId = null;
|
|
1013
1013
|
let distributionType = null;
|
|
1014
1014
|
let distributionWeight = null;
|
|
1015
|
+
let distributionShares = null;
|
|
1015
1016
|
let distributionCount = null;
|
|
1016
1017
|
let payoutPosition = 0;
|
|
1017
1018
|
if (tokenTypeData) {
|
|
@@ -1030,7 +1031,11 @@ function parsePrize(raw) {
|
|
|
1030
1031
|
if (distType) {
|
|
1031
1032
|
distributionType = distType.toLowerCase();
|
|
1032
1033
|
const distValue = distVariant[distType];
|
|
1033
|
-
|
|
1034
|
+
if (distributionType === "custom") {
|
|
1035
|
+
distributionShares = Array.isArray(distValue) ? distValue.map((v) => Number(v)) : null;
|
|
1036
|
+
} else {
|
|
1037
|
+
distributionWeight = distValue != null ? Number(distValue) : null;
|
|
1038
|
+
}
|
|
1034
1039
|
}
|
|
1035
1040
|
}
|
|
1036
1041
|
const countOption = erc20?.distribution_count;
|
|
@@ -1051,6 +1056,7 @@ function parsePrize(raw) {
|
|
|
1051
1056
|
tokenId,
|
|
1052
1057
|
distributionType,
|
|
1053
1058
|
distributionWeight,
|
|
1059
|
+
distributionShares,
|
|
1054
1060
|
distributionCount,
|
|
1055
1061
|
sponsorAddress: num.toHex(obj.sponsor_address)
|
|
1056
1062
|
};
|