@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/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: "0x06137ee50f57d08e1d0d758045e45982e2f5ef4826091ed4db136e7afbafecce",
588
- viewerAddress: "0x075d1b9f1a9751e6b8f8b5a4ca8e721f10c58d87607e703cda062e512a434443"
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: "0x0072a26c29ba5021508bbbb8487663a2a536b8a926acf388d3d772961bd063e0",
595
- viewerAddress: "0x06bef644110a02c1b075b539953c707cd03b4bb32b42f5f1b0b0090b5139529f"
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({ nodeUrl: rpcUrl });
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(this.resolvedConfig.rpcUrl);
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() {