{"bin":{"typechain":"./dist/cli/cli.js"},"bugs":{"url":"https://github.com/ethereum-ts/Typechain/issues"},"dist":{"shasum":"5f4864cf6567005fca663c8a51d07cc8d4b00bb0","tarball":"https://registry.npmjs.org/typechain/-/typechain-2.0.0-beta2.tgz","fileCount":60,"integrity":"sha512-SxFCtmZrjkaDLj/xq/3TX5BfyxjNLKGbjAvQ5Cnk1APvrVF2PgDRG31jgxhpIi/Y9LtxoMBXu2Ii1OUC4tnDpw==","signatures":[{"sig":"MEUCIBW2bJNHkVm4XxzDMarUbxT3iz0ewBt4whMe4MZ7p/aTAiEA3oXOAzW9x5c0y1PSABwdon8lehBbjuZDCDv5KgJTELI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":181542,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeozLHCRA9TVsSAnZWagAAg/cP/i9g9IbqjC0/iROn7Vuw\nemGU8KdCKujzGSl47UZETE4+NbOhscrw8fY0u/tU9eQd+XBzHCQKuNoh7mkm\nc7QxHfDFIojoT0p3pX0O6JWkCncysx64v/JfPb0o1H/dzsRIziVfs+W20kHT\nagFF9aSA1emLq0bCFzM7pFA019XPK8FFdyU0rTLjALspDY5u2SGd61BdXGtg\nB0KJsrAHgukl+emdCKQc4Eo2Clwp4BxcXG+ohemAkBWCqVzshiZlqHE8eMzb\nLHYMZe9Fay3SnB8B0i4PkPZUS7cngWrd95RmJ5gbCUecaPyGbE3MehA5im9y\nTFZ1EQEmcEdDOMxyD2I9b9EG1p2ssoYDgyGliQSSSueZeMj7zveQdV64P0KB\n0s27MrYePDJzs4dBgeW/LW20QJY3n48z4ymCErqI/xBUDdOVEedhDxAixRXu\nwfG4mcxGsmp7fS5OmDXL1m7ow79eIkrdlfQ3NbLrbY190T0SAQ08MEpggEjC\nu2sCIxbpKuQ6E2etxnSiF3rQv+NgJ/ib/qJFCTfvGPp93wTWz4f5TsKA0aPv\nJcN2Hj4dLqfbmm5CFhn/b8mr/ac9D8Wmvubdq/tRpCfDaRdCDMpL7uJCObLX\nP01TUCusoCT/nePOXNbk9gXoHH71pNQ9l5CVJsUkZ0rMu7Hne8P6T2rwQXEf\n/gQ9\r\n=Cdnd\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index.js","name":"typechain","types":"./dist/index.d.ts","module":"./dist/index.js","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\n  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`.\n[Learn more about targets](#targets-)\n\n## Packages 📦\n\n| Package                                                    | Version                                                                                                               | Description           | Examples                         |\n| ---------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------- | -------------------------------- |\n| [`typechain`](/packages/core)                              | [![npm](https://img.shields.io/npm/v/typechain.svg)](https://www.npmjs.com/package/typechain)                         | Core package          | -                                |\n| [`@typechain/ethers-v4`](/packages/@typechain/ethers-v4)   | [![npm](https://img.shields.io/npm/v/@typechain/ethers-v4.svg)](https://www.npmjs.com/package/@typechain/ethers-v4)   | Ethers ver 4 support  | [example](./examples/ethers-v4)  |\n| [`@typechain/truffle-v4`](/packages/@typechain/truffle-v4) | [![npm](https://img.shields.io/npm/v/@typechain/truffle-v4.svg)](https://www.npmjs.com/package/@typechain/truffle-v4) | Truffle ver 4 support | [example](./examples/truffle-v4) |\n| [`@typechain/web3-v1`](/packages/@typechain/web3-v1)       | [![npm](https://img.shields.io/npm/v/@typechain/web3-v1.svg)](https://www.npmjs.com/package/@typechain/web3-v1)       | Web3 ver 1 support    | [example](./examples/web3-v1)    |\n| [`@typechain/web3-v2`](/packages/@typechain/web3-v2)       | [![npm](https://img.shields.io/npm/v/@typechain/web3-v2.svg)](https://www.npmjs.com/package/@typechain/web3-v2)       | Web3 ver 2 support    | [example](./examples/web3-v2)    |\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:\n  `./abis/**/*.abi`, `./abis/?(Oasis.abi|OasisHelper.abi)`\n- `--target` - ethers, truffle, web3-v1 or path to your custom target. typechain will try to load package named\n  `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 with Typescript it\ngets even worse. Often, you can't be sure what given method call will actually do without looking at ABI file. TypeChain\nis here to solve these problems (as long as you use Typescript).\n\n### How does it work?\n\nTypeChain is code generator - provide ABI file and you will get Typescript class with flexible interface for interacting\nwith blockchain. Depending on the target parameter it can generate typings for truffle, 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 classes based on\nthem. You can specify your glob pattern: `typechain --target=your_target \"**/*.abi.json\"`. `node_modules` are always\nignored. 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\n`import { MyAwesomeContract } from './contracts/MyAwesomeContract'` and start interacting with it. We use named exports\nbecause of [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\n[truffle-typechain-example](https://github.com/ethereum-ts/truffle-typechain-example) for more details. It require\ninstalling [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\nof `Web3 1.0.0` library so nothing additional is needed. For now it needs explicit cast as shown\n[here](https://github.com/krzkaczor/TypeChain/pull/88/files#diff-540a9b8840419be93ddb8d4b53325637R8), this will be fixed\nafter 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\npart of `Web3 2.0.0` library so nothing additional is needed.\n[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\ninto any API provided by Web3 access providing library. You can generate basically any code (even for different\nlanguages 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\ninstall `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 and make\n`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 breaking changes for\nyou.\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\nuse `.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":{"lint":"eslint --ext .ts src test","test":"mocha --config ../../.mocharc.js","clean":"rm -rf dist && rm -f tsconfig.build.tsbuildinfo","start":"ts-node -T ./src/index.ts","format":"prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --check \"./**/*.ts\"","lint:fix":"yarn lint --fix","test:fix":"yarn lint:fix && yarn format:fix && yarn test && yarn typecheck","typecheck":"tsc --noEmit --incremental false --composite false","format:fix":"prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"./**/*.ts\"","post-build":"chmod +x ./dist/cli/cli.js && cp ../../README.md .","prepublishOnly":"yarn lint && yarn format && yarn test && yarn typecheck && (cd ../.. && yarn build)"},"_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":"^4.1.1","lodash":"^4.17.15","js-sha3":"^0.8.0","fs-extra":"^7.0.0","ts-generator":"^0.0.8","ts-essentials":"^6.0.3","command-line-args":"^4.0.7"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"^4.2.0","glob":"^7.1.2","mocha":"^6.2.2","sinon":"^8.0.1","eslint":"^6.8.0","ts-node":"^8.5.4","bluebird":"^3.5.1","coveralls":"^3.0.2","sinon-chai":"^3.3.0","typescript":"3.9.0-beta","@types/chai":"^4.2.7","@types/glob":"^5.0.35","@types/node":"^8.0.25","@types/debug":"^4.1.5","@types/mocha":"^5.2.7","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","chai-as-promised":"^7.1.1","@types/bignumber.js":"^5.0.0","eslint-plugin-sonarjs":"^0.5.0","@types/chai-as-promised":"^7.1.2","@types/command-line-args":"^4.0.2","eslint-config-typestrict":"^1.0.0","@typescript-eslint/parser":"^2.12.0","eslint-plugin-no-only-tests":"^2.4.0","@typescript-eslint/eslint-plugin":"^2.25.0"},"_npmOperationalInternal":{"tmp":"tmp/typechain_2.0.0-beta2_1587753670666_0.7825850421033897","host":"s3://npm-registry-packages"},"_id":"typechain@2.0.0-beta2","version":"2.0.0-beta2"}