@whaleshares/wlsjs

0.1.8 • Public • Published

WLSJS

WLSJS the JavaScript API for WhaleShares blockchain

pipeline status coverage report npm version npm downloads

Documentation

Here is full documentation: https://gitlab.com/beyondbitcoin/wlsjs/tree/legacy/doc

Browser

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

Server

Install

$ npm install @whaleshares/wlsjs --save

WebSockets

wss://whaleshares.io/ws By Default
wss://beta.whaleshares.net/wss

Examples

Broadcast Vote

var wlsjs = require('@whaleshares/wlsjs');

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

Get Accounts

wlsjs.api.getAccounts(['officialfuzzy', 'powerpics'], function(err, result) {
	console.log(err, result);
});

Get State

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

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 @whaleshares/wlsjs

Weekly Downloads

12

Version

0.1.8

License

MIT

Unpacked Size

14.3 MB

Total Files

79

Last publish

Collaborators

  • baabeetaa
  • kennybll