{"bin":{"typechain":"./dist/cli/cli.js"},"bugs":{"url":"https://github.com/ethereum-ts/Typechain/issues"},"dist":{"shasum":"5c5132a234b365c32a88848582680662314c4fc8","tarball":"https://registry.npmjs.org/typechain/-/typechain-2.0.0--beta.0.tgz","fileCount":39,"integrity":"sha512-oJYsM4LEUNhXZSqBz1c8ALR/XPaLvhdxh1rQJV5tbd8wsUuJMOqiYhgFSKDf9vfgqws3GGBUjPUyhJJ+8kQ5kA==","signatures":[{"sig":"MEUCIQCX6FI9RSi/wu2J1JCzfMtJHpQW1xuNw/SorUtCOmbDVgIgfNbGJmqyL6N0Ydyqe/muojO1desoS5wyO1ad35dpmdI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":86784,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeMsr5CRA9TVsSAnZWagAAHVcP/jR1G1Jk0NtiyNt97kSH\nO1ibMo8TGPA1eP5nY/f1n6/XuD0gNyarRCRQlXxI+YvPZ2nfNAyNc88LSHYf\nOYDhCQKDbvMwB+48WcYeQmEVPsvm6j85+miW3EHuTY+OiQ0JMmHCjTmdA6im\nDuT6WEwkOCx4QfISdrTe2SFJ9M5+m2M4uDOva38Zs01Dhoc1/j5LjWUK3B30\nf1EWPgJGRkhi80SWZ0naln0SPedY7CPZu4pjSXPBWc+tMNmuGy5BI6WIgsw+\n3bJGvRoasatG2E4nApTBIE6fsHWqRLTG9q06gi29ncQj/Tgb3v8jyxf0i1Ko\nqZOnqnh/I7g2GiJELkljrbYYqQhRWCzAC7VI+ec+ygs2RriBly12v9oX6322\neN8F1mjzaZoG5U+b9K4osrK5FdH/7CSYUUhRKALeM/OGDBUigmkHLD7oWLfM\nW4bL1Nt47dnQFKSdxPvLZAOd/8LqwL/nqx6Mz1NC0HnB1cor5tk9Mma++VVE\nodpLRYHMNxLoJ1/xzg9y6ScMWfAAD9lZv+Tq4xOwKAgJvAqteapCdh5lS7c+\nbxslUeY429o63oPY6ZEseEUnYXjWQ1PjDuop4fSspxaX29VHksDVxbem/+y7\nzRp/n4YAizO6/CSkhnl3CTNNqB+Edip19Q8y9/SKFMTGyB8hEUoDrkVkpaj5\nuBo4\r\n=beFy\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","name":"typechain","readme":"<p align=\"center\">\n  <img src=\"https://github.com/Neufund/TypeChain/blob/d82f3cc644a11e22ca8e42505c16f035e2f2555d/docs/images/typechain-logo.png?raw=true\" width=\"300\" alt=\"TypeChain\">\n  <h3 align=\"center\">TypeChain</h3>\n  <p align=\"center\">🔌 TypeScript bindings for Ethereum smartcontracts</p>\n\n  <p align=\"center\">\n    <a href=\"https://circleci.com/gh/ethereum-ts/TypeChain\"><img alt=\"Build Status\" src=\"https://circleci.com/gh/ethereum-ts/TypeChain/tree/master.svg?style=svg\"></a>\n    <a href=\"https://coveralls.io/github/ethereum-ts/TypeChain?branch=master\"><img alt=\"Coverage\" src=\"https://coveralls.io/repos/github/ethereum-ts/TypeChain/badge.svg?branch=master\"></a>\n    <img alt=\"Downloads\" src=\"https://img.shields.io/npm/dm/typechain.svg\">\n    <a href=\"https://github.com/prettier/prettier\"><img alt=\"Prettier\" src=\"https://img.shields.io/badge/code_style-prettier-ff69b4.svg\"></a>\n    <a href=\"/package.json\"><img alt=\"Software License\" src=\"https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square\"></a>\n  </p>\n\n  <p align=\"center\">\n    <a href=\"https://blog.neufund.org/introducing-typechain-typescript-bindings-for-ethereum-smart-contracts-839fc2becf22\">Medium post</a> | <a href=\"https://www.youtube.com/watch?v=9x6AkShGkwU\">DappCon Video</a>\n  </p>\n\n  <p align=\"center\">\n    Contributed with: <br/>\n    <img src=\"https://github.com/Neufund/TypeChain/blob/6d358df7b2da6b62d56f9935f1666b17b93176f0/docs/images/neufund-logo.png?raw=true\" width=\"100\" alt=\"Neufund\">\n  </p>\n</p>\n\n## Features ⚡\n\n- static typing - you will never call not existing method again\n- IDE support - works with any IDE supporting Typescript\n- extendible - work with many different APIs: `ethers.js`, `truffle`, `Web3.js 1.0`, `Web3.js 2.0` or you can create your own target\n- frictionless - works with simple, JSON ABI files as well as with Truffle style ABIs\n\n## Installation\n\n```bash\nnpm install --save-dev typechain\n```\n\nYou will also need to install a desired target for example `typechain-target-ethers`. [Learn more about targets](#targets-)\n\n## Packages 📦\n\n| Package                                                          | Version                                                                                                                     | Description                |\n| ---------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | -------------------------- |\n| [`typechain`](/packages/core)                                    | [![npm](https://img.shields.io/npm/v/typechain.svg)](https://www.npmjs.com/package/typechain)                               | Core package               |\n| [`typechain-target-ethers`](/packages/typechain-target-ethers)   | [![npm](https://img.shields.io/npm/v/typechain-target-ethers.svg)](https://www.npmjs.com/package/typechain-target-ethers)   | Ethers support             |\n| [`typechain-target-truffle`](/packages/typechain-target-truffle) | [![npm](https://img.shields.io/npm/v/typechain-target-truffle.svg)](https://www.npmjs.com/package/typechain-target-truffle) | Truffle support            |\n| [`typechain-target-web3-v1`](/packages/typechain-target-web3-v1) | [![npm](https://img.shields.io/npm/v/typechain-target-web3-v1.svg)](https://www.npmjs.com/package/typechain-target-web3-v1) | Web3 version 1.x.x support |\n| [`typechain-target-web3-v2`](/packages/typechain-target-web3-v2) | [![npm](https://img.shields.io/npm/v/typechain-target-web3-v2.svg)](https://www.npmjs.com/package/typechain-target-web3-v2) | Web3 version 2.x.x support |\n\n## Usage\n\n### CLI\n\n```\ntypechain --target=(ethers|truffle|web3-v1|web3-v2|path-to-custom-target) [glob]\n```\n\n- `glob` - pattern that will be used to find ABIs, remember about adding quotes: `typechain \"**/*.json\"`, examples: `./abis/**/*.abi`, `./out/?(Oasis.abi|OasisHelper.abi)`\n- `--target` - ethers, truffle, web3-v1 or path to your custom target. typechain will try to load package named `typechain-target-${target}`, so make sure that desired package is installed.\n- `--outDir` - put all generated files to a specific dir\n\nTypeChain always will rewrite existing files. You should not commit them. Read more in FAQ section.\n\nExample:\n\n```\ntypechain --target ethers --outDir app/contracts './node_modules/neufund-contracts/build/contracts/*.json'\n```\n\n## Demo 🏎️\n\n![Demo](https://media.giphy.com/media/3oFzmqgHxrPZFhBst2/giphy.gif)\n\n[Example usage](https://github.com/Neufund/commit.neufund.org/pull/331/files)\n\n## Getting started 📚\n\n### Motivation\n\nInteracting with blockchain in Javascript is a pain. Web3 interface is sluggish and when using it\nwith Typescript it gets even worse. Often, you can't be sure what given method call will\nactually do without looking at ABI file. TypeChain is here to solve these problems (as long as you\nuse Typescript).\n\n### How does it work?\n\nTypeChain is code generator - provide ABI file and you will get Typescript class with flexible\ninterface for interacting with blockchain. Depending on the target parameter it can generate typings for\ntruffle, web3 1.0.0 or ethers.\n\n### Step by step guide\n\nInstall typechain with `yarn add --dev typechain` and install desired target.\n\nRun `typechain --target=your_target` (you might need to make sure that it's available in your path if you installed it\nonly locally), it will automatically find all `.abi` files in your project and generate Typescript\nclasses based on them. You can specify your glob pattern: `typechain --target=your_target \"**/*.abi.json\"`.\n`node_modules` are always ignored. We recommend git ignoring these generated files and making typechain part of your build process.\n\nThat's it! Now, just import contract bindings as any other file `import { MyAwesomeContract } from './contracts/MyAwesomeContract'` and start interacting with it. We use named exports because of\n[this](https://blog.neufund.org/why-we-have-banned-default-exports-and-you-should-do-the-same-d51fdc2cf2ad).\n\n## Targets 🎯\n\n### Ethers.js\n\nUse `ethers` target to generate wrappers for [ethers.js](https://github.com/ethers-io/ethers.js/) lib.\n\n### Truffle\n\nTruffle target is great when you use truffle contracts already. Check out [truffle-typechain-example](https://github.com/ethereum-ts/truffle-typechain-example) for more details. It require installing [typings](https://www.npmjs.com/package/truffle-typings) for truffle library itself.\n\nNow you can simply use your contracts as you did before and get full type safety, yay!\n\n### Web3-1.0.0\n\nGenerates typings for contracts compatible with latest stable Web3.js version. Typings for library itself are now part of `Web3 1.0.0` library so nothing additional is needed. For now it needs explicit cast as shown [here](https://github.com/krzkaczor/TypeChain/pull/88/files#diff-540a9b8840419be93ddb8d4b53325637R8), this will be fixed after improving official typings.\n\n### Web3-2.0.0\n\nGenerates typings for contracts compatible with (unstable) Web3.js 2.x.x version. Typings for library itself are now part of `Web3 2.0.0` library so nothing additional is needed. [Usage example](https://github.com/ethereum-ts/TypeChain/blob/master/test/integration/targets/web3-v2/DumbContract.spec.web3.ts#L12).\n\n### Your own target\n\nThis might be useful when you're creating a library for users of your smartcontract and you don't want to lock yourself into any API provided by Web3 access providing library. You can generate basically any code (even for different languages than TypeScript!) that based on smartcontract's ABI.\n\n## Migration guide\n\nFor users of 0.x.x versions: the only breaking change is extraction of targets for separate packages so now you need to install `typechain-target-${name}` for each target.\n\n## FAQ 🤔\n\n### Q: Should I commit generated files to my repository?\n\nA: _NO_ — we believe that no generated files should go to git repository. You should git ignore them\nand make `typechain` run automatically for example in post install hook in package.json:\n\n```\n\"postinstall\":\"typechain\"\n```\n\nWhen you update ABI, just regenerate files with TypeChain and Typescript compiler will find any\nbreaking changes for you.\n\n### Q: How do I customize generated code?\n\nA: You can create your own target and generate basically any code.\n\n### Q: Generated files won't match current codestyle of my project :(\n\nA: We will automatically format generated classes with `prettier` to match your coding preferences (just make sure to use `.prettierrc` file).\n\nFurthermore, we will silent tslint for generated files with `/* tslint:disable */` comments.\n\n### Usage as API\n\nYou may want to use `ts-generator` api to kick off whole process by api:\n\n```typescript\nimport { tsGenerator } from \"ts-generator\";\nimport { TypeChain } from \"typechain/dist/TypeChain\";\n\nasync function main() {\n  const cwd = process.cwd();\n\n  await tsGenerator(\n    { cwd },\n    new TypeChain({\n      cwd,\n      rawConfig: {\n        files: \"your-glob-here\",\n        outDir: \"optional out dir path\",\n        target: \"your-target\",\n      },\n    }),\n  );\n}\n\nmain().catch(console.error);\n```\n\n### Running tests\n\n```\nyarn           # install all dependencies\nyarn test      # runs tests + linting\nyarn test:fix  # autofix any errors + run tests\n```\n\n### Debugging 🐞\n\n```sh\nDEBUG=typechain typechain\n```\n\n# Licence\n\nKrzysztof Kaczor (krzkaczor) MIT | [Github](https://github.com/krzkaczor) | [Twitter](https://twitter.com/krzkaczor)\n","license":"MIT","scripts":{"build":"rm -rf ./dist && cp -R '../../dist/core/lib' ./dist/ && chmod +x ./dist/cli/cli.js && cp ../../README.md .","prepublishOnly":"cd .. && yarn prepublishOnly"},"_npmUser":{"name":"krzkaczor","email":"chris@kaczor.io"},"homepage":"https://github.com/ethereum-ts/Typechain#readme","keywords":["ethereum","TypeScript","bindings","smartcontract","blockchain"],"repository":{"url":"git+https://github.com/ethereum-ts/Typechain.git","type":"git"},"_npmVersion":"6.9.0","description":"🔌 TypeScript bindings for Ethereum smartcontracts","directories":{},"maintainers":[{"name":"krzkaczor","email":"krzkaczor@gmail.com"}],"_nodeVersion":"10.16.0","dependencies":{"debug":"^3.0.1","lodash":"^4.17.15","js-sha3":"^0.8.0","fs-extra":"^7.0.0","ts-generator":"^0.0.8","command-line-args":"^4.0.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.1.2","glob":"^7.1.2","ethers":"^4.0.7","truffle":"^4.1.14","bluebird":"^3.5.1","coveralls":"^3.0.2","@types/chai":"^4.0.6","@types/glob":"^5.0.35","@types/node":"^8.0.25","ganache-cli":"^6.1.8","@types/debug":"^0.0.30","@types/mocha":"^2.2.44","bignumber.js":"^5.0.0","@types/lodash":"^4.14.139","@types/bluebird":"^3.5.18","@types/fs-extra":"^5.0.4","@types/prettier":"^1.13.2","truffle-typings":"^1.0.4","chai-as-promised":"^7.1.1","@types/bignumber.js":"^5.0.0","@types/chai-as-promised":"^7.1.0","@types/command-line-args":"^4.0.2"},"_npmOperationalInternal":{"tmp":"tmp/typechain_2.0.0--beta.0_1580387064915_0.09642861856953955","host":"s3://npm-registry-packages"},"_id":"typechain@2.0.0--beta.0","version":"2.0.0--beta.0"}