@provable-games/budokan-sdk 0.1.15 → 0.1.16

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.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-d2NE8oS8.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-d2NE8oS8.cjs';
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-d2NE8oS8.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-d2NE8oS8.js';
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
@@ -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
- distributionWeight = distValue != null ? Number(distValue) : null;
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
  };