{"dist":{"shasum":"bf4473f1a2fbd27417928de3dfc5354d868c222f","tarball":"https://registry.npmjs.org/eth-provider-types/-/eth-provider-types-0.1.0-beta.0.tgz","fileCount":5,"integrity":"sha512-DfydvUb7EGkiFKpxCdYlQQiCIeEVwHaWS97iLy8CqFYz0nBNKEdZhKPTLcYcW62IVlpdPgEzvvnow7b0X2/DAA==","signatures":[{"sig":"MEQCIBhAU6KyOIaQ0iw/yItALZraFXbq5UaPAkDv9q3v6wxzAiAVFlkWCpZGvrZrnq3s6dpETxjoygbO/+NJTV1or7QJmw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":20856,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjnRkhACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoFGA//Q17jiJIfxgX2Kr6AAtdI66cHkPzRdtBiW0dOBjWQK4eDXS1j\r\nw0V6/Xoy5mcxQUH0kqmmLNS3i73kSCcRadVKNzQOyHjplf3m2/tAyVb7eD5f\r\nrXaEXamXYrUn2lmVln4LCWEii3G3tqM0pV8TK6NwczR/Wwaa1AuKbHsshoF9\r\n2ZA/0mo+rAYqtUXDIRa+MyXryA59Ph0BuRSvUCtzFwAIrFpCxZohVneNhvC5\r\n5V2LHY6z6nD7rn8qKcDg7FbMrwSLZUckbVQsR/Vv0fNeXte+eQ+aVpzE9ByM\r\nj1IEIcH5Zc9xPj4whDzvcpdzBLW9OVW7WDFna038Or/++v3SZn52uySmsy8f\r\nDBY2xyfXMREhcEN440C7eof1D6tODOLW8MC+jhDJqQdsC+AUaXn91VJystaX\r\nsGrsvi6tKV5VntOUlAnk2p5nR+T5Bunk8G9pGfepUdtLnnmIBfJ+TWk7+PXf\r\nMm7sfbpJwsvQHVK9qmluwgf0f+m1W8p4NDfSNJnHWqz2ehMHo4YB/KvpwOn6\r\n+F65aZalnqoqJMmf6PGc+LRI7plNQ6lbm0t+Q8AvhgcQ4dos7ahilnxb6FQc\r\n/udveKH3SDFJ3Mr6veDX5JhE80PMBe1YvNYL/emQOMjDfQA6aosfLlrrYziC\r\n1vfo2xnOitTwxpDN4CvFRmCPEvj6hh7u5eE=\r\n=bbSd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"index.js","name":"eth-provider-types","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","gitHead":"2c08748d4b7745df5940b75e535ad2d9c8c61477","license":"ISC","_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.0_1671239968851_0.657621069275524","host":"s3://npm-registry-packages"},"_id":"eth-provider-types@0.1.0-beta.0","version":"0.1.0-beta.0"}