@provable-games/budokan-sdk 0.1.23 → 0.1.24
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/README.md +32 -0
- package/dist/index.cjs +1494 -320
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +538 -3
- package/dist/index.d.ts +538 -3
- package/dist/index.js +1475 -322
- package/dist/index.js.map +1 -1
- package/dist/{player-BUynfv7D.d.cts → player-C2GE9Lop.d.cts} +29 -4
- package/dist/{player-BUynfv7D.d.ts → player-C2GE9Lop.d.ts} +29 -4
- package/dist/react.cjs +893 -249
- 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 +893 -249
- package/dist/react.js.map +1 -1
- package/package.json +3 -2
|
@@ -56,7 +56,18 @@ interface Tournament {
|
|
|
56
56
|
hasEntryRequirement: boolean | null;
|
|
57
57
|
schedule: Schedule | null;
|
|
58
58
|
gameConfig: GameConfig | null;
|
|
59
|
+
/** Built-in entry fee (EntryFeeKind::BuiltIn). Null for free OR extension-fee tournaments. */
|
|
59
60
|
entryFee: EntryFee | null;
|
|
61
|
+
/**
|
|
62
|
+
* Discriminates the on-chain `EntryFeeKind`: `"builtin"` (see `entryFee`),
|
|
63
|
+
* `"extension"` (see `entryFeeExtension`), or `null` when there's no fee.
|
|
64
|
+
*/
|
|
65
|
+
entryFeeKind: "builtin" | "extension" | null;
|
|
66
|
+
/** External entry-fee extension (EntryFeeKind::Extension). Set only when entryFeeKind === "extension". */
|
|
67
|
+
entryFeeExtension: {
|
|
68
|
+
address: string;
|
|
69
|
+
config: string[];
|
|
70
|
+
} | null;
|
|
60
71
|
entryRequirement: EntryRequirement | null;
|
|
61
72
|
leaderboardConfig: LeaderboardConfig | null;
|
|
62
73
|
entryCount: number;
|
|
@@ -156,8 +167,14 @@ interface Prize {
|
|
|
156
167
|
prizeId: string;
|
|
157
168
|
tournamentId: string;
|
|
158
169
|
payoutPosition: number;
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
/** Token contract for built-in prizes; `null` for `tokenType === "extension"`. */
|
|
171
|
+
tokenAddress: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* `erc20` / `erc721` are built-in token prizes. `extension` is an external
|
|
174
|
+
* `IPrizeExtension` prize (the #269 path): the token fields below are null
|
|
175
|
+
* and `extensionAddress` / `extensionConfig` are populated instead.
|
|
176
|
+
*/
|
|
177
|
+
tokenType: "erc20" | "erc721" | "extension";
|
|
161
178
|
amount: string | null;
|
|
162
179
|
tokenId: string | null;
|
|
163
180
|
distributionType: string | null;
|
|
@@ -167,6 +184,10 @@ interface Prize {
|
|
|
167
184
|
distributionShares: number[] | null;
|
|
168
185
|
distributionCount: number | null;
|
|
169
186
|
sponsorAddress: string;
|
|
187
|
+
/** Extension contract address; only set when `tokenType === "extension"`. */
|
|
188
|
+
extensionAddress: string | null;
|
|
189
|
+
/** Opaque `Span<felt252>` config; only set when `tokenType === "extension"`. */
|
|
190
|
+
extensionConfig: string[] | null;
|
|
170
191
|
}
|
|
171
192
|
/**
|
|
172
193
|
* Discriminator for `RewardClaim.claimKind`. Picks one of the six terminal
|
|
@@ -175,11 +196,11 @@ interface Prize {
|
|
|
175
196
|
* variant-specific fields below are populated only for the kinds that carry
|
|
176
197
|
* them; the two pure-marker creator kinds leave all four nullable fields null.
|
|
177
198
|
*/
|
|
178
|
-
type RewardClaimKind = "prize_single" | "prize_distributed" | "entry_fee_position" | "entry_fee_tournament_creator" | "entry_fee_game_creator" | "entry_fee_refund";
|
|
199
|
+
type RewardClaimKind = "prize_single" | "prize_distributed" | "entry_fee_position" | "entry_fee_tournament_creator" | "entry_fee_game_creator" | "entry_fee_refund" | "prize_extension" | "entry_fee_extension";
|
|
179
200
|
interface RewardClaim {
|
|
180
201
|
tournamentId: string;
|
|
181
202
|
claimKind: RewardClaimKind;
|
|
182
|
-
/** Populated for `prize_single`
|
|
203
|
+
/** Populated for `prize_single`, `prize_distributed`, `prize_extension`. Stringified u64. */
|
|
183
204
|
prizeId: string | null;
|
|
184
205
|
/** Populated for `prize_distributed`. */
|
|
185
206
|
payoutIndex: number | null;
|
|
@@ -187,6 +208,10 @@ interface RewardClaim {
|
|
|
187
208
|
position: number | null;
|
|
188
209
|
/** Populated for `entry_fee_refund`. felt252 hex string of the game token. */
|
|
189
210
|
refundTokenId: string | null;
|
|
211
|
+
/** Game token id, for `prize_extension` / `entry_fee_extension` (Option → null when absent). */
|
|
212
|
+
extensionTokenId: string | null;
|
|
213
|
+
/** Opaque payout/claim params (`Span<felt252>`), for the extension claim kinds. */
|
|
214
|
+
extensionParams: string[] | null;
|
|
190
215
|
claimed: boolean;
|
|
191
216
|
}
|
|
192
217
|
interface PrizeAggregation {
|
|
@@ -56,7 +56,18 @@ interface Tournament {
|
|
|
56
56
|
hasEntryRequirement: boolean | null;
|
|
57
57
|
schedule: Schedule | null;
|
|
58
58
|
gameConfig: GameConfig | null;
|
|
59
|
+
/** Built-in entry fee (EntryFeeKind::BuiltIn). Null for free OR extension-fee tournaments. */
|
|
59
60
|
entryFee: EntryFee | null;
|
|
61
|
+
/**
|
|
62
|
+
* Discriminates the on-chain `EntryFeeKind`: `"builtin"` (see `entryFee`),
|
|
63
|
+
* `"extension"` (see `entryFeeExtension`), or `null` when there's no fee.
|
|
64
|
+
*/
|
|
65
|
+
entryFeeKind: "builtin" | "extension" | null;
|
|
66
|
+
/** External entry-fee extension (EntryFeeKind::Extension). Set only when entryFeeKind === "extension". */
|
|
67
|
+
entryFeeExtension: {
|
|
68
|
+
address: string;
|
|
69
|
+
config: string[];
|
|
70
|
+
} | null;
|
|
60
71
|
entryRequirement: EntryRequirement | null;
|
|
61
72
|
leaderboardConfig: LeaderboardConfig | null;
|
|
62
73
|
entryCount: number;
|
|
@@ -156,8 +167,14 @@ interface Prize {
|
|
|
156
167
|
prizeId: string;
|
|
157
168
|
tournamentId: string;
|
|
158
169
|
payoutPosition: number;
|
|
159
|
-
|
|
160
|
-
|
|
170
|
+
/** Token contract for built-in prizes; `null` for `tokenType === "extension"`. */
|
|
171
|
+
tokenAddress: string | null;
|
|
172
|
+
/**
|
|
173
|
+
* `erc20` / `erc721` are built-in token prizes. `extension` is an external
|
|
174
|
+
* `IPrizeExtension` prize (the #269 path): the token fields below are null
|
|
175
|
+
* and `extensionAddress` / `extensionConfig` are populated instead.
|
|
176
|
+
*/
|
|
177
|
+
tokenType: "erc20" | "erc721" | "extension";
|
|
161
178
|
amount: string | null;
|
|
162
179
|
tokenId: string | null;
|
|
163
180
|
distributionType: string | null;
|
|
@@ -167,6 +184,10 @@ interface Prize {
|
|
|
167
184
|
distributionShares: number[] | null;
|
|
168
185
|
distributionCount: number | null;
|
|
169
186
|
sponsorAddress: string;
|
|
187
|
+
/** Extension contract address; only set when `tokenType === "extension"`. */
|
|
188
|
+
extensionAddress: string | null;
|
|
189
|
+
/** Opaque `Span<felt252>` config; only set when `tokenType === "extension"`. */
|
|
190
|
+
extensionConfig: string[] | null;
|
|
170
191
|
}
|
|
171
192
|
/**
|
|
172
193
|
* Discriminator for `RewardClaim.claimKind`. Picks one of the six terminal
|
|
@@ -175,11 +196,11 @@ interface Prize {
|
|
|
175
196
|
* variant-specific fields below are populated only for the kinds that carry
|
|
176
197
|
* them; the two pure-marker creator kinds leave all four nullable fields null.
|
|
177
198
|
*/
|
|
178
|
-
type RewardClaimKind = "prize_single" | "prize_distributed" | "entry_fee_position" | "entry_fee_tournament_creator" | "entry_fee_game_creator" | "entry_fee_refund";
|
|
199
|
+
type RewardClaimKind = "prize_single" | "prize_distributed" | "entry_fee_position" | "entry_fee_tournament_creator" | "entry_fee_game_creator" | "entry_fee_refund" | "prize_extension" | "entry_fee_extension";
|
|
179
200
|
interface RewardClaim {
|
|
180
201
|
tournamentId: string;
|
|
181
202
|
claimKind: RewardClaimKind;
|
|
182
|
-
/** Populated for `prize_single`
|
|
203
|
+
/** Populated for `prize_single`, `prize_distributed`, `prize_extension`. Stringified u64. */
|
|
183
204
|
prizeId: string | null;
|
|
184
205
|
/** Populated for `prize_distributed`. */
|
|
185
206
|
payoutIndex: number | null;
|
|
@@ -187,6 +208,10 @@ interface RewardClaim {
|
|
|
187
208
|
position: number | null;
|
|
188
209
|
/** Populated for `entry_fee_refund`. felt252 hex string of the game token. */
|
|
189
210
|
refundTokenId: string | null;
|
|
211
|
+
/** Game token id, for `prize_extension` / `entry_fee_extension` (Option → null when absent). */
|
|
212
|
+
extensionTokenId: string | null;
|
|
213
|
+
/** Opaque payout/claim params (`Span<felt252>`), for the extension claim kinds. */
|
|
214
|
+
extensionParams: string[] | null;
|
|
190
215
|
claimed: boolean;
|
|
191
216
|
}
|
|
192
217
|
interface PrizeAggregation {
|