@provable-games/budokan-sdk 0.1.5 → 0.1.7
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-eg3Ink5N.d.cts → client-CYj1Iw_w.d.cts} +2 -0
- package/dist/{client-eg3Ink5N.d.ts → client-CYj1Iw_w.d.ts} +2 -0
- package/dist/index.cjs +13 -7
- 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 +13 -7
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +13 -7
- 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 +13 -7
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
package/dist/react.cjs
CHANGED
|
@@ -584,15 +584,15 @@ var CHAINS = {
|
|
|
584
584
|
rpcUrl: "https://api.cartridge.gg/x/starknet/mainnet/rpc/v0_10",
|
|
585
585
|
apiBaseUrl: "https://budokan-api-production.up.railway.app",
|
|
586
586
|
wsUrl: "wss://budokan-api-production.up.railway.app/ws",
|
|
587
|
-
budokanAddress: "
|
|
588
|
-
viewerAddress: "
|
|
587
|
+
budokanAddress: "0x020239968a74f3e190d1b5aa0c6316845062a00cb98f787d661fd4aa860553de",
|
|
588
|
+
viewerAddress: "0x00ace1cce7933fbf0d7a2f32c3b5d4c36e63462f81c7845b6d7ac5d8dbdbefa4"
|
|
589
589
|
},
|
|
590
590
|
sepolia: {
|
|
591
591
|
rpcUrl: "https://starknet-sepolia.public.blastapi.io",
|
|
592
592
|
apiBaseUrl: "https://budokan-api-sepolia.up.railway.app",
|
|
593
593
|
wsUrl: "wss://budokan-api-sepolia.up.railway.app/ws",
|
|
594
|
-
budokanAddress: "
|
|
595
|
-
viewerAddress: "
|
|
594
|
+
budokanAddress: "0x02a97de0b33fb115f5c32a58232d9941c4a5b2598aa71d30c094076cc592f94d",
|
|
595
|
+
viewerAddress: "0x001f2be7ed811bfa859f8f6cf72d2458f36103ac172ff8e65a630bbcc6cf98c9"
|
|
596
596
|
}
|
|
597
597
|
};
|
|
598
598
|
function getChainConfig(chain) {
|
|
@@ -778,9 +778,12 @@ async function getStarknet() {
|
|
|
778
778
|
}
|
|
779
779
|
return starknetModule;
|
|
780
780
|
}
|
|
781
|
-
async function createProvider(rpcUrl) {
|
|
781
|
+
async function createProvider(rpcUrl, headers) {
|
|
782
782
|
const { RpcProvider: StarknetRpcProvider } = await getStarknet();
|
|
783
|
-
const provider = new StarknetRpcProvider({
|
|
783
|
+
const provider = new StarknetRpcProvider({
|
|
784
|
+
nodeUrl: rpcUrl,
|
|
785
|
+
...headers && { headers }
|
|
786
|
+
});
|
|
784
787
|
return provider;
|
|
785
788
|
}
|
|
786
789
|
async function createContract(abi, address, provider) {
|
|
@@ -2409,7 +2412,10 @@ var BudokanClient = class {
|
|
|
2409
2412
|
this.cachedProvider = this.resolvedConfig.provider;
|
|
2410
2413
|
return this.cachedProvider;
|
|
2411
2414
|
}
|
|
2412
|
-
this.cachedProvider = await createProvider(
|
|
2415
|
+
this.cachedProvider = await createProvider(
|
|
2416
|
+
this.resolvedConfig.rpcUrl,
|
|
2417
|
+
this.resolvedConfig.rpcHeaders
|
|
2418
|
+
);
|
|
2413
2419
|
return this.cachedProvider;
|
|
2414
2420
|
}
|
|
2415
2421
|
async getViewerContract() {
|