{"dist":{"shasum":"7bc70fe62c05a72edf8392912741450bdda1f375","tarball":"https://registry.npmjs.org/eth-provider-types/-/eth-provider-types-0.1.0-beta.4.tgz","fileCount":6,"integrity":"sha512-Z1nqTF3Cwclz3ZPRrpGaFwiuK8pYbhCt9BD7Ncp22HdUPtJhpMX7GflTTXb4Ju1FKhRlUTqUaFnqDMHTyMpALw==","signatures":[{"sig":"MEUCIQDQKFZE4YBKcEglGzrdnkL/F9LLfQIIpOMg9Bkip0+cGwIgMKp+MeNDTnNv6kxx6gRzaItBny0HNZtzfBinbvzGM24=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":32500,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkMEBNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouBQ/+JimO15QfEd6vY8Zu4Uvx/QpsEipCFMJx2IbtaulurVdEhtBG\r\ntaGecwCjBsZ5RMvHNHv2ykkEKTLOmn9FpIWiWTwkEdA9Oee+uSyffRDv3Rxh\r\n5eGxtXr2hGEf+G+psBVlBQnpVwiyN91CRbmwDx/hVGg9FV4qoyeQhuR5B3+b\r\nypYZ9qNjtE3qK/r0nnqKb96na8VXiqzXrAMCe96d8pIvD7AQSrDoaLsu1IuF\r\nNH/O3MjMCgzYusLjxNWEibz0OuUqIUPIpe5qx896vRWp0udj7vgIz56DE/pM\r\n14VHDYSQMOBIj2gwaF9iIRtcGs8f4cijbDIFepYzlzJzW2+lABSratASAoTP\r\nFqAbUJVipgxS7OFr4xagJNQcxJ/DOstLXjLhxStzBcp7aA3sO8OUifl3qkpQ\r\n15R81yC44em6qAlv5j3eHfseSfsfzRQcjCwxlk/LqIAjXlokraTOdlzhjEn3\r\n6iqBJ3pQBEk9Z9o73jns+rYVT133eST5ar25xYhVu8iPwX+fAv5U8h2RDuI8\r\nw4a72K6m1vxOFdx2mjCw6CUpFsd0aQvWC5K1vFPZeAnzt4g7bSQxEpKGsGiu\r\nLd63xC+CL6exlQR9O9EHukXaTsHV5eB/Wx0lMnqoe3WQ4J4AXfL2BamL158t\r\nnrQRt+3Y4pmVuImBYoXhY6CJAbnikv8pv0c=\r\n=J4d+\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":"74b8f823a6a85da11c1f1bfba4880aebf661d609","license":"ISC","scripts":{"build":"tsc"},"_npmUser":{"name":"imthinhvu","email":"thinh.vu@hey.com"},"_npmVersion":"9.5.0","description":"TypeScript types for Ethereum providers, with types for every RPC method","directories":{},"maintainers":[{"name":"imthinhvu","email":"thinh.vu@hey.com"}],"_nodeVersion":"18.15.0","_hasShrinkwrap":false,"readmeFilename":"README.md","_npmOperationalInternal":{"tmp":"tmp/eth-provider-types_0.1.0-beta.4_1680883789226_0.0891313748318423","host":"s3://npm-registry-packages"},"_id":"eth-provider-types@0.1.0-beta.4","version":"0.1.0-beta.4"}