@leafter/leaf-js

0.7.1 • Public • Published

Leaf-JS

Leaf-JS is the JavaScript API for the Leaf blockchain

Documentation

Here is full documentation: https://github.com/LeafterMedia/leaf-js/tree/master/doc

Install

$ npm install leaf-js --save

Examples

Broadcast Vote

var leaf = require('leaf');

var wif = leaf.auth.toWif(username, password, 'posting');
leaf.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
	console.log(err, result);
});

Get Accounts

leaf.api.getAccounts(['ned', 'dan'], function(err, result) {
	console.log(err, result);
});

Get State

leaf.api.getState('/trends/funny', function(err, result) {
	console.log(err, result);
});

Reputation Formatter

var reputation = leaf.formatter.reputation(user.reputation);
console.log(reputation);

Contributions

Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list.

Issues

When you find issues, please report them!

License

MIT

Package Sidebar

Install

npm i @leafter/leaf-js

Weekly Downloads

0

Version

0.7.1

License

MIT

Unpacked Size

384 kB

Total Files

72

Last publish

Collaborators

  • kingswisdom