{"dist":{"shasum":"519cbb6435e43b574dc10bb24ce50fe888ad5728","tarball":"https://registry.npmjs.org/eth-provider-types/-/eth-provider-types-0.1.0-beta.1.tgz","fileCount":5,"integrity":"sha512-RqWucWHLBM7l2bjub+pwbJQitxEfOOfMuEu1ZSFi7DY9swUeS00Vva9EeK+WcFVAydF71xA1VaXvhSk0DFGbJg==","signatures":[{"sig":"MEUCIQDTcte9gHTiUIA0TL2Jo4TVNHCOhQlyUC+1Qkf+hcceJwIgE2PK8GWY07or4UtwqK0gbe8orveHVAHc7okgpJ2SF6o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":22092,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjoeRtACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqudg//cGwIhIwd1OaPrQ30QP9cRGP4rSfTbJf/6lsL5DAhZEAlPA/R\r\n3SlYRKEThLPfwSY8kx/NPq/zKRdPtNONz0rRooKES3+KT2BA/xtXPaKv4tRH\r\nvTKePziDY06r3ierSxPfrHq10JRRvkqRqW1o4pRSRpxERA4UzpNfzg9gc7r3\r\nXMNZMY0xXKYlbnlbY7K8+pNnkEg533aYlCvZC9ChFXXw9nCPf/yBo2wwSMnA\r\n5eHFlZOS2qec8jiFYvHSxAGNqNTALVg1dZJ4HG8oXspGvLTs4U+pRGt9jh2n\r\nFoZaNVYZMeXAtUSnN0DP7OxA7ALCAWpixqsbLaw+VGnfrUPCBnXAknHY3R+Y\r\ntxrIxU/xA75gMWK64pmLEGcs7A6n4DX6uVz8IsKArf6jOyeTAylXNU2MZkvc\r\nVyGCYTf9Pj1/2yfJRCGmGPxSVRQ6esGeO0BAxLJsn8i4pS50wIhRUYIledd0\r\nPFMhPKReIc29rcIeyYVOoN7MVS9UrjuWvqQe6Fp8xy2cy7ZyImzSIbzu5WEq\r\n92IxUWSsBV7gWoT/FmWkbcYC+lp0f1JfDpMwjS0b53P2mFCArXDp3RBhwwVE\r\nhzC+TYI0u6s0CML55EZ2RxQcecfz2cnygf2nNBNM7vUJMOLdwuzAXOUF8ScE\r\nPzoP2c8MXaccBCk1dLiBzcR1HEybGMaBRvY=\r\n=BfIz\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":"03fee10ed546af70a2a94a94d5bdec5b4faba63b","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.1_1671554157352_0.15655087744537854","host":"s3://npm-registry-packages"},"_id":"eth-provider-types@0.1.0-beta.1","version":"0.1.0-beta.1"}