README
Golos.js
Golos.js the JavaScript API for Golos blockchain
THIS LIBRARY IS DEPRECATED
Maximum supported Golos version is 0.25.4. Newer versions can break some operations and API methods.
Please use golos-lib-js (source code) instead.
Install
$ npm install golos-classic-js --save
Here is full documentation: https://github.com/golos-blockchain/golos-js/tree/master/doc
Browser
Online library minify js available in jsDelivr CND and Unpkg CDN.
<script src="./golos.min.js"></script>
<script>
golos.api.getAccounts(['ned', 'dan'], function(err, response){
console.log(err, response);
});
</script>
WebSockets and HTTP transport
Library support 2 transport types: ws, wss for websocket and http, https for pure HTTP JSONRPC.
wss://api-golos.blckchnd.com/ws
wss://api.aleksw.space/ws
wss://golos.lexai.host/ws
https://api-golos.blckchnd.com/
https://api.aleksw.space/
https://golos.lexai.host/
golos.config.set('websocket','wss://golos.lexai.host/ws');
or
golos.config.set('websocket','https://golos.lexai.host/');
Examples
Broadcast Vote
var golos = require('golos');
var wif = golos.auth.toWif(username, password, 'posting');
golos.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) {
console.log(err, result);
});
Get Accounts
golos.api.getAccounts(['ned', 'dan'], function(err, result) {
console.log(err, result);
});
Other examples in the documentation.
Issues
When you find issues, please report them!
License
MIT