@ericet/blurtjs

0.1.8 • Public • Published

GitHub license

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

Package Sidebar

Install

npm i @ericet/blurtjs

Weekly Downloads

0

Version

0.1.8

License

MIT

Unpacked Size

18.7 MB

Total Files

78

Last publish

Collaborators

  • ericet