UNPKG

@etherspot/remote-signer

Version:

Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler

1,430 lines (1,400 loc) 41.3 kB
var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/sdk/network/index.ts var network_exports = {}; __export(network_exports, { CHAIN_ID_TO_NETWORK_NAME: () => CHAIN_ID_TO_NETWORK_NAME, DEFAULT_BOOTSTRAP_ADDRESS: () => DEFAULT_BOOTSTRAP_ADDRESS, DEFAULT_ERC20_SESSION_KEY_VALIDATOR_ADDRESS: () => DEFAULT_ERC20_SESSION_KEY_VALIDATOR_ADDRESS, DEFAULT_MULTIPLE_OWNER_ECDSA_VALIDATOR_ADDRESS: () => DEFAULT_MULTIPLE_OWNER_ECDSA_VALIDATOR_ADDRESS, DEFAULT_QUERY_PAGE_SIZE: () => DEFAULT_QUERY_PAGE_SIZE, NETWORK_NAME_TO_CHAIN_ID: () => NETWORK_NAME_TO_CHAIN_ID, NetworkNames: () => NetworkNames, Networks: () => Networks, SupportedNetworks: () => SupportedNetworks, getNetworkConfig: () => getNetworkConfig, networkNameToChainId: () => networkNameToChainId, onRamperAllNetworks: () => onRamperAllNetworks, prepareNetworkName: () => prepareNetworkName }); module.exports = __toCommonJS(network_exports); // node_modules/viem/_esm/utils/chain/defineChain.js function defineChain(chain) { return { formatters: void 0, fees: void 0, serializers: void 0, ...chain }; } // node_modules/viem/_esm/chains/definitions/arbitrum.js var arbitrum = /* @__PURE__ */ defineChain({ id: 42161, name: "Arbitrum One", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://arb1.arbitrum.io/rpc"] } }, blockExplorers: { default: { name: "Arbiscan", url: "https://arbiscan.io", apiUrl: "https://api.arbiscan.io/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 7654707 } } }); // node_modules/viem/_esm/chains/definitions/arbitrumSepolia.js var arbitrumSepolia = /* @__PURE__ */ defineChain({ id: 421614, name: "Arbitrum Sepolia", nativeCurrency: { name: "Arbitrum Sepolia Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://sepolia-rollup.arbitrum.io/rpc"] } }, blockExplorers: { default: { name: "Arbiscan", url: "https://sepolia.arbiscan.io", apiUrl: "https://api-sepolia.arbiscan.io/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 81930 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/avalanche.js var avalanche = /* @__PURE__ */ defineChain({ id: 43114, name: "Avalanche", nativeCurrency: { decimals: 18, name: "Avalanche", symbol: "AVAX" }, rpcUrls: { default: { http: ["https://api.avax.network/ext/bc/C/rpc"] } }, blockExplorers: { default: { name: "SnowTrace", url: "https://snowtrace.io", apiUrl: "https://api.snowtrace.io" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 11907934 } } }); // node_modules/viem/_esm/chains/definitions/avalancheFuji.js var avalancheFuji = /* @__PURE__ */ defineChain({ id: 43113, name: "Avalanche Fuji", nativeCurrency: { decimals: 18, name: "Avalanche Fuji", symbol: "AVAX" }, rpcUrls: { default: { http: ["https://api.avax-test.network/ext/bc/C/rpc"] } }, blockExplorers: { default: { name: "SnowTrace", url: "https://testnet.snowtrace.io", apiUrl: "https://api-testnet.snowtrace.io" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 7096959 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/bsc.js var bsc = /* @__PURE__ */ defineChain({ id: 56, name: "BNB Smart Chain", nativeCurrency: { decimals: 18, name: "BNB", symbol: "BNB" }, rpcUrls: { default: { http: ["https://rpc.ankr.com/bsc"] } }, blockExplorers: { default: { name: "BscScan", url: "https://bscscan.com", apiUrl: "https://api.bscscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 15921452 } } }); // node_modules/viem/_esm/chains/definitions/bscTestnet.js var bscTestnet = /* @__PURE__ */ defineChain({ id: 97, name: "Binance Smart Chain Testnet", nativeCurrency: { decimals: 18, name: "BNB", symbol: "tBNB" }, rpcUrls: { default: { http: ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"] } }, blockExplorers: { default: { name: "BscScan", url: "https://testnet.bscscan.com", apiUrl: "https://testnet.bscscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 17422483 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/flare.js var flare = /* @__PURE__ */ defineChain({ id: 14, name: "Flare Mainnet", nativeCurrency: { decimals: 18, name: "flare", symbol: "FLR" }, rpcUrls: { default: { http: ["https://flare-api.flare.network/ext/C/rpc"] } }, blockExplorers: { default: { name: "Flare Explorer", url: "https://flare-explorer.flare.network", apiUrl: "https://flare-explorer.flare.network/api" } } }); // node_modules/viem/_esm/chains/definitions/flareTestnet.js var flareTestnet = /* @__PURE__ */ defineChain({ id: 114, name: "Coston2", nativeCurrency: { decimals: 18, name: "coston2flare", symbol: "C2FLR" }, rpcUrls: { default: { http: ["https://coston2-api.flare.network/ext/C/rpc"] } }, blockExplorers: { default: { name: "Coston2 Explorer", url: "https://coston2-explorer.flare.network", apiUrl: "https://coston2-explorer.flare.network/api" } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/fuse.js var fuse = /* @__PURE__ */ defineChain({ id: 122, name: "Fuse", nativeCurrency: { name: "Fuse", symbol: "FUSE", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.fuse.io"] } }, blockExplorers: { default: { name: "Fuse Explorer", url: "https://explorer.fuse.io", apiUrl: "https://explorer.fuse.io/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 16146628 } } }); // node_modules/viem/_esm/chains/definitions/gnosis.js var gnosis = /* @__PURE__ */ defineChain({ id: 100, name: "Gnosis", nativeCurrency: { decimals: 18, name: "Gnosis", symbol: "xDAI" }, rpcUrls: { default: { http: ["https://rpc.gnosischain.com"], webSocket: ["wss://rpc.gnosischain.com/wss"] } }, blockExplorers: { default: { name: "Gnosisscan", url: "https://gnosisscan.io", apiUrl: "https://api.gnosisscan.io/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 21022491 } } }); // node_modules/viem/_esm/chains/definitions/linea.js var linea = /* @__PURE__ */ defineChain({ id: 59144, name: "Linea Mainnet", nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.linea.build"], webSocket: ["wss://rpc.linea.build"] } }, blockExplorers: { default: { name: "Etherscan", url: "https://lineascan.build", apiUrl: "https://api.lineascan.build/api" } }, contracts: { multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11", blockCreated: 42 } }, testnet: false }); // node_modules/viem/_esm/chains/definitions/lineaGoerli.js var lineaGoerli = /* @__PURE__ */ defineChain({ id: 59140, name: "Linea Goerli Testnet", nativeCurrency: { name: "Linea Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.goerli.linea.build"], webSocket: ["wss://rpc.goerli.linea.build"] } }, blockExplorers: { default: { name: "Etherscan", url: "https://goerli.lineascan.build", apiUrl: "https://api-goerli.lineascan.build/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 498623 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/mainnet.js var mainnet = /* @__PURE__ */ defineChain({ id: 1, name: "Ethereum", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://cloudflare-eth.com"] } }, blockExplorers: { default: { name: "Etherscan", url: "https://etherscan.io", apiUrl: "https://api.etherscan.io/api" } }, contracts: { ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" }, ensUniversalResolver: { address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67", blockCreated: 19258213 }, multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 14353601 } } }); // node_modules/viem/_esm/chains/definitions/mantle.js var mantle = /* @__PURE__ */ defineChain({ id: 5e3, name: "Mantle", nativeCurrency: { decimals: 18, name: "MNT", symbol: "MNT" }, rpcUrls: { default: { http: ["https://rpc.mantle.xyz"] } }, blockExplorers: { default: { name: "Mantle Explorer", url: "https://mantlescan.xyz/", apiUrl: "https://api.mantlescan.xyz/api" } }, contracts: { multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11", blockCreated: 304717 } } }); // node_modules/viem/_esm/chains/definitions/mantleSepoliaTestnet.js var mantleSepoliaTestnet = /* @__PURE__ */ defineChain({ id: 5003, name: "Mantle Sepolia Testnet", nativeCurrency: { decimals: 18, name: "MNT", symbol: "MNT" }, rpcUrls: { default: { http: ["https://rpc.sepolia.mantle.xyz"] } }, blockExplorers: { default: { name: "Mantle Testnet Explorer", url: "https://explorer.sepolia.mantle.xyz/", apiUrl: "https://explorer.sepolia.mantle.xyz/api" } }, contracts: { multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11", blockCreated: 4584012 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/polygon.js var polygon = /* @__PURE__ */ defineChain({ id: 137, name: "Polygon", nativeCurrency: { name: "MATIC", symbol: "MATIC", decimals: 18 }, rpcUrls: { default: { http: ["https://polygon-rpc.com"] } }, blockExplorers: { default: { name: "PolygonScan", url: "https://polygonscan.com", apiUrl: "https://api.polygonscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 25770160 } } }); // node_modules/viem/_esm/chains/definitions/polygonAmoy.js var polygonAmoy = /* @__PURE__ */ defineChain({ id: 80002, name: "Polygon Amoy", nativeCurrency: { name: "MATIC", symbol: "MATIC", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc-amoy.polygon.technology"] } }, blockExplorers: { default: { name: "PolygonScan", url: "https://amoy.polygonscan.com", apiUrl: "https://api-amoy.polygonscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 3127388 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/rootstock.js var rootstock = /* @__PURE__ */ defineChain({ id: 30, name: "Rootstock Mainnet", network: "rootstock", nativeCurrency: { decimals: 18, name: "Rootstock Bitcoin", symbol: "RBTC" }, rpcUrls: { default: { http: ["https://public-node.rsk.co"] } }, blockExplorers: { default: { name: "RSK Explorer", url: "https://explorer.rsk.co" } }, contracts: { multicall3: { address: "0xcA11bde05977b3631167028862bE2a173976CA11", blockCreated: 4249540 } } }); // node_modules/viem/_esm/chains/definitions/rootstockTestnet.js var rootstockTestnet = /* @__PURE__ */ defineChain({ id: 31, name: "Rootstock Testnet", network: "rootstock", nativeCurrency: { decimals: 18, name: "Rootstock Bitcoin", symbol: "tRBTC" }, rpcUrls: { default: { http: ["https://public-node.testnet.rsk.co"] } }, blockExplorers: { default: { name: "RSK Explorer", url: "https://explorer.testnet.rootstock.io" } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/scroll.js var scroll = /* @__PURE__ */ defineChain({ id: 534352, name: "Scroll", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.scroll.io"], webSocket: ["wss://wss-rpc.scroll.io/ws"] } }, blockExplorers: { default: { name: "Scrollscan", url: "https://scrollscan.com", apiUrl: "https://api.scrollscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 14 } }, testnet: false }); // node_modules/viem/_esm/chains/definitions/scrollSepolia.js var scrollSepolia = /* @__PURE__ */ defineChain({ id: 534351, name: "Scroll Sepolia", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://sepolia-rpc.scroll.io"] } }, blockExplorers: { default: { name: "Scrollscan", url: "https://sepolia.scrollscan.com", apiUrl: "https://api-sepolia.scrollscan.com/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 9473 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/sepolia.js var sepolia = /* @__PURE__ */ defineChain({ id: 11155111, name: "Sepolia", nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.sepolia.org"] } }, blockExplorers: { default: { name: "Etherscan", url: "https://sepolia.etherscan.io", apiUrl: "https://api-sepolia.etherscan.io/api" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 751532 }, ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" }, ensUniversalResolver: { address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC", blockCreated: 5317080 } }, testnet: true }); // node_modules/viem/_esm/chains/definitions/xdc.js var xdc = /* @__PURE__ */ defineChain({ id: 50, name: "XinFin Network", nativeCurrency: { decimals: 18, name: "XDC", symbol: "XDC" }, rpcUrls: { default: { http: ["https://rpc.xinfin.network"] } }, blockExplorers: { xinfin: { name: "XinFin", url: "https://explorer.xinfin.network" }, default: { name: "Blocksscan", url: "https://xdc.blocksscan.io" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 71542788 } } }); // node_modules/viem/_esm/chains/definitions/xdcTestnet.js var xdcTestnet = /* @__PURE__ */ defineChain({ id: 51, name: "Apothem Network", nativeCurrency: { decimals: 18, name: "TXDC", symbol: "TXDC" }, rpcUrls: { default: { http: ["https://erpc.apothem.network"] } }, blockExplorers: { default: { name: "Blocksscan", url: "https://apothem.blocksscan.io" } }, contracts: { multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 59765389 } } }); // src/sdk/network/ViemChainConfig.ts var sourceId = 1; var optimism = /* @__PURE__ */ defineChain({ id: 10, name: "OP Mainnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://mainnet.optimism.io"] } }, blockExplorers: { default: { name: "Optimism Explorer", url: "https://optimistic.etherscan.io", apiUrl: "https://api-optimistic.etherscan.io/api" } }, contracts: { disputeGameFactory: { [sourceId]: { address: "0xe5965Ab5962eDc7477C8520243A95517CD252fA9" } }, l2OutputOracle: { [sourceId]: { address: "0xdfe97868233d1aa22e815a266982f2cf17685a27" } }, multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 4286263 }, portal: { [sourceId]: { address: "0xbEb5Fc579115071764c7423A4f12eDde41f106Ed" } }, l1StandardBridge: { [sourceId]: { address: "0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1" } } }, sourceId }); var base = /* @__PURE__ */ defineChain({ id: 8453, name: "Base", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://mainnet.base.org"] } }, blockExplorers: { default: { name: "Basescan", url: "https://basescan.org", apiUrl: "https://api.basescan.org/api" } }, contracts: { l2OutputOracle: { [sourceId]: { address: "0x56315b90c40730925ec5485cf004d835058518A0" } }, multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 5022 }, portal: { [sourceId]: { address: "0x49048044D57e1C92A77f79988d21Fa8fAF74E97e", blockCreated: 17482143 } }, l1StandardBridge: { [sourceId]: { address: "0x3154Cf16ccdb4C6d922629664174b904d80F2C35", blockCreated: 17482143 } } }, sourceId }); var ancient8 = /* @__PURE__ */ defineChain({ id: 888888888, name: "Ancient8", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpc.ancient8.gg"] } }, blockExplorers: { default: { name: "Ancient8 explorer", url: "https://scan.ancient8.gg", apiUrl: "https://scan.ancient8.gg/api" } }, contracts: { l2OutputOracle: { [sourceId]: { address: "0xB09DC08428C8b4EFB4ff9C0827386CDF34277996" } }, portal: { [sourceId]: { address: "0x639F2AECE398Aa76b07e59eF6abe2cFe32bacb68", blockCreated: 19070571 } }, l1StandardBridge: { [sourceId]: { address: "0xd5e3eDf5b68135D559D572E26bF863FBC1950033", blockCreated: 19070571 } } }, sourceId }); sourceId = 11155111; var optimismSepolia = /* @__PURE__ */ defineChain({ id: 11155420, name: "OP Sepolia", nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://sepolia.optimism.io"] } }, blockExplorers: { default: { name: "Blockscout", url: "https://optimism-sepolia.blockscout.com", apiUrl: "https://optimism-sepolia.blockscout.com/api" } }, contracts: { disputeGameFactory: { [sourceId]: { address: "0x05F9613aDB30026FFd634f38e5C4dFd30a197Fa1" } }, l2OutputOracle: { [sourceId]: { address: "0x90E9c4f8a994a250F6aEfd61CAFb4F2e895D458F" } }, multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 1620204 }, portal: { [sourceId]: { address: "0x16Fc5058F25648194471939df75CF27A2fdC48BC" } }, l1StandardBridge: { [sourceId]: { address: "0xFBb0621E0B23b5478B630BD55a5f21f67730B0F1" } } }, testnet: true, sourceId }); var ancient8Sepolia = /* @__PURE__ */ defineChain({ id: 28122024, name: "Ancient8 Testnet", nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 }, rpcUrls: { default: { http: ["https://rpcv2-testnet.ancient8.gg"] } }, blockExplorers: { default: { name: "Ancient8 Celestia Testnet explorer", url: "https://scanv2-testnet.ancient8.gg", apiUrl: "https://scanv2-testnet.ancient8.gg/api" } }, contracts: { l2OutputOracle: { [sourceId]: { address: "0x942fD5017c0F60575930D8574Eaca13BEcD6e1bB" } }, portal: { [sourceId]: { address: "0xfa1d9E26A6aCD7b22115D27572c1221B9803c960", blockCreated: 4972908 } }, l1StandardBridge: { [sourceId]: { address: "0xF6Bc0146d3c74D48306e79Ae134A260E418C9335", blockCreated: 4972908 } } }, sourceId }); // src/sdk/network/constants.ts var NetworkNames = /* @__PURE__ */ ((NetworkNames4) => { NetworkNames4["BaseSepolia"] = "baseSepolia"; NetworkNames4["Sepolia"] = "sepolia"; NetworkNames4["Optimism"] = "optimism"; NetworkNames4["Polygon"] = "polygon"; NetworkNames4["Arbitrum"] = "arbitrum"; NetworkNames4["ArbitrumSepolia"] = "arbitrumSepolia"; NetworkNames4["Chiado"] = "chiado"; NetworkNames4["Fuse"] = "fuse"; NetworkNames4["FuseSparknet"] = "fuseSparknet"; NetworkNames4["Gnosis"] = "gnosis"; NetworkNames4["KromaTestnet"] = "kromaTestnet"; NetworkNames4["Mainnet"] = "mainnet"; NetworkNames4["OptimismSepolia"] = "optimismSepolia"; NetworkNames4["Rootstock"] = "rootstock"; NetworkNames4["RootstockTestnet"] = "rootstockTestnet"; NetworkNames4["Mantle"] = "Mantle"; NetworkNames4["MantleSepolia"] = "MantleSepolia"; NetworkNames4["Avalanche"] = "avalanche"; NetworkNames4["Base"] = "base"; NetworkNames4["Bsc"] = "bsc"; NetworkNames4["BscTestnet"] = "bscTestnet"; NetworkNames4["Fuji"] = "fuji"; NetworkNames4["Linea"] = "linea"; NetworkNames4["LineaTestnet"] = "lineaTestnet"; NetworkNames4["FlareTestnet"] = "flareTestnet"; NetworkNames4["Flare"] = "flare"; NetworkNames4["ScrollSepolia"] = "scrollSepolia"; NetworkNames4["Scroll"] = "scroll"; NetworkNames4["Ancient8Testnet"] = "ancient8Testnet"; NetworkNames4["Ancient8"] = "ancient8"; NetworkNames4["Amoy"] = "amoy"; NetworkNames4["XDCTestnet"] = "xdcTestnet"; NetworkNames4["XDCMainnet"] = "xdcMainnet"; return NetworkNames4; })(NetworkNames || {}); var SupportedNetworks = [1, 10, 14, 30, 31, 50, 51, 56, 97, 100, 114, 122, 123, 137, 2357, 5e3, 5003, 8453, 10200, 42161, 43113, 43114, 59140, 59144, 80002, 84532, 421614, 534351, 534352, 11155111, 11155420, 28122024, 888888888]; var NETWORK_NAME_TO_CHAIN_ID = { ["baseSepolia" /* BaseSepolia */]: 84532, ["sepolia" /* Sepolia */]: 11155111, ["optimism" /* Optimism */]: 10, ["polygon" /* Polygon */]: 137, ["arbitrum" /* Arbitrum */]: 42161, ["arbitrumSepolia" /* ArbitrumSepolia */]: 421614, ["chiado" /* Chiado */]: 10200, ["fuse" /* Fuse */]: 122, ["fuseSparknet" /* FuseSparknet */]: 123, ["gnosis" /* Gnosis */]: 100, ["kromaTestnet" /* KromaTestnet */]: 2357, ["mainnet" /* Mainnet */]: 1, ["optimismSepolia" /* OptimismSepolia */]: 11155420, ["rootstock" /* Rootstock */]: 30, ["rootstockTestnet" /* RootstockTestnet */]: 31, ["Mantle" /* Mantle */]: 5e3, ["MantleSepolia" /* MantleSepolia */]: 5003, ["avalanche" /* Avalanche */]: 43114, ["base" /* Base */]: 8453, ["bsc" /* Bsc */]: 56, ["bscTestnet" /* BscTestnet */]: 97, ["fuji" /* Fuji */]: 43113, ["linea" /* Linea */]: 59144, ["lineaTestnet" /* LineaTestnet */]: 59140, ["flareTestnet" /* FlareTestnet */]: 114, ["flare" /* Flare */]: 14, ["scrollSepolia" /* ScrollSepolia */]: 534351, ["scroll" /* Scroll */]: 534352, ["ancient8Testnet" /* Ancient8Testnet */]: 28122024, ["ancient8" /* Ancient8 */]: 888888888, ["amoy" /* Amoy */]: 80002, ["xdcTestnet" /* XDCTestnet */]: 51, ["xdcMainnet" /* XDCMainnet */]: 50 }; var onRamperAllNetworks = ["OPTIMISM", "POLYGON", "ARBITRUM", "FUSE", "GNOSIS", "ETHEREUM"]; var Networks = { [84532]: { chainId: 84532, // TODO fix to identify this chainId chain: null, bundler: "https://testnet-rpc.etherspot.io/v2/84532", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [11155111]: { chainId: 11155111, chain: sepolia, bundler: "https://testnet-rpc.etherspot.io/v2/11155111", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "0x5C661169084EA82254c8200a6134507Ef88f6b23" } }, [10]: { chainId: 10, // compilation issue for optimism mainnet, using custom config chain: optimism, bundler: "https://rpc.etherspot.io/v2/10", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [137]: { chainId: 137, chain: polygon, bundler: "https://rpc.etherspot.io/v2/137", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [42161]: { chainId: 42161, chain: arbitrum, bundler: "https://rpc.etherspot.io/v2/42161", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [1]: { chainId: 1, chain: mainnet, bundler: "https://rpc.etherspot.io/v2/1", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [10200]: { chainId: 10200, chain: null, bundler: "", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [122]: { chainId: 122, chain: fuse, bundler: "https://rpc.etherspot.io/v2/122", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [123]: { chainId: 123, // TODO no-support for ultron mainnet chain: null, bundler: "https://testnet-rpc.etherspot.io/v2/123", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [100]: { chainId: 100, chain: gnosis, bundler: "https://rpc.etherspot.io/v2/100", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [2357]: { chainId: 2357, chain: null, bundler: "", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [30]: { chainId: 30, chain: rootstock, bundler: "https://rpc.etherspot.io/v2/30", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [31]: { chainId: 31, chain: rootstockTestnet, bundler: "https://testnet-rpc.etherspot.io/v2/31", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [5e3]: { chainId: 5e3, chain: mantle, bundler: "https://rpc.etherspot.io/v2/5000", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [5003]: { chainId: 5003, chain: mantleSepoliaTestnet, bundler: "https://testnet-rpc.etherspot.io/v2/5003", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [43114]: { chainId: 43114, chain: avalanche, bundler: "https://rpc.etherspot.io/v2/43114", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [8453]: { chainId: 8453, chain: base, bundler: "https://rpc.etherspot.io/v2/8453", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [56]: { chainId: 56, chain: bsc, bundler: "https://rpc.etherspot.io/v2/56", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [97]: { chainId: 97, chain: bscTestnet, bundler: "https://testnet-rpc.etherspot.io/v2/97", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [43113]: { chainId: 43113, chain: avalancheFuji, bundler: "", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [59144]: { chainId: 59144, chain: linea, bundler: "https://rpc.etherspot.io/v2/59144", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [59140]: { chainId: 59140, chain: lineaGoerli, bundler: "", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [114]: { chainId: 114, chain: flareTestnet, bundler: "https://testnet-rpc.etherspot.io/v2/114", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [14]: { chainId: 14, chain: flare, bundler: "https://rpc.etherspot.io/v2/14", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [534351]: { chainId: 534351, chain: scrollSepolia, bundler: "https://testnet-rpc.etherspot.io/v2/534351", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [534352]: { chainId: 534352, chain: scroll, bundler: "https://rpc.etherspot.io/v2/534352", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [11155420]: { chainId: 11155420, // TODO check compilation issue chain: optimismSepolia, bundler: "https://testnet-rpc.etherspot.io/v2/11155420", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [28122024]: { chainId: 28122024, chain: ancient8Sepolia, bundler: "https://testnet-rpc.etherspot.io/v2/28122024", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [888888888]: { chainId: 888888888, chain: ancient8, bundler: "https://rpc.etherspot.io/v2/888888888", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [80002]: { chainId: 80002, chain: polygonAmoy, bundler: "https://testnet-rpc.etherspot.io/v2/80002", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0x93FB56A4a0B7160fbf8903d251Cc7A3fb9bA0933", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "0x22A55192a663591586241D42E603221eac49ed09" } }, [421614]: { chainId: 421614, chain: arbitrumSepolia, bundler: "https://testnet-rpc.etherspot.io/v2/421614", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "" } }, [51]: { chainId: 51, chain: xdcTestnet, bundler: "https://testnet-rpc.etherspot.io/v2/51", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0x5952653F151e844346825050d7157A9a6b46A23A", bootstrap: "0x805650ce74561C85baA44a8Bd13E19633Fd0F79d", multipleOwnerECDSAValidator: "0x68BA597bf6B9097b1D89b8E0D34646D30997f773", erc20SessionKeyValidator: "" } }, [50]: { chainId: 50, chain: xdc, bundler: "https://rpc.etherspot.io/v2/50", contracts: { entryPoint: "0x0000000071727De22E5E9d8BAf0edAc6f37da032", walletFactory: "0xf80D543Ca10B48AF07c65Ff508605c1737EFAF3F", bootstrap: "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066", multipleOwnerECDSAValidator: "0x8c4496Ba340aFe5ac4148cfEA9ccbBCD54093143", erc20SessionKeyValidator: "0xb61723Bc251A2b556d48C420779Da805e2D4b7D6" } } }; var DEFAULT_ERC20_SESSION_KEY_VALIDATOR_ADDRESS = "0x22A55192a663591586241D42E603221eac49ed09"; var DEFAULT_BOOTSTRAP_ADDRESS = "0x1baCB2F1ef4fD02f02e32cCF70888D9Caeb5f066"; var DEFAULT_MULTIPLE_OWNER_ECDSA_VALIDATOR_ADDRESS = "0x609d3ED5F7D1707806327D198Cb480B93dD6E6b9"; var DEFAULT_QUERY_PAGE_SIZE = 50; var CHAIN_ID_TO_NETWORK_NAME = Object.entries( NETWORK_NAME_TO_CHAIN_ID ).reduce( (result, [networkName, chainId]) => ({ ...result, [chainId]: networkName }), {} ); function getNetworkConfig(key) { return Networks[key]; } // src/sdk/network/utils/prepare-network-name.ts function prepareNetworkName(networkNameOrChainId) { let result = null; if (networkNameOrChainId) { if (typeof networkNameOrChainId === "string") { if (networkNameOrChainId.startsWith("0x")) { networkNameOrChainId = parseInt(networkNameOrChainId.slice(2), 16) || 0; } else { const chainId = NETWORK_NAME_TO_CHAIN_ID[networkNameOrChainId]; networkNameOrChainId = chainId ? chainId : parseInt(networkNameOrChainId, 10) || 0; } } if (typeof networkNameOrChainId === "number") { result = CHAIN_ID_TO_NETWORK_NAME[networkNameOrChainId] || null; } } return result; } // src/sdk/network/utils/network-name-to-chain-id.ts function networkNameToChainId(networkName) { return NETWORK_NAME_TO_CHAIN_ID[networkName] || null; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { CHAIN_ID_TO_NETWORK_NAME, DEFAULT_BOOTSTRAP_ADDRESS, DEFAULT_ERC20_SESSION_KEY_VALIDATOR_ADDRESS, DEFAULT_MULTIPLE_OWNER_ECDSA_VALIDATOR_ADDRESS, DEFAULT_QUERY_PAGE_SIZE, NETWORK_NAME_TO_CHAIN_ID, NetworkNames, Networks, SupportedNetworks, getNetworkConfig, networkNameToChainId, onRamperAllNetworks, prepareNetworkName }); //# sourceMappingURL=index.js.map