{"_id":"@blockrocket/drizzle-vue-plugin","_rev":"2-aee6be4bdd52cc206a6eb2ccb046f88c","name":"@blockrocket/drizzle-vue-plugin","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@blockrocket/drizzle-vue-plugin","version":"1.0.0","description":"A drizzle adaptor for Vue - Fetched from develop on 29/10/19","author":{"name":"Amal Sudama","email":"amal@trufflesuite.com","url":"https://github.com/trufflesuite/drizzle-vue-plugin#readme"},"repository":{"type":"git","url":"https://github.com/trufflesuite/drizzle-suite/tree/master/packages/vue-plugin"},"scripts":{"lint":"vue-cli-service lint","prepare":"vue-cli-service build --target lib --name drizzle-vue-plugin ./src/DrizzleVuePlugin.js","test":"vue-cli-service test:unit"},"publishConfig":{"access":"public"},"main":"./dist/drizzle-vue-plugin.common.js","dependencies":{"@blockrocket/drizzle-store":"1.0.0","lodash":"^4.17.11","rxjs":"^6.5.2","rxjs-compat":"^6.5.2"},"peerDependencies":{"vue":"^2.6.10","vuex":"^3.1.1"},"devDependencies":{"@vue/cli-plugin-babel":"^3.10.0","@vue/cli-plugin-eslint":"^3.10.0","@vue/cli-plugin-unit-jest":"^3.10.0","@vue/cli-service":"^3.8.4","@vue/eslint-config-prettier":"^5.0.0","@vue/test-utils":"1.0.0-beta.29","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-jest":"^23.6.0","eslint":"^5.16.0","eslint-config-standard":"^13.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.6.4","eslint-plugin-prettier":"^3.1.1","eslint-plugin-vue":"^5.0.0","prettier":"^1.18.2","vue-template-compiler":"^2.6.10"},"bugs":{"url":"https://github.com/trufflesuite/drizzle-vue-plugin/issues"},"homepage":"https://github.com/trufflesuite/drizzle-vue-plugin#readme","keywords":["drizzle","ethereum","vue"],"_id":"@blockrocket/drizzle-vue-plugin@1.0.0","_nodeVersion":"10.16.3","_npmVersion":"6.12.0","dist":{"integrity":"sha512-JLE4xsaKHX2C2w3XyShstYgFNXOjHHAXkH24v1a9Vo2k8ni9BfPi2XUwJHB0LeE9eG3UMbR5sVPVJ2S0JRZdZA==","shasum":"ca8629118c566752783a7e3772ff88d8033e2bb4","tarball":"https://registry.npmjs.org/@blockrocket/drizzle-vue-plugin/-/drizzle-vue-plugin-1.0.0.tgz","fileCount":40,"unpackedSize":1625434,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduCgrCRA9TVsSAnZWagAA9aMP/0yRVm6YK8bknShtSLqP\nIeFHLgGTLVVsr657j/bDhTSo2gSD3UKd9o35HTznjKM1H92gMAwrP/3aZI5o\nkgjSwmU1EgYhMU9jBtCnJ4KYmnn39d7mf0Xy1XT0cmnJM1/WKOaN4YW3YjBe\nV7KGEanHZYAb1uD9ww2kPAmwww5kfJSzEqCmiOMvkWEQzh6ZauaAneadWHZu\nW3Cac22gAlaMgBRconqIQLRu5GFOrhpFxEOEBZDk9rFZdU3Hyqf2F4UnJI8V\nuzJhDT6yWSOGEdFRn4v6LR/pBpNcs3/33tQGDvUSO1Ct8J/Io17KsaeuvR8V\n/kcxlhHL7WTzqlZqQ7xpcgRMztwOtdZksm9i0fwPdN6w6GxSENKh1e65cRDh\no/6QgCNIHO3gvJ/KadjjE1ZFweQqN6brt4A3AimJ1XP7ySY2/UCTaXDC7d1m\nMuK+GLTOAvIeTWXytUki+7YMlmozlqZF/aNfg9nDu9i887xCsTSjw6ZaJ8vB\n9lvNJSTLIxOLloh/eH+MEqTq3UiJLq8dgUXclCzrKCPrw8jbmkIzG3OstHL7\nBiDB8SmbkKF/NWS/27GTj7Vy6fT6Dtc4Sv0k7eAgXEWVIgyYW1rQh684Krpl\nZfbKgQTu03ZaHi7pBEKMVc+Fw5usLvYVVIEeWivfrgkw2hspreC5Ox8QNkAA\nZlJX\r\n=9qZ9\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICt60lMhg5TvGSHw04PXCe+Wa3bklqcrlS0jpePqdjZCAiAYwuTm5p0vOLBOqE48DWXFYe/CS5gSoTyURPqDuutpPg=="}]},"maintainers":[{"name":"andygrayblockrocket","email":"andy.gray@blockrocket.tech"},{"name":"jamesmorgan_blockrocket","email":"james.morgan@blockrocket.tech"},{"name":"vblockrockettech","email":"vincent@blockrocket.tech"},{"name":"james.morgan","email":"james.morgan.e@googlemail.com"}],"_npmUser":{"name":"vblockrockettech","email":"vincent@blockrocket.tech"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drizzle-vue-plugin_1.0.0_1572349995086_0.5648104343872584"},"_hasShrinkwrap":false},"1.0.1":{"name":"@blockrocket/drizzle-vue-plugin","version":"1.0.1","description":"A drizzle adaptor for Vue - Fetched from develop on 29/10/19","author":{"name":"Amal Sudama","email":"amal@trufflesuite.com","url":"https://github.com/trufflesuite/drizzle-vue-plugin#readme"},"repository":{"type":"git","url":"https://github.com/trufflesuite/drizzle-suite/tree/master/packages/vue-plugin"},"scripts":{"lint":"vue-cli-service lint","prepare":"vue-cli-service build --target lib --name drizzle-vue-plugin ./src/DrizzleVuePlugin.js","test":"vue-cli-service test:unit"},"publishConfig":{"access":"public"},"main":"./dist/drizzle-vue-plugin.common.js","dependencies":{"@blockrocket/drizzle-store":"1.0.1","lodash":"^4.17.11","rxjs":"^6.5.2","rxjs-compat":"^6.5.2"},"peerDependencies":{"vue":"^2.6.10","vuex":"^3.1.1"},"devDependencies":{"@vue/cli-plugin-babel":"^3.10.0","@vue/cli-plugin-eslint":"^3.10.0","@vue/cli-plugin-unit-jest":"^3.10.0","@vue/cli-service":"^3.8.4","@vue/eslint-config-prettier":"^5.0.0","@vue/test-utils":"1.0.0-beta.29","babel-core":"7.0.0-bridge.0","babel-eslint":"^10.0.2","babel-jest":"^23.6.0","eslint":"^5.16.0","eslint-config-standard":"^13.0.1","eslint-plugin-import":"^2.18.2","eslint-plugin-jest":"^22.6.4","eslint-plugin-prettier":"^3.1.1","eslint-plugin-vue":"^5.0.0","prettier":"^1.18.2","vue-template-compiler":"^2.6.10"},"bugs":{"url":"https://github.com/trufflesuite/drizzle-vue-plugin/issues"},"homepage":"https://github.com/trufflesuite/drizzle-vue-plugin#readme","keywords":["drizzle","ethereum","vue"],"_id":"@blockrocket/drizzle-vue-plugin@1.0.1","_nodeVersion":"10.16.3","_npmVersion":"6.12.0","dist":{"integrity":"sha512-/aozTuUo64q0yJuxeP223apa9vPwepSHe/DKjngnHPJOSkyoARfhLzWc01OQejFH+AAXKvaRcA1nAjdE04gRIA==","shasum":"548a07f335e9009cea00e6063291c964f9ccbeb3","tarball":"https://registry.npmjs.org/@blockrocket/drizzle-vue-plugin/-/drizzle-vue-plugin-1.0.1.tgz","fileCount":40,"unpackedSize":1619967,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJduCt3CRA9TVsSAnZWagAA2acQAJRXF7UtLKumYmxzfxRK\n62FC2ZC0UrlmjNcY6SSJ6B1iXJUiY6PaF3rwdqWUWrntviU4TRDC+luVJMXT\nGUZa1j5RW3CnWTKWhg4exUU3CxIF0ybplqrck5TSu15B54YqvqlRmhnNllul\nvDNf9yq9xKjN4DS1UN10OvPr8x4PpvxUFrn7PIcyD++4pXoE49JERdaMAQhN\nmRs12MJt7ITslK9Rrw6fe0kWFbk/nKMpQoL4wy1P2JJ5YFIy8An2I1N5/ShD\nokg3/hAQ20krWMs5WH/cEDiujDLDyhjkcuxc0b5op//XBFLHC2eyJtqbJQek\nN5yTJnqL8DqIexCA2tYUz61uJSOrq5rwlQc+Dbo+x5xQweS7A8SaxDz1fzzn\neJr/CvLlTuR3z+PMXgNEaQrZCjHUH1np59Md7d20L4xCfyvztaCjr8RigXCG\nDNl7sJH+IzgxnVZaVrCxglEYYPxssW9LVGL+frQCZPXy3bmsQ5PAIMOhH2Vc\no3v1jhyUGvkVBl4cEqe/QrhKlE0AdEiCmI1PcQsXnTTRVESTIHhjYWKu49Jq\n+CSlTu4+0XQCivokdCPlPzbObrlQcEn43aveNywNJwEYXOreM6w4eEs2cO1w\nOhJjhwe9F5UewIXAh72ot3BnEcklcuxjil+aoN9ggZDlSL8f63OK7MlWSNiJ\nOkEM\r\n=+cRs\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC6URJKS0FdxLQbcaGl9g7yStk5zbFtTRh/77MUULtqNwIgCAwNS4sScs5+BotzV4GnHI5cSAK7L+BpBdjaVHtZsnI="}]},"maintainers":[{"name":"andygrayblockrocket","email":"andy.gray@blockrocket.tech"},{"name":"james.morgan","email":"james.morgan.e@googlemail.com"},{"name":"jamesmorgan_blockrocket","email":"james.morgan@blockrocket.tech"},{"name":"vblockrockettech","email":"vincent@blockrocket.tech"}],"_npmUser":{"name":"vblockrockettech","email":"vincent@blockrocket.tech"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/drizzle-vue-plugin_1.0.1_1572350838872_0.9874257831042739"},"_hasShrinkwrap":false}},"time":{"created":"2019-10-29T11:53:14.799Z","1.0.0":"2019-10-29T11:53:15.226Z","modified":"2022-04-04T19:39:11.816Z","1.0.1":"2019-10-29T12:07:19.000Z"},"maintainers":[{"name":"andygrayblockrocket","email":"andy.gray@blockrocket.tech"},{"name":"james.morgan","email":"james.morgan.e@googlemail.com"},{"name":"jamesmorgan_blockrocket","email":"james.morgan@blockrocket.tech"},{"name":"vblockrockettech","email":"vincent@blockrocket.tech"}],"description":"A drizzle adaptor for Vue - Fetched from develop on 29/10/19","homepage":"https://github.com/trufflesuite/drizzle-vue-plugin#readme","keywords":["drizzle","ethereum","vue"],"repository":{"type":"git","url":"https://github.com/trufflesuite/drizzle-suite/tree/master/packages/vue-plugin"},"author":{"name":"Amal Sudama","email":"amal@trufflesuite.com","url":"https://github.com/trufflesuite/drizzle-vue-plugin#readme"},"bugs":{"url":"https://github.com/trufflesuite/drizzle-vue-plugin/issues"},"readme":"# Vue Plugin\n\n**Note**: This is still a work in progres\n\n```\n$ npm install drizzle-vue-plugin\n```\n\ndrizzle-vue-plugin adapts [Drizzle](https://github.com/trufflesuite/drizzle) for Vue development.\n\n## Getting Started\n\n1. Configure drizzle by defining a module. The following example lets drizzle\n   know the `web3` connection options, the contracts and `contract events` to\n   monitor. It also specifies polling for account change every 15 seconds. This\n   is useful to not be overwhelmed with polling messages while focusing on UI\n   development.\n\n   ```js\n   // drizzleOptions.js\n\n   import SimpleStorage from './contracts/SimpleStorage.json'\n   import ComplexStorage from './contracts/ComplexStorage.json'\n   import TutorialToken from './contracts/TutorialToken.json'\n\n   const options = {\n     web3: {\n       block: false,\n       fallback: {\n         type: 'ws',\n         url: 'ws://127.0.0.1:9545'\n       }\n     },\n\n     // The contracts to monitor\n     contracts: [SimpleStorage, ComplexStorage, TutorialToken],\n     events: {\n       // monitor SimpleStorage.StorageSet events\n       SimpleStorage: ['StorageSet']\n     },\n     polls: {\n       // check accounts ever 15 seconds\n       accounts: 15000\n     }\n   }\n\n   export default options\n   ```\n\n1. Register the `drizzleVuePlugin` with your Vuex Store and continue as normal\n   with Vuex Store registration to main/root Vue instance.\n\n   ```js\n   // main.js\n\n   import Vue from 'vue'\n   import App from './App.vue'\n   import Vuex from 'vuex'\n\n   import drizzleVuePlugin from 'TODO: TBD name of package'\n   import drizzleOptions from './drizzleOptions'\n\n   // Register Vuex\n   Vue.use(Vuex)\n\n   // Create and configure your Vuex Store\n   const store = new Vuex.Store({ state: {} })\n\n   // Register the drizzleVuePlugin\n   Vue.use(drizzleVuePlugin, { store, drizzleOptions })\n\n   // Register the store instance with the Root Vue instance\n   new Vue({\n    store,\n    render: h => h(App)\n   ).$mount('#app')\n   ```\n\n1. The Vuex store will have access to 3 sub-branches of State that can be\n   accessed with Vuex's mapGetters helper.\n\n   - `account` - getAccount() - returns the current active web3 accounts.\n\n   - `contracts` - getContractData({contract, method, toUtf8, toAscii}) -\n     retrieve the smart contract state specified by `contract.method` and\n     convert toUtf, or toAscii if specified.\n\n   - `drizzle` - has 2 useful methods.\n     1. isDrizzleInitialized() - true when drizzle is ready.\n     1. drizzleInstance() - access the drizzleInstance, which may be necessary\n        for interracting with drizzle directly, or even to access the web3\n        provider.\n\n1. You can now access 3 base components that you can use to build more\n   sophisticated interfaces.\n\n   - `drizzle-account` - render the current account and associated balance.\n   - `drizzle-contract` - render a specific contract method.\n   - `drizzle-contract-form` render an input for a specific contract method\n\n1. For more information take a look at the [Test Vue\n   Dapp](./test-app/README.md)\n\n## Events\n\nThe plugin adds an event bus to the root Vue instance of your application, which allows you to handle events emitted by your smart contracts. Use them in the `mounted()` hook of any component:\n\n```js\nthis.$drizzleEvents.$on('drizzle/contractEvent', payload => {\n  // const { contractName, eventName, data } = payload\n  // Do something with payload data\n})\n```\n\n## Component Props\n\n```js\n// <drizzle-account />\n\nprops: {\n  units: {\n    type: String,\n    default: 'Wei'\n  },\n  precision: {\n    type: Number,\n    default: 2\n  }\n}\n\n\n// <drizzle-contract />\n\nprops: {\n  contractName: {\n    type: String,\n    required: true\n  },\n  method: {\n    type: String,\n    required: true\n  },\n  label: {\n    type: String,\n    default: ''\n  },\n  toUtf8: {\n    type: Boolean,\n    default: false\n  },\n  toAscii: {\n    type: Boolean,\n    default: false\n  },\n  methodArgs: {\n    type: Array,\n    default: () => []\n  }\n}\n\n\n// <drizzle-contract-form />\n\nprops: {\n  contractName: {\n    type: String,\n    required: true\n  },\n  method: {\n    type: String,\n    required: true\n  },\n  methodArgs: {\n    type: Array,\n    default: () => []\n  },\n\n  placeholders: {\n    type: Array,\n    default: () => []\n  }\n}\n```\n","readmeFilename":"README.md"}