# adamant-console

> Command-line and JSON-RPC tool for interacting with the ADAMANT blockchain

Latest version **3.2.0** (published 2026-11-28) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install adamant-console
pnpm add adamant-console
yarn add adamant-console
bun add adamant-console
```

Provides the command `adm`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 3.2.0 |
| Published | 2026-11-28 |
| First published | 2018-03-12 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | ^22.22.2 \|\| >=24.15.0 |
| Dependencies | 9 |
| Unpacked size | 153.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 519 |
| Author | ADAMANT community developers |
| Maintainers | adamant.im, martiliones, deidev |
| Keywords | adm, adamant, adamant-console, adamant-cli, adamant-rpc, blockchain, messenger, messaging, wallet, decentralization, privacy, secure, security, encryption, crypto, cryptocurrency, dpos, cli, console, json-rpc, nodejs |

## Links

- npm: https://www.npmjs.com/package/adamant-console
- Repository: https://github.com/Adamant-im/adamant-console
- Homepage: https://console.docs.adamant.im/
- Issues: https://github.com/Adamant-im/adamant-console/issues
- npm.io page: https://npm.io/package/adamant-console

## Dependencies (9)

- [joi](https://npm.io/package/joi.md) ^18.3.2
- [chalk](https://npm.io/package/chalk.md) ^6.0.1
- [leven](https://npm.io/package/leven.md) ^4.1.0
- [jayson](https://npm.io/package/jayson.md) ^5.0.0
- [semver](https://npm.io/package/semver.md) ^7.8.6
- [commander](https://npm.io/package/commander.md) ^15.1.0
- [jsonminify](https://npm.io/package/jsonminify.md) ^0.4.2
- [adamant-api](https://npm.io/package/adamant-api.md) ^3.2.0
- [shell-quote](https://npm.io/package/shell-quote.md) ^1.12.0

## Alternatives

- [@gemini-wallet/core](https://npm.io/package/@gemini-wallet/core.md) — 515.6K weekly downloads
- [utility](https://npm.io/package/utility.md) — 416.6K weekly downloads
- [@primno/dpapi](https://npm.io/package/@primno/dpapi.md) — 7.2K weekly downloads
- [pi-readseek](https://npm.io/package/pi-readseek.md) — 3.7K weekly downloads
- [@emilia-protocol/verify](https://npm.io/package/@emilia-protocol/verify.md) — 1.1K weekly downloads

## Recent versions

- 3.2.0 (latest) — 2026-11-28
- 3.1.0 — 2026-06-29
- 3.0.0 — 2024-06-19
- 2.4.0 — 2024-06-06
- 2.2.0 — 2024-02-16
- 2.1.0 — 2022-08-16
- 2.0.0 — 2022-07-16
- 1.5.0 — 2019-11-27
- 1.4.8-release — 2019-06-14
- 1.4.7 — 2019-06-14
- 1.4.5 — 2019-03-27
- 1.4.4 — 2018-12-19
- 1.4.3 — 2018-12-19
- 1.4.2 — 2018-12-13
- 1.4.1 — 2018-12-06
- … 3 more at https://npm.io/package/adamant-console/versions

## README

# ADAMANT Console

`adamant-console` is a command-line and JSON-RPC tool for interacting with the ADAMANT blockchain. It signs ADM transactions locally and submits signed payloads to configured ADAMANT nodes.

Passphrases never need to be sent to a node. Keep passphrases, private keys, decrypted messages, and local config files out of logs and shared terminals.

Full Console documentation is published at [console.docs.adamant.im](https://console.docs.adamant.im/).

## Features

- Interactive `adm` prompt for common account, node, send, get, delegate, and vote commands
- One-shot CLI commands for scripts and operations
- JSON-RPC server for integration from other languages and services
- Local ADM account generation, signing, voting, token transfers, and encrypted messages
- Configurable mainnet/testnet node lists and RPC port
- Shared ADAMANT Node API v0.11.0 behavior through [`adamant-api`](https://github.com/Adamant-im/adamant-api-jsclient)

## Requirements

- Node.js 22.22.2+ (on 22.x) or 24.15.0+
- npm 10 or newer

## Installation

```sh
npm ci
```

For local development after dependency changes:

```sh
npm install
```

## Configuration

Create a user config from the bundled default:

```sh
node bin/adamant.js init
```

By default, the file is created as `~/.adm/config.jsonc`. Console checks that file first, then `./config.jsonc` in the current working directory, then the packaged `config.default.jsonc`. The first existing user file wins. `adm client` prints the resolved path. The JSON-RPC server uses the same resolution and prints the path at startup.

Important fields:

| Field                      | Purpose                                         |
| -------------------------- | ----------------------------------------------- |
| `passphrase`               | Default ADM account passphrase used for signing |
| `network`                  | `mainnet` or `testnet`                          |
| `networks.<network>.nodes` | ADAMANT nodes used by `adamant-api`             |
| `rpc.port`                 | JSON-RPC HTTP server port                       |

The default network is `testnet`. Update `network` to `mainnet` only when you intend to use real ADM funds.

When updating ADM node lists, use the canonical metadata in [`adamant-wallets/assets/general/adamant/info.json`](https://github.com/Adamant-im/adamant-wallets/blob/dev/assets/general/adamant/info.json).

## CLI Usage

Run the interactive prompt:

```sh
node bin/adamant.js
```

Run one-shot commands:

```sh
node bin/adamant.js client version
node bin/adamant.js node height
node bin/adamant.js node version
node bin/adamant.js node status
node bin/adamant.js account new
node bin/adamant.js get address U123456789
node bin/adamant.js get transaction 123456789
node bin/adamant.js get transaction 123456789 returnUnconfirmed=1
node bin/adamant.js get delegate U11651572364276578835
node bin/adamant.js get chats U123456789 includeDirectTransfers=1
node bin/adamant.js get chat U123456789 U987654321 returnUnconfirmed=1
node bin/adamant.js send tokens U123456789 110020030
node bin/adamant.js send tokens U123456789 1.1ADM
node bin/adamant.js send message U123456789 "hello"
node bin/adamant.js vote for +delegatePublicKey
```

The npm package exposes the `adm` binary:

```sh
adm node height
```

You can override the configured passphrase for a single CLI invocation:

```sh
adm --passphrase "your local passphrase" send tokens U123456789 1ADM
```

Avoid shell history exposure when using passphrase flags in shared environments.

### Startup Health Check

Interactive mode checks configured node health before the first command, so users can see node availability early:

```sh
node bin/adamant.js
```

One-shot commands skip this startup check. To disable it explicitly, set:

```sh
ADM_CHECK_HEALTH_AT_STARTUP=0 node bin/adamant.js
```

## JSON-RPC Usage

Start the JSON-RPC server:

```sh
node bin/adamant.js rpc server
```

The server listens on `config.rpc.port` and exposes methods that match the existing Console API surface, including:

- `clientVersion`
- `accountNew`
- `delegateNew`
- `getAddress`
- `getBlock`
- `getBlocks`
- `getChats`
- `getChatMessages`
- `getChatTransactions`
- `getDelegate`
- `getMessage`
- `getTransaction`
- `getTransactions`
- `getTransactionsInBlockById`
- `getTransactionsInBlockByHeight`
- `getTransactionsReceivedByAddress`
- `nodeHeight`
- `nodeStatus`
- `nodeVersion`
- `sendTokens`
- `sendMessage`
- `sendRich`
- `sendSignal`
- `voteFor`

Array-style methods accept JSON-RPC `params` as an array. Send and vote methods accept a named object. An array-wrapped object such as `[{"address":"U…","amount":"0.001ADM"}]` is rejected with `Send and vote methods expect object params, not an array`.

## JavaScript Integrations

Console is built on [`adamant-api`](https://js.docs.adamant.im/). Use `adamant-api` directly for programmatic JavaScript access, lower-level protocol features, typed DTOs, metadata, WebSocket subscriptions, and advanced transaction handling.

The Console wrappers preserve Node v0.11.0 response fields, including numeric `count`, transaction `timestampMs`, and unconfirmed transaction fields returned with `returnUnconfirmed=1`. Chat query helpers send plain `AND`-combined filter names and `includeDirectTransfers` (rejecting unsupported `or:` filters); the deprecated `withoutDirectTransfers` input is accepted only as a compatibility alias and normalized before calling `adamant-api`.

## Development

```sh
npm ci --ignore-scripts
npm run lint
npm run format:check
npm test
```

Useful scripts:

| Script                 | Purpose                                     |
| ---------------------- | ------------------------------------------- |
| `npm run lint`         | Check JavaScript with ESLint flat config    |
| `npm run lint:fix`     | Apply safe ESLint fixes                     |
| `npm run format`       | Format repository files with Prettier       |
| `npm run format:check` | Check Prettier formatting                   |
| `npm test`             | Run Node.js test discovery                  |
| `npm run docs:api`     | Generate the Console API reference          |
| `npm run docs:dev`     | Generate API docs and run VitePress locally |
| `npm run docs:build`   | Generate API docs and build the docs site   |
| `npm run docs:preview` | Preview the built docs site after a build   |

This project intentionally stays small. Prefer focused changes over framework migrations, and keep CLI command names, JSON-RPC method names, config fields, and library exports stable unless a task explicitly approves a breaking change.

## Security Notes

- Passphrases are used locally to derive keys and sign transactions
- Private keys, passphrases, and decrypted message content must not be logged or transmitted
- `config.jsonc` is user-local and must not be committed
- Node responses can fail or be stale; check `success` and error fields before trusting data
- POST retries and signing behavior are owned by `adamant-api`

## Links

- [ADAMANT website](https://adamant.im/)
- [ADAMANT Console docs](https://console.docs.adamant.im/)
- [ADAMANT documentation](https://docs.adamant.im/)
- [ADAMANT Improvement Proposals](https://aips.adamant.im/all)
- [AIPs source](https://github.com/Adamant-im/AIPs)
- [ADAMANT Node](https://github.com/Adamant-im/adamant)
- [ADAMANT API schema](https://docs.adamant.im/schema/)
- [ADAMANT OpenAPI specification source](https://github.com/Adamant-im/adamant/tree/master/openapi)
- [ADAMANT JavaScript API](https://github.com/Adamant-im/adamant-api-jsclient)
- [ADAMANT JavaScript API docs](https://js.docs.adamant.im/)
- [ADAMANT wallet metadata](https://github.com/Adamant-im/adamant-wallets)
- [ADAMANT blockchain explorer](https://explorer.adamant.im/)
- [Console issues](https://github.com/Adamant-im/adamant-console/issues)
- [Frozen historical Console wiki](https://github.com/Adamant-im/adamant-console/wiki)

## License

GPL-3.0

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