@reyaxyz/common 0.358.0 → 0.358.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.
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,EAAE,CAkBrB;AAED,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,iBAAiB,GACnC,WAAW,CAcb;AAED,eAAO,MAAM,oBAAoB,EAAE;KAChC,GAAG,IAAI,iBAAiB,GAAG,WAAW,GAAG,MAAM;CAYjD,CAAC;AA8FF,eAAO,MAAM,gBAAgB,WACnB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,eAAe,WAClB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC"}
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE1D,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,GACnB,iBAAiB,EAAE,CAkBrB;AAED,wBAAgB,mCAAmC,CACjD,iBAAiB,EAAE,iBAAiB,GACnC,WAAW,CAcb;AAED,eAAO,MAAM,oBAAoB,EAAE;KAChC,GAAG,IAAI,iBAAiB,GAAG,WAAW,GAAG,MAAM;CAYjD,CAAC;AA4FF,eAAO,MAAM,gBAAgB,WACnB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,eAAe,WAClB,MAAM,WACL,iBAAiB,KACzB,MAAM,GAAG,IAQX,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC;AAEF,eAAO,MAAM,uBAAuB,YACzB,iBAAiB,GAAG,WAAW,KACvC,MAAM,EAQR,CAAC"}
@@ -44,9 +44,7 @@ exports.chainIdToExplorerURL = (_a = {},
44
44
  _a[types_1.ReyaChainId.reyaCronos] = 'https://reya-cronos.blockscout.com',
45
45
  _a);
46
46
  var ChainRpcUrls = (_b = {},
47
- _b[types_1.ReyaChainId.reyaNetwork] = [
48
- 'https://rpc.reya.network/263e76b89da84d478fd2b6e8783a1cfe',
49
- ],
47
+ _b[types_1.ReyaChainId.reyaNetwork] = ['https://rpc.reya.network'],
50
48
  _b[types_1.MoneyInOutChainId.ethereumMainnet] = [
51
49
  'https://mainnet.gateway.tenderly.co',
52
50
  'https://eth.llamarpc.com',
@@ -89,7 +87,7 @@ var ChainRpcUrls = (_b = {},
89
87
  ],
90
88
  // Add the rest of the mainnet URLs above
91
89
  _b[types_1.ReyaChainId.reyaCronos] = [
92
- 'https://rpc.reya-cronos.gelato.digital/263e76b89da84d478fd2b6e8783a1cfe',
90
+ 'https://rpc-reya-cronos.t.conduit.xyz/7F8HNfECaatE8VEZGD5gcJPghXqhshTTi',
93
91
  ],
94
92
  _b[types_1.MoneyInOutChainId.arbitrumSepolia] = [
95
93
  'https://sepolia-rollup.arbitrum.io/rpc',
@@ -1 +1 @@
1
- {"version":3,"file":"network.js","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":";;;;AAAA,kCAA0D;AAE1D,SAAgB,qBAAqB,CACnC,OAAoB;IAEpB,IAAI,OAAO,KAAK,mBAAW,CAAC,WAAW;QACrC,OAAO;YACL,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAA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E,CAAC;AAC/B,CAAC,CAAC;AAXW,QAAA,eAAe,mBAW1B;AAEK,IAAM,gBAAgB,GAAG,UAC9B,OAAwC;IAExC,IAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAEtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,IAAM,uBAAuB,GAAG,UACrC,OAAwC;IAExC,IAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC","sourcesContent":["import { MoneyInOutChainId, ReyaChainId } from '../types';\n\nexport function getMoneyInOutNetworks(\n chainId: ReyaChainId,\n): MoneyInOutChainId[] {\n if (chainId === ReyaChainId.reyaNetwork)\n return [\n MoneyInOutChainId.ethereumMainnet,\n MoneyInOutChainId.opMainnet,\n MoneyInOutChainId.polygonMainnet,\n MoneyInOutChainId.arbitrumOne,\n MoneyInOutChainId.baseMainnet,\n ];\n\n if (chainId === ReyaChainId.reyaCronos)\n return [\n MoneyInOutChainId.ethereumSepolia,\n MoneyInOutChainId.opSepolia,\n MoneyInOutChainId.arbitrumSepolia,\n ];\n\n throw new Error(`Unknown Reya chain id ${chainId}`);\n}\n\nexport function getReyaNetworkFromMoneyInOutChainId(\n moneyInOutChainId: MoneyInOutChainId,\n): ReyaChainId {\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaNetwork).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaNetwork;\n }\n\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaCronos).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaCronos;\n }\n\n throw new Error(`Unknown external chain id ${moneyInOutChainId}`);\n}\n\nexport const chainIdToExplorerURL: {\n [key in MoneyInOutChainId | ReyaChainId]: string;\n} = {\n [MoneyInOutChainId.ethereumMainnet]: 'https://etherscan.io',\n [MoneyInOutChainId.opMainnet]: 'https://optimistic.etherscan.io',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygonscan.com',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbiscan.io',\n [MoneyInOutChainId.baseMainnet]: 'https://basescan.org',\n [MoneyInOutChainId.arbitrumSepolia]: 'https://sepolia.arbiscan.io',\n [MoneyInOutChainId.opSepolia]: 'https://sepolia-optimism.etherscan.io',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.etherscan.io',\n [ReyaChainId.reyaNetwork]: 'https://explorer.reya.network',\n [ReyaChainId.reyaCronos]: 'https://reya-cronos.blockscout.com',\n};\n\nconst ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {\n [ReyaChainId.reyaNetwork]: [\n 'https://rpc.reya.network/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.ethereumMainnet]: [\n 'https://mainnet.gateway.tenderly.co',\n 'https://eth.llamarpc.com',\n 'https://eth-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://eth-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://eth-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://mainnet.gateway.tenderly.co/69U6LoF0URUv5CfuIU7FdL',\n ],\n [MoneyInOutChainId.opMainnet]: [\n 'https://mainnet.optimism.io',\n 'https://optimism.llamarpc.com',\n 'https://opt-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://opt-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://opt-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://optimism.gateway.tenderly.co/69LkAPTI3LODcBAdtz9wQC',\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n 'https://polygon-rpc.com',\n 'https://gateway.tenderly.co/public/polygon',\n 'https://polygon-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://polygon-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://polygon-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://polygon.gateway.tenderly.co/7Qw4fTY4kf3v02LjJjWyvZ',\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n 'https://arb1.arbitrum.io/rpc',\n 'https://arbitrum.llamarpc.com',\n 'https://arb-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://arb-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://arb-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://arbitrum.gateway.tenderly.co/1wQGK6nNPTbSc7asucAbzA',\n ],\n [MoneyInOutChainId.baseMainnet]: [\n 'https://mainnet.base.org',\n 'https://base.llamarpc.com',\n 'https://base-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://base-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://base-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://base.gateway.tenderly.co/2LHAD54IBvgXiVQdhE9mIF',\n ],\n // Add the rest of the mainnet URLs above\n [ReyaChainId.reyaCronos]: [\n 'https://rpc.reya-cronos.gelato.digital/263e76b89da84d478fd2b6e8783a1cfe',\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n 'https://sepolia-rollup.arbitrum.io/rpc',\n 'https://endpoints.omniatech.io/v1/arbitrum/sepolia/public',\n 'https://arbitrum-sepolia.gateway.tenderly.co/4YMRN8fKu2SV1JSNsGlbMZ',\n ],\n [MoneyInOutChainId.opSepolia]: [\n 'https://sepolia.optimism.io',\n 'https://optimism-sepolia.blockpi.network/v1/rpc/public',\n 'https://optimism-sepolia.gateway.tenderly.co/2nXBEGPk57CotvTJMjIMK7',\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n 'https://sepolia.gateway.tenderly.co',\n 'https://ethereum-sepolia.blockpi.network/v1/rpc/public',\n 'https://sepolia.gateway.tenderly.co/1u2yZV1rdVLpgOeHwD1Z8M',\n ],\n};\n\nconst ALCHEMY_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://eth-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.opMainnet]: 'https://opt-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.polygonMainnet]:\n 'https://polygon-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.arbitrumOne]: 'https://arb-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.g.alchemy.com/v2',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arb-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.opSepolia]: 'https://opt-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.ethereumSepolia]: 'https://eth-sepolia.g.alchemy.com/v2',\n};\n\nconst INFURA_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://mainnet.infura.io/v3',\n [MoneyInOutChainId.opMainnet]: 'https://optimism-mainnet.infura.io/v3',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygon-mainnet.infura.io/v3',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbitrum-mainnet.infura.io/v3',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.infura.io/v3',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arbitrum-sepolia.infura.io/v3',\n [MoneyInOutChainId.opSepolia]: 'https://optimism-sepolia.infura.io/v3',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.infura.io/v3',\n};\n\nexport const getAlchemyRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = ALCHEMY_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getInfuraRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = INFURA_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getPublicRpcUrls = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = ChainRpcUrls[chainId];\n\n if (!rpcUrls) {\n return [];\n }\n\n return rpcUrls;\n};\n\nexport const getPublicRpcUrlsOrThrow = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = getPublicRpcUrls(chainId);\n\n if (rpcUrls.length === 0) {\n throw new Error('No public RPC URLs configured for the chain: ' + chainId);\n }\n\n return rpcUrls;\n};\n"]}
1
+ {"version":3,"file":"network.js","sourceRoot":"/","sources":["utils/network.ts"],"names":[],"mappings":";;;;AAAA,kCAA0D;AAE1D,SAAgB,qBAAqB,CACnC,OAAoB;IAEpB,IAAI,OAAO,KAAK,mBAAW,CAAC,WAAW;QACrC,OAAO;YACL,yBAAiB,CAAC,eAAe;YACjC,yBAAiB,CAAC,SAAS;YAC3B,yBAAiB,CAAC,cAAc;YAChC,yBAAiB,CAAC,WAAW;YAC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mBAW1B;AAEK,IAAM,gBAAgB,GAAG,UAC9B,OAAwC;IAExC,IAAM,OAAO,GAAG,YAAY,CAAC,OAAO,CAAC,CAAC;IAEtC,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACZ,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,gBAAgB,oBAU3B;AAEK,IAAM,uBAAuB,GAAG,UACrC,OAAwC;IAExC,IAAM,OAAO,GAAG,IAAA,wBAAgB,EAAC,OAAO,CAAC,CAAC;IAE1C,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,+CAA+C,GAAG,OAAO,CAAC,CAAC;IAC7E,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAVW,QAAA,uBAAuB,2BAUlC","sourcesContent":["import { MoneyInOutChainId, ReyaChainId } from '../types';\n\nexport function getMoneyInOutNetworks(\n chainId: ReyaChainId,\n): MoneyInOutChainId[] {\n if (chainId === ReyaChainId.reyaNetwork)\n return [\n MoneyInOutChainId.ethereumMainnet,\n MoneyInOutChainId.opMainnet,\n MoneyInOutChainId.polygonMainnet,\n MoneyInOutChainId.arbitrumOne,\n MoneyInOutChainId.baseMainnet,\n ];\n\n if (chainId === ReyaChainId.reyaCronos)\n return [\n MoneyInOutChainId.ethereumSepolia,\n MoneyInOutChainId.opSepolia,\n MoneyInOutChainId.arbitrumSepolia,\n ];\n\n throw new Error(`Unknown Reya chain id ${chainId}`);\n}\n\nexport function getReyaNetworkFromMoneyInOutChainId(\n moneyInOutChainId: MoneyInOutChainId,\n): ReyaChainId {\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaNetwork).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaNetwork;\n }\n\n if (\n getMoneyInOutNetworks(ReyaChainId.reyaCronos).includes(moneyInOutChainId)\n ) {\n return ReyaChainId.reyaCronos;\n }\n\n throw new Error(`Unknown external chain id ${moneyInOutChainId}`);\n}\n\nexport const chainIdToExplorerURL: {\n [key in MoneyInOutChainId | ReyaChainId]: string;\n} = {\n [MoneyInOutChainId.ethereumMainnet]: 'https://etherscan.io',\n [MoneyInOutChainId.opMainnet]: 'https://optimistic.etherscan.io',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygonscan.com',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbiscan.io',\n [MoneyInOutChainId.baseMainnet]: 'https://basescan.org',\n [MoneyInOutChainId.arbitrumSepolia]: 'https://sepolia.arbiscan.io',\n [MoneyInOutChainId.opSepolia]: 'https://sepolia-optimism.etherscan.io',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.etherscan.io',\n [ReyaChainId.reyaNetwork]: 'https://explorer.reya.network',\n [ReyaChainId.reyaCronos]: 'https://reya-cronos.blockscout.com',\n};\n\nconst ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {\n [ReyaChainId.reyaNetwork]: ['https://rpc.reya.network'],\n [MoneyInOutChainId.ethereumMainnet]: [\n 'https://mainnet.gateway.tenderly.co',\n 'https://eth.llamarpc.com',\n 'https://eth-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://eth-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://eth-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://mainnet.gateway.tenderly.co/69U6LoF0URUv5CfuIU7FdL',\n ],\n [MoneyInOutChainId.opMainnet]: [\n 'https://mainnet.optimism.io',\n 'https://optimism.llamarpc.com',\n 'https://opt-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://opt-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://opt-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://optimism.gateway.tenderly.co/69LkAPTI3LODcBAdtz9wQC',\n ],\n [MoneyInOutChainId.polygonMainnet]: [\n 'https://polygon-rpc.com',\n 'https://gateway.tenderly.co/public/polygon',\n 'https://polygon-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://polygon-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://polygon-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://polygon.gateway.tenderly.co/7Qw4fTY4kf3v02LjJjWyvZ',\n ],\n [MoneyInOutChainId.arbitrumOne]: [\n 'https://arb1.arbitrum.io/rpc',\n 'https://arbitrum.llamarpc.com',\n 'https://arb-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://arb-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://arb-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://arbitrum.gateway.tenderly.co/1wQGK6nNPTbSc7asucAbzA',\n ],\n [MoneyInOutChainId.baseMainnet]: [\n 'https://mainnet.base.org',\n 'https://base.llamarpc.com',\n 'https://base-mainnet.g.alchemy.com/v2/Tkk3-2tTcsCLnFa4dSSUkpZsDyOH55Ar',\n 'https://base-mainnet.g.alchemy.com/v2/Bin_D_qtJLCqvFyzt-0SxZRWTL423_tg',\n 'https://base-mainnet.g.alchemy.com/v2/A21_W1GwGu775PCAoQbj_pJgBPzIgAzv',\n 'https://base.gateway.tenderly.co/2LHAD54IBvgXiVQdhE9mIF',\n ],\n // Add the rest of the mainnet URLs above\n [ReyaChainId.reyaCronos]: [\n 'https://rpc-reya-cronos.t.conduit.xyz/7F8HNfECaatE8VEZGD5gcJPghXqhshTTi',\n ],\n [MoneyInOutChainId.arbitrumSepolia]: [\n 'https://sepolia-rollup.arbitrum.io/rpc',\n 'https://endpoints.omniatech.io/v1/arbitrum/sepolia/public',\n 'https://arbitrum-sepolia.gateway.tenderly.co/4YMRN8fKu2SV1JSNsGlbMZ',\n ],\n [MoneyInOutChainId.opSepolia]: [\n 'https://sepolia.optimism.io',\n 'https://optimism-sepolia.blockpi.network/v1/rpc/public',\n 'https://optimism-sepolia.gateway.tenderly.co/2nXBEGPk57CotvTJMjIMK7',\n ],\n [MoneyInOutChainId.ethereumSepolia]: [\n 'https://sepolia.gateway.tenderly.co',\n 'https://ethereum-sepolia.blockpi.network/v1/rpc/public',\n 'https://sepolia.gateway.tenderly.co/1u2yZV1rdVLpgOeHwD1Z8M',\n ],\n};\n\nconst ALCHEMY_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://eth-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.opMainnet]: 'https://opt-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.polygonMainnet]:\n 'https://polygon-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.arbitrumOne]: 'https://arb-mainnet.g.alchemy.com/v2',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.g.alchemy.com/v2',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arb-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.opSepolia]: 'https://opt-sepolia.g.alchemy.com/v2',\n [MoneyInOutChainId.ethereumSepolia]: 'https://eth-sepolia.g.alchemy.com/v2',\n};\n\nconst INFURA_BASE_RPC_URL: Record<MoneyInOutChainId, string> = {\n // mainnet\n [MoneyInOutChainId.ethereumMainnet]: 'https://mainnet.infura.io/v3',\n [MoneyInOutChainId.opMainnet]: 'https://optimism-mainnet.infura.io/v3',\n [MoneyInOutChainId.polygonMainnet]: 'https://polygon-mainnet.infura.io/v3',\n [MoneyInOutChainId.arbitrumOne]: 'https://arbitrum-mainnet.infura.io/v3',\n [MoneyInOutChainId.baseMainnet]: 'https://base-mainnet.infura.io/v3',\n // testnet\n [MoneyInOutChainId.arbitrumSepolia]: 'https://arbitrum-sepolia.infura.io/v3',\n [MoneyInOutChainId.opSepolia]: 'https://optimism-sepolia.infura.io/v3',\n [MoneyInOutChainId.ethereumSepolia]: 'https://sepolia.infura.io/v3',\n};\n\nexport const getAlchemyRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = ALCHEMY_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getInfuraRpcUrl = (\n apiKey: string,\n chainId: MoneyInOutChainId,\n): string | null => {\n const rpcUrl = INFURA_BASE_RPC_URL[chainId];\n\n if (!rpcUrl) {\n return null;\n }\n\n return `${rpcUrl}/${apiKey}`;\n};\n\nexport const getPublicRpcUrls = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = ChainRpcUrls[chainId];\n\n if (!rpcUrls) {\n return [];\n }\n\n return rpcUrls;\n};\n\nexport const getPublicRpcUrlsOrThrow = (\n chainId: MoneyInOutChainId | ReyaChainId,\n): string[] => {\n const rpcUrls = getPublicRpcUrls(chainId);\n\n if (rpcUrls.length === 0) {\n throw new Error('No public RPC URLs configured for the chain: ' + chainId);\n }\n\n return rpcUrls;\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reyaxyz/common",
3
- "version": "0.358.0",
3
+ "version": "0.358.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -45,5 +45,5 @@
45
45
  "generate:coverage-badges": "npx istanbul-badges-readme --silent"
46
46
  },
47
47
  "packageManager": "pnpm@8.3.1",
48
- "gitHead": "ec130f63bf452135e9bc0e876a87e555f79dec90"
48
+ "gitHead": "1e3e82c0e07cb9f6daaf126b88a3cf6e9c4e1439"
49
49
  }
@@ -56,9 +56,7 @@ export const chainIdToExplorerURL: {
56
56
  };
57
57
 
58
58
  const ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {
59
- [ReyaChainId.reyaNetwork]: [
60
- 'https://rpc.reya.network/263e76b89da84d478fd2b6e8783a1cfe',
61
- ],
59
+ [ReyaChainId.reyaNetwork]: ['https://rpc.reya.network'],
62
60
  [MoneyInOutChainId.ethereumMainnet]: [
63
61
  'https://mainnet.gateway.tenderly.co',
64
62
  'https://eth.llamarpc.com',
@@ -101,7 +99,7 @@ const ChainRpcUrls: Record<MoneyInOutChainId | ReyaChainId, string[]> = {
101
99
  ],
102
100
  // Add the rest of the mainnet URLs above
103
101
  [ReyaChainId.reyaCronos]: [
104
- 'https://rpc.reya-cronos.gelato.digital/263e76b89da84d478fd2b6e8783a1cfe',
102
+ 'https://rpc-reya-cronos.t.conduit.xyz/7F8HNfECaatE8VEZGD5gcJPghXqhshTTi',
105
103
  ],
106
104
  [MoneyInOutChainId.arbitrumSepolia]: [
107
105
  'https://sepolia-rollup.arbitrum.io/rpc',