This package has been deprecated

Author message:

Use golos-lib-js (https://github.com/golos-blockchain/libs) instead

golos-classic-js

0.8.10 • Public • Published

Golos.js

Golos.js the JavaScript API for Golos blockchain

npm version

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

Dependents (0)

Package Sidebar

Install

npm i golos-classic-js

Weekly Downloads

3

Version

0.8.10

License

MIT

Unpacked Size

4.73 MB

Total Files

81

Last publish

Collaborators

  • goloschain
  • 1aerostorm