starknet 8.9.1 → 8.9.2

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.mjs CHANGED
@@ -320,8 +320,8 @@ var DEFAULT_GLOBAL_CONFIG = {
320
320
  blake: void 0
321
321
  };
322
322
  var RPC_DEFAULT_NODES = {
323
- SN_MAIN: [`https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/`],
324
- SN_SEPOLIA: [`https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/`]
323
+ SN_MAIN: [`https://api.zan.top/public/starknet-mainnet/rpc/`],
324
+ SN_SEPOLIA: [`https://api.zan.top/public/starknet-sepolia/rpc/`]
325
325
  };
326
326
  var PAYMASTER_RPC_NODES = {
327
327
  SN_MAIN: [`https://starknet.paymaster.avnu.fi`],
@@ -5543,19 +5543,13 @@ var getDefaultNodeUrl = (networkName, mute = false, rpcVersion) => {
5543
5543
  return nodes[randIdx];
5544
5544
  };
5545
5545
  function getDefaultNodes(rpcVersion) {
5546
- const nodes = { ...RPC_DEFAULT_NODES };
5547
- Object.keys(nodes).forEach(function(key, _) {
5548
- nodes[key] = nodes[key].map((it) => {
5549
- if (it === "https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/") {
5550
- return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
5551
- }
5552
- if (it === "https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/") {
5553
- return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
5554
- }
5555
- return `${it}${toApiVersion(rpcVersion)}`;
5556
- });
5557
- });
5558
- return nodes;
5546
+ const apiVersion = toApiVersion(rpcVersion);
5547
+ return Object.fromEntries(
5548
+ Object.entries(RPC_DEFAULT_NODES).map(([key, urls]) => [
5549
+ key,
5550
+ urls.map((url) => `${url}${apiVersion}`)
5551
+ ])
5552
+ );
5559
5553
  }
5560
5554
  function getSupportedRpcVersions() {
5561
5555
  return [...new Set(Object.values(_SupportedRpcVersion))];