https://github.com/haloplatform/vuex-web3-sync
:icecream: This syncs web3 to a vuex state via injected or instantiated web3.
https://github.com/haloplatform/vuex-web3-sync
blockchain contracts cryptocurrency dapp ethereum halo-platform redux state vuejs vuex web3
Last synced: 8 months ago
JSON representation
:icecream: This syncs web3 to a vuex state via injected or instantiated web3.
- Host: GitHub
- URL: https://github.com/haloplatform/vuex-web3-sync
- Owner: haloplatform
- Created: 2018-01-16T20:10:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-02-20T22:04:40.000Z (over 7 years ago)
- Last Synced: 2025-01-16T01:51:39.962Z (over 1 year ago)
- Topics: blockchain, contracts, cryptocurrency, dapp, ethereum, halo-platform, redux, state, vuejs, vuex, web3
- Language: JavaScript
- Homepage:
- Size: 86.9 KB
- Stars: 12
- Watchers: 14
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/@haloplatform/vuex-web3-sync)
# vuex-web3-sync
Vuex module to sync with web3
## install:
```shell
npm i @haloplatform/vuex-web3-sync --save
```
## Usage:
requires Babel-Polyfill if you don't have it install it via: https://babeljs.io/docs/usage/polyfill
```js
import store from './vuex/store'
import web3Sync from '@haloplatform/vuex-web3-sync'
web3Sync(store, 'webThree')
// second parameter is module name, optional
```
## Exposed Getters:
* `address` - need description
* `coinbase` - `String` ETH Address Hex
* `instance` - `Function` Function that returns web3 instance
* `isInjected` - `Boolean` True if web3 is injected
* `networkId` - `String` Network ID
* `isLocal` - `Boolean` True if web3 instance is connected to local node
* `balance` - `String` Wallet balance
* `isApprovedNetwork` - `Boolean` True if network is approved
* `networkName` - `String` Network Name
* `filter` - same as `web3.eth.filter`
* `reset` - same as `web3.reset`
* `sha3` - same as `web3.sha3`
* `contract` - same as `web3.eth.contract`
* `isConnected` - same as `web3.isConnected`