{"dist":{"shasum":"cab20f28945b60fe0905a7924fedab2351714834","tarball":"https://registry.npmjs.org/truffle-artifactor/-/truffle-artifactor-4.0.16-alpha.1.tgz","fileCount":12,"integrity":"sha512-8Gr9JzhP/Abl84mHJYLhEoJtvGAj0z0cRa+kEt5fR3hBDb3gvJa5LuOFqWo+22yx1Fn+2IjwJbBXkOC1r+bnGA==","signatures":[{"sig":"MEUCIBPprVXyHLhttWRoUsCR9PP2jfVxz8+yKawSJZ753PIbAiEAz/H6acmuXj4utcatPmcZUj5/cokZYyN8KTXRZ/YSSd0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":25202,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJc7Zx4CRA9TVsSAnZWagAAaRcP/0HqTlrhHZ4el39vOCCi\nzML0YUAPHQVn+L4DShBG5Tf1Pw+ZPZRB5CLE2CWtvkATB3bKHDTE7etiIhw6\n+JP4TPdQ8RqlETk+qLjISN/nl3P5svQczTeDSQ79qz/hzydc26BLxZa6mwoP\ngwh9IRKX5yKpKt09aupuicSd7Jaua3CW/IoZLzHmwlGYRGvST66pwf9Mx8Jj\n79sk4G4kvcgYtXqd7JWagO7j5fuhGWpWmQZQWjxm98niYERr/C8oE+iZ6aza\nwSrdkvPtxMvUxkzsRfS5U4HInKiJI7nSWRPztC8vDTOdyGcp+kHjFVNNoNMl\ns8+5bqmaK7v+Wu4LK6vcnKyj8k/tAauTV9rruR9Q3y3CzOWvL2dWFXpYTYmz\nDLkx33cWeOhb8GbOz3zvj8nSmyKtQt1S8P0UoeSyS/RSp+q6XcEM6MEORDRT\ntWuPD46CprKIeQlYLQiXG5kX9oCLiodhHnNR9aoVn2BtH9skclkUiPVWG83W\nBUtZT/JaEU4tPOmA5/+tDgzAseIkDQhCzqX2bGL39S3Kcb26TytTuKGnmGok\nteP0LTE8e6vpjZPKs7ENoxv34M3h6J8ZWB8QOo4tGmeBefRm/mVXo01r2Dbh\nAkmxWCgdbZP9XCJRI3Cqfy74/4U8ggen+wQ5z2V2xUUE+wbkCe4dNdL29hkg\n8+Oo\r\n=tX0o\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./index.js","name":"truffle-artifactor","author":{"name":"Tim Coulter"},"readme":"# truffle-artifactor\n\nThis package saves contract artifacts into JSON files\n\n```javascript\nconst Artifactor = require(\"truffle-artifactor\");\nconst artifactor = new Artifactor(__dirname);\nartifactor.save({/*...*/}); // => a promise saving MyContract.json to a given destination\n```\n\n👏\n\n### Features\n\n* Manages contract ABIs, binaries and deployed addresses, so you don't have to.\n* Packages up build artifacts into `.json` files, which can then be included in your project with a simple `require`.\n* Manages library addresses for linked libraries.\n\nThe artifactor can be used with [truffle-contract](https://github.com/trufflesuite/truffle/tree/develop/packages/truffle-contract), which provides features above and beyond `web3`:\n\n* Synchronized transactions for better control flow: transactions won't be considered finished until you're guaranteed they've been mined.\n* Promises. No more callback hell. Works well with `ES6` and `async/await`.\n* Default values for transactions, like `from` address or `gas`.\n* Returning logs, transaction receipt and transaction hash of every synchronized transaction.\n\n### Install\n\n```\n$ npm install truffle-artifactor\n```\n\n### Example\n\nHere, we'll generate a `.json` files given a JSON object like [truffle-contract-schema](https://github.com/trufflesuite/truffle/tree/develop/packages/truffle-contract-schema). This will give us a file which we can later `require` into other projects and contexts.\n\n```javascript\nconst Artifactor = require(\"truffle-artifactor\");\nconst artifactor = new Artifactor(__dirname);\n\n// See truffle-schema for more info: https://github.com/trufflesuite/truffle/tree/develop/packages/truffle-contract-schema\nconst contractData = {\n  contractName: \"...\",        // String; optional.\n  abi: ...,                   // Array; required.\n  metadata: \"...\",            // String; optional.\n  bytecode: \"...\",            // String; optional.\n  \"x-some-dependency\": ...    // String, Number, Object, or Array: optional.\n};\n\nartifactor.save(contractData);\n// The file ./MyContract.json now exists, which you can\n// import into your project like any other Javascript file.\n```\n\n# API\n\n#### `artifactor.save(contractData)`\n\nSave contract data as a `.json` file. Returns a Promise.\n\n* `contractData`: Object. Data that represents this contract:\n\n    ```javascript\n    {\n      contractName: \"MyContract\",   // String; optional. Defaults to \"Contract\".\n      abi: ...,                     // Array; required.  Application binary interface.\n      metadata: \"...\",              // String; optional. Contract metadata.\n      bytecode: \"...\",              // String; optional. Contract-creation binary without resolve library links.\n      deployedBytecode: \"...\",      // String; optional. On-chain deployed binary without resolve library links.\n      sourceMap: \"...\",             // String; optional. Source mapping for bytecode.\n      deployedSourceMap: \"...\",     // String; optional. Source mapping for deployedBytecode.\n      source: \"...\",                // String; optional. Uncompiled source code for contract.\n      sourcePath: \"...\",            // String; optional. File path for uncompiled source code.\n      ast: ...,                     // Object; optional. JSON representation of contract source code, as output by compiler.\n      legacyAST: ...,               // Object; optional. Legacy JSON representation of contract source code, as output by compiler.\n      compiler: ...,                // Object; optional. Compiler \"type\" and \"properties\".\n      networks: ...,                // Object; optional. Mapping of network ID keys to network object values (address information, links to other contract instances, and/or contract event logs).\n      schemaVersion: \"...\",         // String; optional. Schema version used by contract object representation.\n      updatedAt: \"...\",             // String; optional. Time contract object representation was generated/most recently updated.\n      devdoc: \"...\",                // String; optional. Developer documentation.\n      userdoc: \"...\",               // String; optional. User documentation.\n      \"x-custom-property\": ...      // String, Number, Object, or Array: optional. Custom property. Keys must be prefixed with \"x-\".\n    }\n    ```\n\n#### `artifactor.saveAll(contracts)`\n\nSave many contracts to the filesystem at once. Returns a Promise.\n\n* `contracts`: Object. Keys are the contract names and the values are `contractData` objects, as in the `save()` function above:\n\n    ```javascript\n    {\n      \"MyContract\": {\n        \"abi\": ...,\n        \"bytecode\": \"...\"\n      }\n      \"AnotherContract\": {\n        // ...\n      }\n    }\n    ```\n\n### Running Tests\n\n```\n$ npm test\n```\n\n### License\n\nMIT\n","gitHead":"2dab6c88d97436cb45c246db32dd33167d5fcdee","license":"MIT","private":false,"scripts":{"test":"mocha"},"_npmUser":{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},"repository":{"url":"https://github.com/trufflesuite/truffle/tree/master/packages/truffle-artifactor","type":"git"},"_npmVersion":"lerna/3.13.1/node@v11.4.0+x64 (darwin)","description":"A contract packager for Ethereum and Javascript","directories":{},"maintainers":[{"name":"cruzmolina","email":"cruz.adam.molina@gmail.com"},{"name":"davidmurdoch","email":"david@davidmurdoch.com"},{"name":"eggplantzzz","email":"pobol234@gmail.com"},{"name":"fainashalts","email":"fainashalts@gmail.com"},{"name":"gnidan","email":"nick@gnidan.org"},{"name":"seesemichaelj","email":"seesemichaelj@gmail.com"},{"name":"tcoulter","email":"tim@timothyjcoulter.com"}],"_nodeVersion":"11.4.0","dependencies":{"lodash":"4.17.11","fs-extra":"6.0.1","truffle-contract-schema":"^3.0.9"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"chai":"4.2.0","temp":"^0.8.3","web3":"1.0.0-beta.37","debug":"^4.1.1","mocha":"5.2.0","ganache-core":"2.5.5","require-nocache":"^1.0.0","truffle-contract":"^4.0.17-alpha.1"},"_npmOperationalInternal":{"tmp":"tmp/truffle-artifactor_4.0.16-alpha.1_1559075960298_0.2987356413532387","host":"s3://npm-registry-packages"},"_id":"truffle-artifactor@4.0.16-alpha.1","version":"4.0.16-alpha.1"}