New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

dvote-client

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dvote-client

Javascript client library to work with the Vocdoni core features

  • 0.0.22
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-28.57%
Maintainers
3
Weekly downloads
 
Created
Source

Build Status

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 of Census has been removed. Use getRoot() and dump() instead
    • The dump() method of Census 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 and npm run test:remote

FAQs

Package last updated on 20 Feb 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc