# chaingreen-api

> chaingreen-Api ======

Latest version **1.4.0** (published 2021-07-10) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install chaingreen-api
pnpm add chaingreen-api
yarn add chaingreen-api
bun add chaingreen-api
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2021-07-10 |
| First published | 2021-07-10 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.0.0 |
| Dependencies | 2 |
| Unpacked size | 55 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | thauch |
| Maintainers | travishauch |
| Keywords | chaingreen, blockchain, chiadashboard, chaingreendashboard |

## Links

- npm: https://www.npmjs.com/package/chaingreen-api
- Repository: https://github.com/thauch/chaingreen-api
- Homepage: https://github.com/thauch/chaingreen-api#readme
- Issues: https://github.com/thauch/chaingreen-api/issues
- npm.io page: https://npm.io/package/chaingreen-api

## Dependencies (2)

- [ws](https://npm.io/package/ws.md) ^7.4.6
- [json-bigint](https://npm.io/package/json-bigint.md) ^1.0.0

## Recent versions

- 1.4.0 (latest) — 2021-07-10

## README

chaingreen-Api
======

## Usage example

```js
const { readFileSync } = require('fs');
const { Connection, constants, ApiClient } = require('chaingreen-api');

(async () => {
  const conn = new Connection('localhost:55400', {
    cert: readFileSync('private_daemon.crt'),
    key: readFileSync('private_daemon.key'),
  });
  conn.onMessage((message) => {
    console.log(message);
  });
  conn.addService(constants.SERVICE.walletUi);
  const fullNode = new ApiClient.FullNode({ connection: conn, origin: 'my-cool-service' });
  await fullNode.init();
  const blockchainState = await fullNode.getBlockchainState();
})();
```

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