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.js CHANGED
@@ -495,8 +495,8 @@ var DEFAULT_GLOBAL_CONFIG = {
495
495
  blake: void 0
496
496
  };
497
497
  var RPC_DEFAULT_NODES = {
498
- SN_MAIN: [`https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/`],
499
- SN_SEPOLIA: [`https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/`]
498
+ SN_MAIN: [`https://api.zan.top/public/starknet-mainnet/rpc/`],
499
+ SN_SEPOLIA: [`https://api.zan.top/public/starknet-sepolia/rpc/`]
500
500
  };
501
501
  var PAYMASTER_RPC_NODES = {
502
502
  SN_MAIN: [`https://starknet.paymaster.avnu.fi`],
@@ -5718,19 +5718,13 @@ var getDefaultNodeUrl = (networkName, mute = false, rpcVersion) => {
5718
5718
  return nodes[randIdx];
5719
5719
  };
5720
5720
  function getDefaultNodes(rpcVersion) {
5721
- const nodes = { ...RPC_DEFAULT_NODES };
5722
- Object.keys(nodes).forEach(function(key, _) {
5723
- nodes[key] = nodes[key].map((it) => {
5724
- if (it === "https://starknet-sepolia.g.alchemy.com/starknet/version/rpc/") {
5725
- return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
5726
- }
5727
- if (it === "https://starknet-mainnet.g.alchemy.com/starknet/version/rpc/") {
5728
- return `${it}${toApiVersion(rpcVersion)}/uYLxCteYbHTFJpKSoKdVm`;
5729
- }
5730
- return `${it}${toApiVersion(rpcVersion)}`;
5731
- });
5732
- });
5733
- return nodes;
5721
+ const apiVersion = toApiVersion(rpcVersion);
5722
+ return Object.fromEntries(
5723
+ Object.entries(RPC_DEFAULT_NODES).map(([key, urls]) => [
5724
+ key,
5725
+ urls.map((url) => `${url}${apiVersion}`)
5726
+ ])
5727
+ );
5734
5728
  }
5735
5729
  function getSupportedRpcVersions() {
5736
5730
  return [...new Set(Object.values(_SupportedRpcVersion))];