@scoopmedia/scoop-js

0.1.1 • Public • Published

GitHub license Scoop.js channel on scoopit.chat

Scoop.js

Scoop.js the JavaScript API for Scoop blockchain

Documentation

Here is full documentation: https://github.com/scoopmediaa/scoop-js/tree/master/doc

Browser

<script src="./scoop.min.js"></script>
<script>
scoop.api.getAccounts(['ned', 'dan'], function(err, response){
    console.log(err, response);
});
</script>

CDN

https://cdn.scoopjs.com/lib/latest/scoop.min.js

<script src="//cdn.scoopjs.com/lib/latest/scoop.min.js"></script>

Webpack

Please have a look at the webpack usage example.

Server

Install

$ npm install scoop --save

RPC Servers

https://api.scoopit.app By Default
https://node.scoop.ws
https://this.piston.rocks

Examples

Broadcast Vote

var scoop = require('scoop');

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

Get Accounts

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

Get State

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

Reputation Formatter

var reputation = scoop.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 or on Scoopit Chat channel #scoopjs https://scoopit.chat/channel/scoopjs.

Issues

When you find issues, please report them!

License

MIT

Package Sidebar

Install

npm i @scoopmedia/scoop-js

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

17.3 MB

Total Files

94

Last publish

Collaborators

  • thnass