npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

factom-vote-cli

v0.2.0

Published

CLI to Factom on-chain voting protocol

Downloads

3

Readme

Factom vote CLI

Help

$ factom-vote-cli --help

Display template

Command to display a JSON examples. Supported types:

  • vote-def: a full vote definition
  • voters: list of eligible voters
# factom-vote-cli template <type>
$ factom-vote-cli template vote-def

Save it in a file to later edit it and feed the file to another command:

$ factom-vote-cli template voters > voters.json

Create vote

# factom-vote-cli create --id <id_chain:id_key> --ec <ec_address> <vote_def_json> [voters_json]
$ factom-vote-cli create --id 3a6c770d8b152dcc80fa0a54fa931c6208e96f14f76dd616e51502a58836e9f8:idpub3Doj5fqXye8PkX8w83hzPh3PXbiLhrxTZjT6sXmtFQdDyzwymz --ec EC2vXWYkAPduo3oo2tPuzA44Tm7W6Cj7SeBr3fBnzswbG5rrkSTD vote-def.json voters.json

Append eligible voters

# factom-vote-cli add-voters --id <id_chain:id_key> --ec <ec_address> -c <voters_chain_id> <voters_json>
$ factom-vote-cli add-voters --id 3a6c770d8b152dcc80fa0a54fa931c6208e96f14f76dd616e51502a58836e9f8:idpub3Doj5fqXye8PkX8w83hzPh3PXbiLhrxTZjT6sXmtFQdDyzwymz --ec EC2vXWYkAPduo3oo2tPuzA44Tm7W6Cj7SeBr3fBnzswbG5rrkSTD c973b2db5a4959c64606f7df7903918737f226a0ffaf93911f192582878b29eb voters.json

Commit vote

# factom-vote-cli commit --id <id_chain:id_key> --ec <ec_address> -c <vote_chain_id> <options_json>
$ factom-vote-cli commit --id 3a6c770d8b152dcc80fa0a54fa931c6208e96f14f76dd616e51502a58836e9f8:idpub3Doj5fqXye8PkX8w83hzPh3PXbiLhrxTZjT6sXmtFQdDyzwymz --ec EC2vXWYkAPduo3oo2tPuzA44Tm7W6Cj7SeBr3fBnzswbG5rrkSTD c973b2db5a4959c64606f7df7903918737f226a0ffaf93911f192582878b29eb options.json

This command will generate a file with the format <identity_chain_id>@<vote_chain_id>.reveal.json to be used in the reval command.

Reveal vote

Use the *.reveal.json file generated by the commit command to reveal your vote.

# factom-vote-cli reveal --ec <ec_address> <reveal_json>
$ factom-vote-cli reveal --ec EC2vXWYkAPduo3oo2tPuzA44Tm7W6Cj7SeBr3fBnzswbG5rrkSTD 3a6c770d8b152dcc80fa0a54fa931c6208e96f14f76dd616e51502a58836e9f8@c973b2db5a4959c64606f7df7903918737f226a0ffaf93911f192582878b29eb.reveal.json

Get vote details and results

# factom-vote-cli get <vote_chain_id>
$ factom-vote-cli get c973b2db5a4959c64606f7df7903918737f226a0ffaf93911f192582878b29eb