Bears.js the JavaScript API for Bears blockchain
Here is full documentation: https://github.com/bearshares/bears-js/tree/master/doc
git clone https://github.com/bearshares/bears-js.git
cd bears-js
npm install
<script src="./bears.min.js"></script>
<script>
bears.api.getAccounts(['bilalhaider'], function(err, response){
console.log(err, response);
});
</script>
Please have a look at the webpack usage example.
$ npm install @baaluo/bears-js --save
https://api.bearshares.com By Default
var bears = require('@baaluo/bears-js');
var wif = bears.auth.toWif(username, password, 'posting');
bears.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
console.log(err, result);
});
bears.api.getAccounts(['bilalhaider'], function(err, result) {
console.log(err, result);
});
bears.api.getState('/trends/funny', function(err, result) {
console.log(err, result);
});
var reputation = bears.formatter.reputation(user.reputation);
console.log(reputation);
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 Bearshares Chat channel #bearsjs https://bearshares.chat/channel/bearsjs.
When you find issues, please report them!
MIT