@whaleshares/wlsjs
v0.1.8
Published
wlsjs the JavaScript API for WhaleShares blockchain
Downloads
19
Readme
WLSJS
WLSJS the JavaScript API for WhaleShares blockchain
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