{"_id":"@decent-bet/connex-entity-builder","_rev":"3-1a2ad5e8ceb62bd234d7d3ffebabe40b","name":"@decent-bet/connex-entity-builder","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@decent-bet/connex-entity-builder","version":"1.0.0","description":"A simple builder that reads Truffle generated JSON interfaces and generates imports and entities","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/decent-bet/connex-entity-builder.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/decent-bet/connex-entity-builder/issues"},"homepage":"https://github.com/decent-bet/connex-entity-builder#readme","gitHead":"6b6a748d60780b961fd6d14d53176f77c2c81926","_id":"@decent-bet/connex-entity-builder@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"molekilla","email":"molekilla@gmail.com"},"dist":{"integrity":"sha512-72hC9Zq5FRWLLqFXKwN+au6rsClH32YMc+b+rFmFI4yJZaoQMYYNHJ5Vstuo/85H13NB4qM2x3gLCSIBnnX4RQ==","shasum":"039a8890754481de3687e72f978c2d65d44e34ae","tarball":"https://registry.npmjs.org/@decent-bet/connex-entity-builder/-/connex-entity-builder-1.0.0.tgz","fileCount":4,"unpackedSize":4954,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgBA2CRA9TVsSAnZWagAAXnUP/jLwe5UDgP+UL2kLrzEy\nS9D0uK2P3X1rpsNb9w0vwD4Pqrv9c7k/k3VJYSY8+KVj8clxgP8jQ/5zA+8I\nzywZ/zm21YyKkZ3HOROxFVJQUopXxKY+Qxlz1H13x6dKCzL8bF+aTevGCy7S\nav6MCQryDdErQaY3/XnOqlCQ8jUhdq/3Io+wb/XrN70OqlKxR2/EXTuI5jmH\nWVGCydVV0cKH5GzHhARyjv+/gRGuLGHW5de4gV2JPvwQXlfzkrgKSGADeESI\nngnzg17UwtxdZuwXUNuGgj2LdxfkEOuEKQSAkxgC0QG7f/8Mnft6UsjTbHEN\nLoR5cm4BLMWoDjGKUEZDY2MDGJe0xDWfXQD5TJHN9rTZrIrGDnqODKTcqkIa\ncasllnHrXluaDja9cCIcUW3xyWhtqRtHaq5CLtLY6Yx0z9P5qmLsYANavPsa\nRamPggVQtuiNHa6+Xh14bgNEGBevSfAlGqiSHclE0h17I0n9mvHQGzK8+hxb\n2fwnW72NfQaXqEQYKv1/rpHCAPsrht/Ztab7b/h2EvZQ5F77ZGdpjsVxDjUB\nq/VvWIjzX9z2u7hIK4EEHFOOBsZWTaNM+yQ3LrEtJgJoKgKH7qzuac3CMhtG\nPFgGEMGGtU1z1iL2vdzjoPJbAfjcA+/4dr2IYojGbMGEPjK3c0vlI0Zh46pA\n+Wru\r\n=M98A\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICbVqXyr8igo6jUhREeFNakjlJzTnS3n48UBaAnSjLpgAiEAnFQ60RlXqDafqpJamuV2kc5lmTPt0sRnuqQvudjYBAI="}]},"maintainers":[{"name":"bradleysuira","email":"bradleysuira@gmail.com"},{"name":"decent-dev","email":"dev@decent.bet"},{"name":"bstahlhood","email":"bstahlhood@icloud.com"},{"name":"molekilla","email":"molekilla@gmail.com"},{"name":"roberto-decent-bet","email":"roberto@decent.bet"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connex-entity-builder_1.0.0_1551896629391_0.7259254479572026"},"_hasShrinkwrap":false},"1.0.1":{"name":"@decent-bet/connex-entity-builder","version":"1.0.1","description":"A simple builder that reads Truffle generated JSON interfaces and generates imports and entities","main":"index.js","scripts":{"test":"echo \"Error: no test specified\" && exit 1"},"repository":{"type":"git","url":"git+https://github.com/decent-bet/connex-entity-builder.git"},"author":"","license":"ISC","bugs":{"url":"https://github.com/decent-bet/connex-entity-builder/issues"},"homepage":"https://github.com/decent-bet/connex-entity-builder#readme","gitHead":"13067f20ce3bf898b951694b4b279f1d00bcfa20","_id":"@decent-bet/connex-entity-builder@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"molekilla","email":"molekilla@gmail.com"},"dist":{"integrity":"sha512-PfOizBeDwfBSJLRIgnGfpVYB9UzI/HdChyjskmnc/3Bs5IyTEr0B6BRJAdYRm5L3s2hrHoecKFxKmraA/QXMlA==","shasum":"bde7da9f15de22b2c99987124622f8b773dceb00","tarball":"https://registry.npmjs.org/@decent-bet/connex-entity-builder/-/connex-entity-builder-1.0.1.tgz","fileCount":4,"unpackedSize":4851,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcgBRCCRA9TVsSAnZWagAAszwP/iWacqq4TAqDqU9GvFEa\nmqh0rOBu7V4asoVY/1MeVyPBRKPKMNo2jauR0FyfeXbd2Np9RY+OyJuyoJBN\n1IT2L4YI0CWQbjvTLSx3alw+M/rJXxwcJi7LmzX/1pcVqtwZveY9nZHPbw2A\nk8CW9tEUbhpB9nBfiGxaPXqDIol8kimAN6MLSQYSxsvOZoEd+dZXM1DNuP56\nJRMKbQ8nSJxSFhi/nX1NQkywS4KaVAT/azoHdOmBAF6HBMulc4UpyceM3zdz\neb43G8JtGsKmLzaeEB0n0wunEl4uammZXFrapnOQKkvqqNLsyHxmOigGF0do\noMbtLYPfEm9aD9I3tyNM4C/Z3zlqcXQKrFv56RswQma5I583L7LQ7tSCm52X\nhci7DdovLG4mOhWutgZUUeohyFH4mdIAp+ogTSdBQVjM1d5rrTxJ4ffW80qp\n4z+wEksqEYHPMFqJ/MjZ0tidXBwqgj2ZqxQjoEsvGTYTC0DrX98QPY+hhX1R\n8kz6wpDpFASTw6hE1HR29SctYN2svCsgR2D7+OCAFfcO/DiKqxie1fTV7vuX\nEDVvS71BSmLdInx9v9lLJhs+jTJOdoWiE+GHXN2SmZMsWA9yyl0Hb0x7Dpbt\nCszUSYjfgooB2bXaZjd7W/stVDNrgh+EFOzkTo39Ss2CtkPm5XYPGuvzynxp\nwRYN\r\n=40yl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD/xemGM08f60G2ZaVh1aEcW3pzfuxtwAnf5Il5HNvQDQIgXwsbBodQy/P7l58o5WFHyWSWysMwVwN0F90rEY2lHd0="}]},"maintainers":[{"name":"bradleysuira","email":"bradleysuira@gmail.com"},{"name":"bstahlhood","email":"bstahlhood@icloud.com"},{"name":"decent-dev","email":"dev@decent.bet"},{"name":"molekilla","email":"molekilla@gmail.com"},{"name":"roberto-decent-bet","email":"roberto@decent.bet"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/connex-entity-builder_1.0.1_1551897666458_0.8363657295329707"},"_hasShrinkwrap":false}},"time":{"created":"2019-03-06T18:23:49.391Z","1.0.0":"2019-03-06T18:23:49.533Z","modified":"2022-04-05T03:33:25.692Z","1.0.1":"2019-03-06T18:41:06.624Z"},"maintainers":[{"email":"bradleysuira@gmail.com","name":"bradleysuira"},{"email":"dev@decent.bet","name":"decent-dev"},{"email":"bstahlhood@icloud.com","name":"bstahlhood"},{"email":"molekilla@gmail.com","name":"molekilla"}],"description":"A simple builder that reads Truffle generated JSON interfaces and generates imports and entities","homepage":"https://github.com/decent-bet/connex-entity-builder#readme","repository":{"type":"git","url":"git+https://github.com/decent-bet/connex-entity-builder.git"},"bugs":{"url":"https://github.com/decent-bet/connex-entity-builder/issues"},"license":"ISC","readme":"# connex-entity-builder\nA simple builder that reads Truffle generated JSON interfaces and generates imports and entities\n\n## Install\n\n`npm i @decent-bet/connex-entity-builder`\n\n## How to use with Truffle migrations\n\n1. Add library: `const ContractImportBuilder = require('@decent-bet/connex-entity-builder')`\n2. Create instance and set output\n```javascript\nmodule.exports = (web3, dbet, deployer, args) => {\n    const builder = new ContractImportBuilder();\n    builder.setOutput(`./npm/index.js`);\n    return new MigrationScript(web3, dbet, deployer, builder, args)\n}\n```\n3. Configure write event\n\n```javascript\n    builder.onWrite = (output) => {\n        fs.writeFileSync(`./npm/index.js`, output)\n    }\n```\n\n4. Add contracts. This will generate a `contract import` which has the following schema:\n\n```javascript\n{\n    VERSION: string,\n    [name]: {\n        raw: {\n            abi: \"<_jsonInterface from Truffle ABI>\"\n        },\n        address: {\n            [chaintag]: \"<address>\"\n        }\n    }\n}\n```\n\nThe `addContract` method has the following parameters:\n\n* **name**: The friendly name of the contract. \n* **contract**: Contract object from a Truffle migration.\n* **address**: The deployed address of a contract.\n* **chaintag**: The current chaintag or net being deployed.\n\n### Example:\n```javascript\nbuilder.addContract(\"TokenContract\", Token, token.options.address, chain);\n```\n\n\n## Pending\n\n* Generate basic connex contract entities mapped to contract import\n* Enable CI process to `npm publish` once a PR is merged to master","readmeFilename":"README.md"}