@provable-games/budokan-sdk 0.1.22 → 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/{client-DlXvzneQ.d.cts → player-C2GE9Lop.d.cts} +65 -5
- package/dist/{client-DlXvzneQ.d.ts → player-C2GE9Lop.d.ts} +65 -5
- package/dist/react.cjs +1194 -352
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +45 -2
- package/dist/react.d.ts +45 -2
- package/dist/react.js +1195 -354
- package/dist/react.js.map +1 -1
- package/package.json +5 -7
package/README.md
CHANGED
|
@@ -100,6 +100,38 @@ function TournamentFeed({ tournamentId }: { tournamentId: string }) {
|
|
|
100
100
|
}
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
### Whitelisted Games
|
|
104
|
+
|
|
105
|
+
The SDK ships a curated per-chain list of games and per-game UX metadata
|
|
106
|
+
(homepage URLs, default entry-fee token, controller-only flag, etc.) that
|
|
107
|
+
the official Budokan client uses to filter the on-chain denshokan registry.
|
|
108
|
+
Other integrations — Telegram bot, third-party UIs — can use the same
|
|
109
|
+
list to stay consistent.
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import {
|
|
113
|
+
getWhitelistedGames,
|
|
114
|
+
findWhitelistedGame,
|
|
115
|
+
isGameWhitelisted,
|
|
116
|
+
getGameDefaults,
|
|
117
|
+
} from "@provable-games/budokan-sdk";
|
|
118
|
+
|
|
119
|
+
// Sorted by name, disabled entries last
|
|
120
|
+
const games = getWhitelistedGames("mainnet");
|
|
121
|
+
// → [{ contractAddress: "0x4de0...", name: "Death Mountain", url: "...", ... }, ...]
|
|
122
|
+
|
|
123
|
+
const dm = findWhitelistedGame("mainnet", "0x4de0351c..."); // address auto-normalized
|
|
124
|
+
const ok = isGameWhitelisted("sepolia", anyAddress);
|
|
125
|
+
|
|
126
|
+
// Defaults block — falls back to STRK / 1% / $0.25 when the game isn't whitelisted
|
|
127
|
+
const { minEntryFeeUsd, defaultEntryFeeToken, defaultGameFeePercentage } =
|
|
128
|
+
getGameDefaults("mainnet", gameAddress);
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
The denshokan registry is still the source of truth for which games *exist*;
|
|
132
|
+
this whitelist is a layer on top that callers can intersect with the
|
|
133
|
+
registry to filter to "games we trust + display metadata for."
|
|
134
|
+
|
|
103
135
|
## Configuration
|
|
104
136
|
|
|
105
137
|
```ts
|