{"version":3,"file":"types.cjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAgBA;;GAEG;AACH,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,sCAAiB,CAAA;IACjB,sCAAiB,CAAA;AACnB,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B","sourcesContent":["import type { InfuraNetworkType, ChainId } from '@metamask/controller-utils';\nimport type { BlockTracker as BaseBlockTracker } from '@metamask/eth-block-tracker';\nimport type { InternalProvider } from '@metamask/eth-json-rpc-provider';\nimport type { MiddlewareContext } from '@metamask/json-rpc-engine/v2';\nimport type { Hex } from '@metamask/utils';\n\nexport type Provider = InternalProvider<\n  MiddlewareContext<\n    { origin: string; skipCache: boolean } & Record<string, unknown>\n  >\n>;\n\nexport type BlockTracker = BaseBlockTracker & {\n  checkForLatestBlock(): Promise<string>;\n};\n\n/**\n * The type of network client that can be created.\n */\nexport enum NetworkClientType {\n  Custom = 'custom',\n  Infura = 'infura',\n}\n\n/**\n * A configuration object that can be used to create a client for a network.\n */\ntype CommonNetworkClientConfiguration = {\n  chainId: Hex;\n  failoverRpcUrls?: string[];\n  ticker: string;\n};\n\n/**\n * A configuration object that can be used to create a client for a custom\n * network.\n */\nexport type CustomNetworkClientConfiguration =\n  CommonNetworkClientConfiguration & {\n    rpcUrl: string;\n    type: NetworkClientType.Custom;\n  };\n\n/**\n * A configuration object that can be used to create a client for an Infura\n * network.\n */\nexport type InfuraNetworkClientConfiguration =\n  CommonNetworkClientConfiguration & {\n    network: InfuraNetworkType;\n    infuraProjectId: string;\n    type: NetworkClientType.Infura;\n  };\n\n/**\n * A configuration object that can be used to create a client for a network.\n */\nexport type NetworkClientConfiguration =\n  | CustomNetworkClientConfiguration\n  | InfuraNetworkClientConfiguration;\n\n/**\n * The Chain ID representing the additional networks to be included as default.\n */\nexport type AdditionalDefaultNetwork = (typeof ChainId)[\n  | 'megaeth-testnet'\n  | 'megaeth-testnet-v2'\n  | 'monad-testnet'];\n"]}