# @dashevo/dapi-client

> Client library used to access Dash DAPI endpoints

Latest version **5.0.3** (published 2026-11-03) · MIT license · 925 weekly downloads

## Install

```sh
npm install @dashevo/dapi-client
pnpm add @dashevo/dapi-client
yarn add @dashevo/dapi-client
bun add @dashevo/dapi-client
```

## Health

**Score 45/100 (D)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

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

Negative: declining downloads.

## Facts

| | |
|---|---|
| Version | 5.0.3 |
| Published | 2026-11-03 |
| First published | 2019-03-25 |
| Weekly downloads | 925 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=18.18 |
| Dependencies | 9 |
| Unpacked size | 265.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | shumkov, alex-werner, nmarley, cofresi, evodeploy, jawid-h |

## Links

- npm: https://www.npmjs.com/package/@dashevo/dapi-client
- npm.io page: https://npm.io/package/@dashevo/dapi-client

## Dependencies (9)

- [cbor](https://npm.io/package/cbor.md) ^8.0.0
- [undici](https://npm.io/package/undici.md) ^6.28.1
- [wasm-x11-hash](https://npm.io/package/wasm-x11-hash.md) ~0.0.2
- [google-protobuf](https://npm.io/package/google-protobuf.md) ^3.12.2
- [@dashevo/dash-spv](https://npm.io/package/@dashevo/dash-spv.md) 6.0.3
- [@dashevo/wasm-dpp](https://npm.io/package/@dashevo/wasm-dpp.md) 5.0.3
- [@dashevo/dapi-grpc](https://npm.io/package/@dashevo/dapi-grpc.md) 5.0.3
- [@dashevo/grpc-common](https://npm.io/package/@dashevo/grpc-common.md) 5.0.3
- [@dashevo/dashcore-lib](https://npm.io/package/@dashevo/dashcore-lib.md) ~0.26.1

## Recent versions

- 5.0.3 (latest) — 2026-11-03
- 5.1.0-dev.1 (5.1-dev) — 2026-11-13
- 5.0.0-rc.8 (5.0-rc) — 2026-10-23
- 5.0.0-beta.6 (5.0-beta) — 2026-10-13
- 4.2.0-beta.7 (4.2-beta) — 2026-09-29
- 4.2.0-dev.11 (4.2-dev) — 2026-09-15
- 4.1.0-rc.3 (4.1-rc) — 2026-07-27
- 4.1.0-beta.2 (4.1-beta) — 2026-07-23
- 4.0.0-rc.2 (4.0-rc) — 2026-06-12
- 4.0.0-beta.4 (4.0-beta) — 2026-06-09
- 3.1.0-dev.8 (3.1-dev) — 2026-05-28
- 3.0.1-hotfix.4 (3.0-hotfix) — 2026-02-05
- 3.0.0-rc.3 (3.0-rc) — 2026-01-20
- 3.0.0-dev.11 (3.0-dev) — 2026-01-08
- 2.2.0-dev.2 (2.2-dev) — 2025-11-28
- … 504 more at https://npm.io/package/@dashevo/dapi-client/versions

## README

# DAPI Client

[![NPM Version](https://img.shields.io/npm/v/@dashevo/dapi-client)](https://www.npmjs.com/package/@dashevo/dapi-client)
[![Build Status](https://github.com/dashpay/platform/actions/workflows/release.yml/badge.svg)](https://github.com/dashpay/platform/actions/workflows/release.yml)
[![Release Date](https://img.shields.io/github/release-date/dashpay/platform)](https://github.com/dashpay/platform/releases/latest)
[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen)](https://github.com/RichardLitt/standard-readme)

Client library used to access Dash DAPI endpoints

This library enables HTTP-based interaction with the Dash blockchain and Dash
Platform via the decentralized API ([DAPI](https://github.com/dashevo/dapi))
hosted on Dash masternodes.

 - `DAPI-Client` provides automatic server (masternode) discovery using either a default seed node or a user-supplied one
 - `DAPI-Client` maps to DAPI's [RPC](https://github.com/dashpay/platform/tree/master/packages/dapi/lib/rpcServer/commands) and [gRPC](https://github.com/dashpay/platform/tree/master/packages/dapi/lib/grpcServer/handlers) endpoints

## Table of Contents
- [Install](#install)
- [Usage](#usage)
- [Documentation](#documentation)
- [Contributing](#contributing)
- [License](#license)

## Install

```sh
npm install @dashevo/dapi-client
```

## Usage

### Basic

```javascript
const DAPIClient = require('@dashevo/dapi-client');
const client = new DAPIClient();

client.core.getStatus().then((coreStatus) => {
  console.dir(coreStatus);
});
```

### Custom seed node

Custom seed nodes are necessary for connecting the client to devnets since the client library is unaware of them otherwise.

```javascript
const DAPIClient = require('@dashevo/dapi-client');

var client = new DAPIClient({
  seeds: [{
     host: 'seed-1.evonet.networks.dash.org',
     port: 443,
  }],
});

client.core.getBestBlockHash().then((r) => {
  console.log(r);
});
```

**Note**: The seed node shown above (`seed-1.evonet.networks.dash.org`) is for the Dash Evonet testing network.

### Custom addresses

Custom addresses may be directly specified in cases where it is beneficial to know exactly what node(s) are being accessed (e.g. debugging, local development, etc.).

```javascript
const DAPIClient = require('@dashevo/dapi-client');

var client = new DAPIClient({
  dapiAddresses: [
    '127.0.0.1:443',
    '127.0.0.2:443',
  ],
});

client.core.getBestBlockHash().then((r) => {
  console.log(r);
});
```

### Command specific options

DAPI Client options can be passed directly to any command to override any predefined client options and modify the client's behavior for that specific call.

```javascript
const DAPIClient = require('@dashevo/dapi-client');

// Set options to direct the request to a specific address and disable retries
const options = {
  dapiAddresses: ['127.0.0.1'],
  retries: 0,
};

client.core.getBestBlockHash(options).then((r) => {
  console.log(r);
});
```

## Documentation

More extensive documentation available at https://dashpay.github.io/platform/DAPI-Client/.


## Contributing

Feel free to dive in! [Open an issue](https://github.com/dashpay/platform/issues/new/choose) or submit PRs.

## License

[MIT](LICENSE) &copy; Dash Core Group, Inc.

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