Blurt.js
Blurt.js the Official JavaScript API for Blurt blockchain
Documentation
Here is full documentation: https://github.com/ericet/blurtjs/-/tree/master/doc
Browser
<script src="./blurt.min.js"></script>
<script>
blurt.api.getAccounts(['baabeetaa', 'jacobgadikian'], function(err, response){
console.log(err, response);
});
</script>
CDN
https://cdn.jsdelivr.net/npm/@ericet/blurtjs/dist/blurt.min.js
<script src="https://cdn.jsdelivr.net/npm/@ericet/blurtjs/dist/blurt.min.js"></script>
Webpack
Please have a look at the webpack usage example.
Server
Install
$ npm install @ericet/blurtjs --save
RPC Servers
https://rpc.blurt.world By Default
Examples
Broadcast Vote
var blurt = require('@ericet/blurt-js');
var wif = blurt.auth.toWif(username, password, 'posting');
blurt.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
console.log(err, result);
});
Get Accounts
blurt.api.getAccounts(['megadrive', 'jacobgadikian'], function(err, result) {
console.log(err, result);
});
Get State
blurt.api.getState('/trends/funny', function(err, result) {
console.log(err, result);
});
Reputation Formatter
var reputation = blurt.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.
Issues
When you find issues, please report them!
License
MIT