# golos-classic-js

> Golos-js the JavaScript library with API for GOLOS blockchain

Latest version **0.8.10** (published 2021-09-02) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install golos-classic-js
pnpm add golos-classic-js
yarn add golos-classic-js
bun add golos-classic-js
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.8.10 |
| Published | 2021-09-02 |
| First published | 2019-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 16 |
| Unpacked size | 4.5 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Fabien |
| Maintainers | golosclassic, 1aerostorm |
| Keywords | golos, GolosChain, blockchain, golosjs |

## Links

- npm: https://www.npmjs.com/package/golos-classic-js
- Repository: https://github.com/golos-blockchain/golos-js
- Homepage: https://github.com/golos-blockchain/golos-js#readme
- Issues: https://github.com/golos-blockchain/golos-js/issues
- npm.io page: https://npm.io/package/golos-classic-js

## Dependencies (16)

- [ws](https://npm.io/package/ws.md) ^1.1.1
- [bigi](https://npm.io/package/bigi.md) ^1.4.2
- [bs58](https://npm.io/package/bs58.md) ^4.0.0
- [debug](https://npm.io/package/debug.md) ^2.6.8
- [buffer](https://npm.io/package/buffer.md) ^5.0.6
- [ecurve](https://npm.io/package/ecurve.md) ^1.0.5
- [lodash](https://npm.io/package/lodash.md) ^4.16.4
- [bluebird](https://npm.io/package/bluebird.md) ^3.4.6
- [cross-env](https://npm.io/package/cross-env.md) ^5.0.0
- [bytebuffer](https://npm.io/package/bytebuffer.md) ^5.0.1
- [create-hash](https://npm.io/package/create-hash.md) ^1.1.2
- [create-hmac](https://npm.io/package/create-hmac.md) ^1.1.4
- [cross-fetch](https://npm.io/package/cross-fetch.md) ^3.0.0
- [detect-node](https://npm.io/package/detect-node.md) ^2.0.3
- [secure-random](https://npm.io/package/secure-random.md) ^1.1.1
- [browserify-aes](https://npm.io/package/browserify-aes.md) ^1.0.6

## Recent versions

- 0.8.10 (latest) — 2021-09-02
- 0.8.9 — 2021-08-30
- 0.8.8 — 2021-08-22
- 0.8.7 — 2021-08-16
- 0.8.6 — 2021-08-15
- 0.8.5 — 2021-08-08
- 0.8.4 — 2021-08-04
- 0.8.3 — 2021-06-28
- 0.8.2 — 2021-05-09
- 0.7.99 — 2021-04-04
- 0.7.98 — 2021-03-28
- 0.7.94 — 2021-03-22
- 0.7.92 — 2021-03-21
- 0.7.91 — 2021-03-17
- 0.7.90 — 2021-03-17
- … 73 more at https://npm.io/package/golos-classic-js/versions

## README

# Golos.js
Golos.js the JavaScript API for Golos blockchain

[![npm version](https://badge.fury.io/js/golos-classic-js.svg)](https://badge.fury.io/js/golos-classic-js)

# 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](https://npmjs.com/package/golos-lib-js) ([source code](https://github.com/golos-blockchain/libs)) 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](https://cdn.jsdelivr.net/npm/golos-classic-js@latest/dist/golos.min.js) and [Unpkg CDN](https://unpkg.com/golos-classic-js@latest/dist/golos.min.js).

```html 
<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<br/>
wss://api.aleksw.space/ws<br/>
wss://golos.lexai.host/ws<br/>

https://api-golos.blckchnd.com/<br/>
https://api.aleksw.space/<br/>
https://golos.lexai.host/<br/>

```js
golos.config.set('websocket','wss://golos.lexai.host/ws');
```
or
```js
golos.config.set('websocket','https://golos.lexai.host/');
```

## Examples

Broadcast Vote
```js
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
```js
golos.api.getAccounts(['ned', 'dan'], function(err, result) {
	console.log(err, result);
});
```

Other examples in the [documentation](https://github.com/golos-blockchain/golos-js/tree/master/doc).

## Issues
When you find issues, please report them!

## License
MIT

---
_Source: https://npm.io/package/golos-classic-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
