{"dist":{"shasum":"679d0130be9d8a74b81713d16cfc4229e8700710","tarball":"https://registry.npmjs.org/eth-provider-types/-/eth-provider-types-0.1.0-beta.2.tgz","fileCount":6,"integrity":"sha512-G0kSi0/t48i6p9usm10+5c7dbCiofw2XROlFhtW64oMLwovvg8eK20gfRcxQae+1gTNNBYi8RbiHM2vLoHOpVQ==","signatures":[{"sig":"MEQCIGKjRGDyYyM/I4WPbx1lOnufLHhSlDkcqtqi50VrX+A3AiAtGfWAnS4m6kC5H6mtaZF0B1nldde5Ei0KrlDZ8GJ9Sg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":29851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjofkRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmr01RAAnutWJ9B7YLI8n69zf349l7d0aksHgocGpq+SV4d9QSvvJ0uo\r\nXUvX4t6ZutugIvCamS7oy7ie/lTE8lGFSHGhpA7igngI3TxmU+sDDd/r/Yol\r\nnuU0N8zJfWuIrBkwNqKWK08/UNVWBsygfMVtu6camRWpQw6KcucJer+lvIuS\r\nyqp28DAkOTtXJDQOn/d3TajxA/lmdLuPHqDow09XbCQ3eUc6A1kOrd5/jVQs\r\npQHYZBxwpaUeRpPIpJYPmKuHnhlMtfDs1xyS6Yc/Os4b/Ny5gJ4zl8CPCRST\r\nrKuY4AVGD72MZYsbhlqwlhCNDGmPhZShh//+Hxc97DzlRMhsqa219m1bvogQ\r\ncI5CQyHXaHQFzfZpVX4yAtXldlSv6agqe/EoAY9CBMChDvIMY+HMTcR2cjJt\r\n2UMhxOMZA41jNi/1//MYtSKPkjQ8nBvWkRhuLLo5IdXrfHsEdopY7NirB0vH\r\nM1yzuFYg9FhzGpm813/yVoEKpmtljWyUJfeH0vwTOAK0o6piAj7kz4LpvIZd\r\nbbybJOqHhsPozGWDe8ek+GXkeeGTB79qmLCyCjDFVEdUR7LFaPGadQdaJqAV\r\nF1KBxN43UeNFCob8L+mVBXko+8nCfT2yUUQP8x39fGsBKUYlV9Ym/CHQunux\r\n/U7TcJY4BjJ4ttH69VbCGFojr8VLaqI4pz8=\r\n=FI1c\r\n-----END PGP SIGNATURE-----\r\n"},"name":"eth-provider-types","type":"module","types":"index.d.ts","author":{"name":"Bitski"},"readme":"# eth-provider-types\n\nThis package provides types for Ethereum JSON RPC APIs. This includes:\n\n```ts\nimport {\n  // The ethereum provider API interface, per EIP-1193 (https://eips.ethereum.org/EIPS/eip-1193#appendix-i-consumer-facing-api-documentation)\n  EthProvider,\n\n  /*** Enums ***/\n  EthMethod, // All ethereum RPC method names\n  EthEvent, // All standard event names emitted by the provider\n  EthProviderMessageType, // All types of messages sent by the `message` event\n  EthProviderRpcErrorCode, // Error codes\n  EthBlockNumberTag, // Block tags e.g. 'latest', 'earliest', 'pending\n\n  /*** Mappings ***/\n  EthMethodParams, // Mapping from EthMethod -> method parameters\n  EthMethodResults, // Mapping from EthMethod -> method results\n  EthEventParams, // Mapping from EthEvent -> Event parameters\n  EthProviderMessageData, // Mapping from EthProviderMessageType -> message data\n\n  /*** Interfaces ***/\n\n  // Ethereum transaction received from RPC (e.g. getTransactionByHash).\n  // This is the union of EthTransactionComplete and EthTransactionPending.\n  EthTransaction,\n  EthTransactionComplete, // Completed transaction (block number, etc, are NOT null)\n  EthTransactionPending, // Pending transaction (block number, etc. ARE null)\n  EthTransactionSend, // Transaction partial passed to eth_sendTransaction, eth_signTransaction\n  EthTransactionCall, // Transaction partial passed to eth_call\n  EthTransactionReceipt,\n\n  // Ethereum block received from RPC (e.g. getBlockByHash).\n  // This is the union of EthBlockComplete and EthBlockPending.\n  EthBlock,\n  EthBlockComplete, // Completed block (block number, etc. are NOT null)\n  EthBlockPending, // Pending block (block number, etc. ARE null)\n\n  // Ethereum log received from RPC (e.g. getLogs)\n  // This is the union of EthLogComplete and EthLogPending.\n  EthLog,\n  EthLogComplete, // Completed log (block number, etc. are NOT null)\n  EthLogPending, // Pending log (block number, etc. ARE null)\n\n  // Other\n  EthProviderMessage,\n  EthProviderRpcError,\n  EthProviderConnectInfo,\n} from 'eth-provider-types';\n```\n\nYou can use these types to create an Ethereum provider that is strongly typed:\n\n```ts\nimport { EthProvider, EthMethod, EthTransactionReceipt } from 'eth-json-rpc-types';\n\nclass MyProvider implements EthProvider {\n  request({ method, params }) {\n    // ...\n  }\n\n  // ...\n}\n\nconst provider = new MyProvider();\n\n// Results and parameters are both typed based on EthMethod passed into `request`\nconst eth_accounts: string[] = provider.request({ method: EthMethod.eth_accounts });\nconst eth_getTransactionReceipt: EthTransactionReceipt = provider.request({\n  method: EthMethod.eth_accounts,\n  params: ['0x0...'],\n});\n\n// This will throw type errors because it has incorrect parameters\nconst eth_getBlockByHash = provider.request({\n  method: EthMethod.eth_getBlockByHash,\n  params: [123],\n});\n```\n","exports":"./index.js","gitHead":"5b862564db596b0857519918daabfcddaad5e073","license":"ISC","scripts":{"build":"tsc"},"_npmUser":{"name":"imthinhvu","email":"thinh.vu@hey.com"},"_npmVersion":"8.19.2","description":"TypeScript types for Ethereum providers, with types for every RPC method","directories":{},"maintainers":[{"name":"imthinhvu","email":"thinh.vu@hey.com"}],"_nodeVersion":"18.12.1","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/eth-provider-types_0.1.0-beta.2_1671559441222_0.8524643414913691","host":"s3://npm-registry-packages"},"_id":"eth-provider-types@0.1.0-beta.2","version":"0.1.0-beta.2"}