{"name":"abitype","version":"1.3.0","description":"Strict TypeScript types for Ethereum ABIs","keywords":["abi","eth","ethereum","types","typescript","viem","wagmi","web3","wevm"],"license":"MIT","contributors":[{"name":"awkweb.eth","email":"t@wevm.dev"},{"name":"jxom.eth","email":"j@wevm.dev"}],"repository":{"type":"git","url":"git+https://github.com/wevm/abitype.git"},"funding":"https://github.com/sponsors/wevm","type":"module","sideEffects":false,"main":"./dist/cjs/exports/index.js","module":"./dist/esm/exports/index.js","types":"./dist/types/exports/index.d.ts","typings":"./dist/types/exports/index.d.ts","typesVersions":{"*":{"abis":["./dist/types/exports/abis.d.ts"],"zod":["./dist/types/exports/zod.d.ts"]}},"exports":{".":{"types":"./dist/types/exports/index.d.ts","import":"./dist/esm/exports/index.js","default":"./dist/cjs/exports/index.js"},"./abis":{"types":"./dist/types/exports/abis.d.ts","import":"./dist/esm/exports/abis.js","default":"./dist/cjs/exports/abis.js"},"./zod":{"types":"./dist/types/exports/zod.d.ts","import":"./dist/esm/exports/zod.js","default":"./dist/cjs/exports/zod.js"},"./package.json":"./package.json"},"peerDependencies":{"typescript":">=5.0.4","zod":"^3.22.0 || ^4.0.0"},"peerDependenciesMeta":{"typescript":{"optional":true},"zod":{"optional":true}},"_id":"abitype@1.3.0","bugs":{"url":"https://github.com/wevm/abitype/issues"},"homepage":"https://github.com/wevm/abitype#readme","_integrity":"sha512-fk6Te+bojIFrMvMZrnOO+SxCB+RUksTGOzq/60ZRvs1L+BVzvi2bqt9L3W/17ZLdZsyM1FuYf65P5nlmoiH1Bg==","_resolved":"/tmp/9d2f9321f10cf675db4a0c134c539c62/abitype-1.3.0.tgz","_from":"file:abitype-1.3.0.tgz","_nodeVersion":"24.18.0","_npmVersion":"11.5.1","dist":{"integrity":"sha512-fk6Te+bojIFrMvMZrnOO+SxCB+RUksTGOzq/60ZRvs1L+BVzvi2bqt9L3W/17ZLdZsyM1FuYf65P5nlmoiH1Bg==","shasum":"39de89010dd7390ece44d5242a3aa80901cc193d","tarball":"http://registry-npm.ywwl.com/abitype/download/abitype-1.3.0.tgz","fileCount":252,"unpackedSize":1380276,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/abitype@1.3.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIEJ/R0F+LQ1VCkbYQ6a+NwptSbMn7mQANo7pxAgDgv6lAiA4sKrNA914PPX2xuJzfJTcbs0aUtR6PjKdrddtPXA6yw=="}],"size":158653,"noattachment":false,"key":"/abitype/-/abitype-1.3.0.tgz"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5688dbe8-1e9c-4794-b0d2-b1c030ddf642"}},"directories":{},"maintainers":[{"name":"awkweb","email":"tom@meagher.co"},{"name":"jmoxey","email":"jakemoxey@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/abitype_1.3.0_1784226809424_0.1292530977308406"},"_hasShrinkwrap":false,"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 {\n  AbiParametersToPrimitiveTypes,\n  ExtractAbiFunction,\n  ExtractAbiFunctionNames,\n} 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 don’t want to set up a build process to generate types (e.g. TypeChain).\n\n> [!NOTE]\n> If you need runtime capabilities like Zod schemas or human-readable ABI parsing and formatting, check out [Ox](https://oxlib.sh).\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\n<br />\n<br />\n\n<a href=\"https://vercel.com/?utm_source=wevm&utm_campaign=oss\">\n  <img src=\"https://www.datocms-assets.com/31049/1618983297-powered-by-vercel.svg\" alt=\"Powered by Vercel\" height=\"35\">\n</a>\n","publish_time":1784226809616,"_cnpm_publish_time":1784226809616,"dist-tags":{"latest":"1.3.0"}}