dvote-client v0.1.1
DVote Client
Typescript client library to work with the Vocdoni core features.
Components
The library provides convenience classes and methods to access the various components of a DVote process.
Entity
Any Ethereum account can create an Entity, which may create voting processes.
Process
A voting process.
Census
A custom made service, intended to provide the tools to join a census, get a census proof, etc.
Operations like getMetadata(processId)
need the class to be initialized with instance.initBlockchain(web3.currentProvider, votingProcessContractAddress)
. (Note this may change soon)
The rest of operations rely on instance.initCensusService(censusURL)
Development
We are using tslint, please install it in your IDE. If using Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=eg2.tslint
Testing
Run a local Ethereum node like Ganache (with a funded account):
npm i -g ganache-cli
ganache-cli -m "universe link ..."
Run a census service on your local computer:
git clone https://github.com/vocdoni/go-dvote.git
cd cmd/censushttp
go run censushttp.go 1500 testcensus # accept any signature
go run censushttp.go 1500 testcensus:<PUBLIC_KEY>
Then in another tab:
npm install
npm test
Building the JS library
npm install && npm run build
Breaking changes
- Version
0.0.22
- The
snapshot()
method ofCensus
has been removed. UsegetRoot()
anddump()
instead - The
dump()
method ofCensus
now requires a second parameter with the private key to sign (this may change very soon) - Test suites are now invoked like
npm run test
,npm run test:unit
,npm run test:integration
andnpm run test:remote
- The
4 years ago
4 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago