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