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

steem-wise-core

v4.2.0

Published

Node/web library for Wise: a vote delegation system for STEEM blockchain

Downloads

105

Readme

Steem WISE (core library)

npm License PRs Welcome Chat Wise operations count

Vote delegation system for STEEM blockchain: common library for browser & node. Wise allows you to securely grant other users your voting power under conditions specified by you.

Important links:

How does WISE work?

In short: WISE allows you to delegate your vote under strictly defined criteria.

For example, you know that @andrejcibik is a great web designer. Thanks to WISE, you can give him the opportunity to use your vote:

  • in a safe way
  • under strictly defined rules (the post must meet the rules you had set). In this case, you will allow to use your vote only for posts with the # design tag.
  • with limited voting power

How is this possible? Using WISE, you place on Steem blockchain the rules under which @andrejcibik can use your vote. In the meanwhile, you run a daemon, which iterates blockchain head waiting for a voteorder from @andrejcibik to emerge. When the daemon encounters the voteorder — it performs validation. It checks if the post and weight in the order meet the criteria set previously in the rules. If the result of the validation is positive — daemon casts a vote. If not — a custom_json with information on rejection is posted to the blockchain. / More info in manual.

Definitions

  • Delegator — a user who owns the voting power and allows the voter to use it.
  • Voter — a user who votes using the account of the delegator (with delegator's voting power)
  • Daemon — a service that is running on delegator's server, that receives vote orders sent by the voter and decides weather to vote as the voter asked, or to reject the voteorder.
  • Wise platform (planned) — an alternative to the daemon, which allows a user to be a delegator without setting up the daemon (instead the daemon is operated by us). Wise platform is under development now.
  • Ruleset — named set of rules under which specified voter can vote with the delegator's account. Ruleset has a name, has a voter defined and has zero or more rules specified.
  • Voteorder — a request from the voter to the delegator to vote for a given post. Contains name of the ruleset, author and permlink of the post.

The WISE protocol

Wise puts all of its data on Steem blockchain. There is no other way of exchanging messages. It uses a carefoully designed protocol, which has versioning enabled, and is already oriented for future development. (Here you can find both typescript definitions and a JSON schema of the protocol.)

Wise publishes the messages to the blockchain as custom_json operations. There are three types of messages that wise puts on the blockchain:

  • set_rules — allows a delegator to specify one or more sets of rules under which a voter can use voting power of the delegator.
  • send_voteorder — the voter asks the delegator's daemon to vote for a given post under specified set of rules (a ruleset)
  • confirm_vote — contains confirmation that the delegator voted for the post, or a rejection with a message why the voteorder was rejected (which rule was not fulfilled and why).

Structure of the Wise project

Wise has several tools and is divided in the following way:

See all our repositories.

How to use the library in your project

Add this library to your npm project:

$ npm install --save steem-wise-core

Send voteorder:

let wise = require('steem-wise-core');

let voter = "jblew";
let postingWif = "...";
let voterWise = new wise.Wise(voter, new wise.DirectBlockchainApi(postingWif));

let delegator = "noisy";
let voteorder = {
    rulesetName: "co robia lekarze w kuchni? Leczo!",
    author: "article-author",
    permlink: "article-permlink",
    weight: 10000
};
voterWise.sendVoteorderAsync(delegator, voteorder)
.then(moment => console.log("Voteorder sent in block " + moment.blockNum))
.catch(error => console.error(error));

Where to get help?

You can also ask questions as issues in appropriate repository: See issues for this repository.

Contribute to steem Wise

We welcome warmly:

Before contributing please read Wise CONTRIBUTING guide.

Thank you for developing WISE together!

Like the project? Let @wise-team become your favourite witness!

If you use & appreciate our software — you can easily support us. Just vote for "wise-team" to become you one of your witnesses. You can do it here: https://steemit.com/~witnesses.