{"name":"abitype","version":"0.8.0-canary.20230403T170518","keywords":["abi","eth","ethereum","typescript","web3"],"license":"MIT","_id":"abitype@0.8.0-canary.20230403T170518","homepage":"https://github.com/wagmi-dev/abitype#readme","bugs":{"url":"https://github.com/wagmi-dev/abitype/issues"},"dist":{"shasum":"059a11bf81687d6dd70671409cd72e7aac64b2cb","tarball":"http://registry-npm.ywwl.com/abitype/download/abitype-0.8.0-canary.20230403T170518.tgz","fileCount":24,"integrity":"sha512-j5Z0yL2OQ6QaVBZiSnhCwlwDul8Bjlmct/PSHMAO0kVZtu48T00KIPzVyYF6MAjylTVDqAh+TfWmbHchSjedLQ==","signatures":[{"sig":"MEUCIGjS2jlWHUe7VVnmugSG53oYgfqAmRjJM0Kl2KPqRxvSAiEAopQN789AnDN3C5u02P3xBLGeJSnc/zp7A2+12ItxVaI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":474661,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkKwdSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp4Zw/8DL7wugRkVxRDoJnlZzkL46qEQVEksr9hQmXmAQPKezXrhUFr\r\nEZdSqaGksVvhNbMW4ByUuCxb71rtHojbdcU7fSLxMupP7Q4s9AS6ss6Ih9Rp\r\nySvJ4OBndxN5EGEDcuSzAtuYS3Vs9bfqA3C43J0dyms47PlsxlSs4EmyXTF2\r\nVBmxc1ayqBbCfWjFmRxuoYyWKf5C6vOA8ijC2hU+d7Yy9eqc2wu4Z/wlZ6XB\r\nJDdkaprcLpCUUVC6S+DRQ5tOkL1E99+fhaqFNf6PVYG3fJn132a/C8rAJiBI\r\nw53o07KsJnBUeK9HkZ15GAeTDUTQ/pw1POs9SuMSQZjNWx9bXtGwIcR1B5vh\r\nq/iIcvVUlfqXmkN44/q73cr0KO3aWBca6dRGDB6dFLA0sbc4SQrjop6kLqvH\r\nAPKuEMlRXtolSYLARNz7LVsQPBwqlbNYIB2Zb0vFfJYoZuACcQ0fXgW8rP6K\r\nuvXSpO1wMmAmWCEneHJxrCcb7lZsSgiYE5PWK3JUnmxikioGAxWP3Qf0hVlH\r\nfa9q9X0xEO7BsvzqCmCIXhOmoGBEcqWyR4IxRvRrMZflY/sFcle8sOb7lvLC\r\nQSD4A4qky3Lf4cn5SnrloKX5QGUND8qDLocGo2sihFU9dDZJbcSIKqgiJh77\r\n2LKSxaUXUy5f9mz5FtXYSOPdi4yuhm+MAL8=\r\n=MVlF\r\n-----END PGP SIGNATURE-----\r\n","size":54875,"noattachment":false,"key":"/abitype/-/abitype-0.8.0-canary.20230403T170518.tgz"},"main":"dist/index.js","types":"dist/index.d.ts","module":"dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","module":"./dist/index.mjs","default":"./dist/index.js"},"./zod":{"types":"./dist/zod/index.d.ts","module":"./dist/zod/index.mjs","default":"./dist/zod/index.js"},"./test":{"types":"./dist/test/index.d.ts","module":"./dist/test/index.mjs","default":"./dist/test/index.js"},"./config":{"types":"./dist/config.d.ts","module":"./dist/config.mjs","default":"./dist/config.js"},"./package.json":"./package.json"},"gitHead":"5177be1f8fdde279ffc36ae855b81319971c1f96","_npmUser":{"name":"awkweb","email":"tom@meagher.co"},"ethereum":"wagmi-dev.eth","repository":{"url":"git+https://github.com/wagmi-dev/abitype.git","type":"git"},"_npmVersion":"8.19.3","description":"Strict TypeScript types for Ethereum ABIs","directories":{},"sideEffects":false,"_nodeVersion":"16.19.1","_hasShrinkwrap":false,"readmeFilename":"README.md","peerDependencies":{"zod":"^3 >=3.19.1","typescript":">=4.9.4"},"peerDependenciesMeta":{"zod":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/abitype_0.8.0-canary.20230403T170518_1680541522393_0.12018272660310814","host":"s3://npm-registry-packages"},"readme":"<br/>\n\n<p align=\"center\">\n  <a href=\"https://abitype.dev\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://raw.githubusercontent.com/wevm/abitype/main/.github/logo-dark.svg\">\n      <img alt=\"ABIType logo\" src=\"https://raw.githubusercontent.com/wevm/abitype/main/.github/logo-light.svg\" width=\"auto\" height=\"45\">\n    </picture>\n  </a>\n</p>\n\n<p align=\"center\">\n  Strict TypeScript types for Ethereum ABIs\n<p>\n\n<div align=\"center\">\n  <a href=\"https://www.npmjs.com/package/abitype\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/npm/v/abitype?colorA=21262d&colorB=21262d&style=flat\">\n      <img src=\"https://img.shields.io/npm/v/abitype?colorA=f6f8fa&colorB=f6f8fa&style=flat\" alt=\"Version\">\n    </picture>\n  </a>\n  <a href=\"https://www.npmjs.com/package/abitype\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/npm/dm/abitype?colorA=21262d&colorB=21262d&style=flat\">\n      <img src=\"https://img.shields.io/npm/dm/abitype?colorA=f6f8fa&colorB=f6f8fa&style=flat\" alt=\"Downloads per month\">\n    </picture>\n  </a>\n  <a href=\"https://github.com/wevm/abitype/blob/main/LICENSE\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/npm/l/abitype?colorA=21262d&colorB=21262d&style=flat\">\n      <img src=\"https://img.shields.io/npm/l/abitype?colorA=f6f8fa&colorB=f6f8fa&style=flat\" alt=\"MIT License\">\n    </picture>\n  </a>\n  <a href=\"https://bestofjs.org/projects/abitype\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/endpoint?colorA=21262d&colorB=21262d&style=flat&url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=wevm%2Fabitype%26since=daily\">\n      <img src=\"https://img.shields.io/endpoint?colorA=f6f8fa&colorB=f6f8fa&style=flat&url=https://bestofjs-serverless.now.sh/api/project-badge?fullName=wevm%2Fabitype%26since=daily\" alt=\"Best of JS\">\n    </picture>\n  </a>\n  <a href=\"https://app.codecov.io/gh/wevm/abitype\">\n    <picture>\n      <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://img.shields.io/codecov/c/github/wevm/abitype?colorA=21262d&colorB=21262d\">\n      <img src=\"https://img.shields.io/codecov/c/github/wevm/abitype?colorA=f6f8fa&colorB=f6f8fa\" alt=\"Code coverage\">\n    </picture>\n  </a>\n</div>\n\n---\n\nStrict TypeScript types for Ethereum ABIs. ABIType provides utilities and type definitions for ABI properties and values, covering the [Contract ABI Specification](https://docs.soliditylang.org/en/latest/abi-spec.html), as well as [EIP-712](https://eips.ethereum.org/EIPS/eip-712) Typed Data.\n\n```ts\nimport type { AbiParametersToPrimitiveTypes, ExtractAbiFunction, ExtractAbiFunctionNames } from 'abitype'\nimport { erc20Abi } from 'abitype/abis'\n\ntype FunctionNames = ExtractAbiFunctionNames<typeof erc20Abi, 'view'>\n//   ^? type FunctionNames = \"symbol\" | \"name\" | \"allowance\" | \"balanceOf\" | \"decimals\" | \"totalSupply\"\n\ntype TransferInputTypes = AbiParametersToPrimitiveTypes<\n  // ^? type TransferInputTypes = readonly [`0x${string}`, bigint]\n  ExtractAbiFunction<typeof erc20Abi, 'transfer'>['inputs']\n>\n```\n\nWorks great for adding blazing fast [autocomplete](https://twitter.com/awkweb/status/1555678944770367493) and type checking to functions, variables, or your own types. No need to generate types with third-party tools – just use your ABI and let TypeScript do the rest!\n\n## TL;DR\n\nABIType might be a good option for your project if:\n\n- You want to [typecheck](https://abitype.dev/api/types) your ABIs or EIP-712 Typed Data.\n- You want to add type inference and autocomplete to your library based on user-provided ABIs or EIP-712 Typed Data, like [Wagmi](https://wagmi.sh) and [Viem](https://viem.sh).\n- You need to [convert ABI types](https://abitype.dev/api/utilities#abiparameterstoprimitivetypes) (e.g. `'string'`) to TypeScript types (e.g. `string`) or other type transformations.\n- You need to validate ABIs at [runtime](https://abitype.dev/api/zod) (e.g. after fetching from external resource).\n- You don’t want to set up a build process to generate types (e.g. TypeChain).\n\n## Documentation\n\nFor documentation and guides, visit [abitype.dev](https://abitype.dev).\n\n## Community\n\nFor help, discussion about best practices, or any other conversation that would benefit from being searchable:\n\n[Discuss ABIType on GitHub](https://github.com/wevm/abitype/discussions)\n\nFor casual chit-chat with others using the library:\n\n[Join the Wevm Discord](https://discord.gg/SghfWBKexF)\n\n## Sponsors\n\nIf you find ABIType useful or use it for work, please consider supporting development on [GitHub Sponsors](https://github.com/sponsors/wevm?metadata_campaign=abitype_readme) or sending crypto to `wevm.eth`. Thank you 🙏\n\n## Contributing\n\nContributions to ABIType are greatly appreciated! If you're interested in contributing to ABIType, please read the [Contributing Guide](https://github.com/wevm/abitype/blob/main/.github/CONTRIBUTING.md) **before submitting a pull request**.\n","publish_time":1680541522555,"maintainers":[{"name":"jmoxey","email":"jakemoxey@gmail.com"},{"name":"awkweb","email":"tom@meagher.co"}],"_cnpm_publish_time":1680541522555,"dist-tags":{"latest":"1.3.0"}}