This package exposes the necessary apis to interact with Vocdoni Ethereum contracts.
npm install vocdoni-eth-lib --save
const vocdoni = require ('vocdoni-ethereum-lib')
The JS api is what probably you want to deal with. There are five objects exposed.
vocdoni.identity
vocdoni.voting
vocdoni.utils
vocdoni.wallet
vocdoni.bulk
The easiest way to get a good understanding is to look at the tests.
If you need access to the contracts abi
or bytecode
vocdoni.identityContract.abi
vocdoni.identityContract.bytecode
vocdoni.votingContract.abi
vocdoni.votingContract.bytecode
For the JavaScript API we're using ES2015 syntax and compile using Babel.
Source code is under /src
and compiled code is under /lib
You will find the solidity contracts under /contracts
.
Compiled contracts go under /build
Install:
git clone https://github.com/vocdoni/ethereum-lib.git
npm install
Compile contracts:
npm run compile-contracts
Compile module:
npm run compile-module
Compile all:
npm run comple
Test:
npm run test
npm run test-bulk