# tendermint-node

> Run a Tendermint full node

Latest version **5.1.5** (published 2020-06-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install tendermint-node
pnpm add tendermint-node
yarn add tendermint-node
bun add tendermint-node
```

## 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 | 5.1.5 |
| Published | 2020-06-01 |
| First published | 2017-01-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 9 |
| Unpacked size | 11.9 KB |
| Known vulnerabilities | 0 (+25 in 1 direct dependencies) |
| Install scripts | yes |
| Author | Matt Bell |
| Maintainers | mappum |
| Keywords | tendermint, blockchain, cosmos |

## Links

- npm: https://www.npmjs.com/package/tendermint-node
- npm.io page: https://npm.io/package/tendermint-node

## Dependencies (9)

- [axios](https://npm.io/package/axios.md) ^0.19.0
- [debug](https://npm.io/package/debug.md) ^3.1.0
- [execa](https://npm.io/package/execa.md) ^0.10.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [progress](https://npm.io/package/progress.md) ^2.0.0
- [unzipper](https://npm.io/package/unzipper.md) ^0.10.10
- [decamelize](https://npm.io/package/decamelize.md) ^2.0.0
- [tendermint](https://npm.io/package/tendermint.md) ^4.0.7
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^6.0.5

## Recent versions

- 5.1.5 (latest) — 2020-06-01
- 5.2.0 — 2020-03-23
- 5.1.4 — 2019-06-24
- 5.1.3 — 2019-06-24
- 5.1.2 — 2019-05-08
- 5.1.1 — 2019-04-26
- 5.1.0 — 2019-04-01
- 5.0.2 — 2019-02-20
- 5.0.1 — 2019-02-20
- 5.0.0 — 2019-02-20
- 4.0.0 — 2019-01-18
- 3.5.0 — 2018-12-21
- 3.4.3 — 2018-10-08
- 3.4.2 — 2018-10-08
- 3.4.1 — 2018-10-03
- … 21 more at https://npm.io/package/tendermint-node/versions

## README

# tendermint-node

Run a [Tendermint](https://tendermint.com) full node.

On install, this package downloads a prebuilt Tendermint binary from the [official Tendermint releases](https://github.com/tendermint/tendermint/releases), and checks it against a known SHA256 hash.

## Usage
`npm install tendermint-node`

```js
let tendermint = require('tendermint-node')

// init a directory for running tendermint
tendermint.initSync({ home: './tendermint' })

// start the full node
let node = tendermint.node({
  home: './tendermint',
  rpc: {
    laddr: 'tcp://0.0.0.0:8888'
  }
  // these options are equivalent to CLI flags
})
node.stdout.pipe(process.stdout)
```

### `tendermint.init(path)`

Initializes a data directory to be used by a full node.  `path` should be the path to the directory to be initialized.

Returns a `Promise`.

### `tendermint.initSync(path)`

The synchronous version of `tendermint.init()`.

### `tendermint.node(path, opts)`

Spawns a Tendermint full node.

Returns a `ChildProcess` object representing the Tendermint process. It has an `rpc` property which is a client for the node's RPC server ([RpcClient](https://github.com/mappum/js-tendermint)).
`path` should be a path to the directory (initialized by `init` or `initSync`).

`opts` may be an object containing options passed to Tendermint as CLI arguments (you may use any flag supported by Tendermint). To see all supported options, run `npm i -g tendermint-node && tendermint node --help`.

### `tendermint.lite(target, path, opts)`

Spawns a Tendermint light node (talks to a full node and verifies its RPC data).

Returns a `ChildProcess` object representing the Tendermint process. It has an `rpc` property which is a client for the node's RPC server ([RpcClient](https://github.com/mappum/js-tendermint)).

`target` should be the URL of a full node's RPC server (e.g. `http://somefullnode.com:46657`).

`path` should be a path to a directory where light client data will be stored.

`opts` may be an object containing options passed to tendermint as CLI arguments (you may use any flag supported by tendermint). To see all supported options, run `npm i -g tendermint-node && tendermint lite --help`.

### `tendermint.version()`

Returns the tendermint binary's version string.

### `tendermint.genValidator()`

Generates a validator private key, returned as stringified JSON.

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