{"version":3,"file":"types.mjs","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type {\n  Json,\n  JsonRpcParams,\n  JsonRpcRequest,\n  JsonRpcResponse,\n} from '@metamask/utils';\n\nexport type BlockData = string | string[];\n\nexport type Block = Record<string, BlockData>;\n\nexport type BlockCache = Record<string, Block>;\n\nexport type Cache = Record<number, BlockCache>;\n\n/**\n * A copy of the `AbstractRpcService` type in metamask/network-controller`, but\n * keeping only the `request` method.\n *\n * We cannot get `AbstractRpcService` directly from\n * `@metamask/network-controller` because relying on this package would create a\n * circular dependency.\n *\n * This type should be accurate as of `@metamask/network-controller` 24.x and\n * `@metamask/utils` 11.x.\n */\nexport type AbstractRpcServiceLike = {\n  request: <Params extends JsonRpcParams, Result extends Json>(\n    jsonRpcRequest: JsonRpcRequest<Params>,\n    fetchOptions?: RequestInit,\n  ) => Promise<JsonRpcResponse<Result | null>>;\n};\n"]}