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.
Features
- Interactive
admprompt 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
Requirements
- Node.js 22.22.2+ (on 22.x) or 24.15.0+
- npm 10 or newer
Installation
npm ci
For local development after dependency changes:
npm install
Configuration
Create a user config from the bundled default:
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.
CLI Usage
Run the interactive prompt:
node bin/adamant.js
Run one-shot commands:
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:
adm node height
You can override the configured passphrase for a single CLI invocation:
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:
node bin/adamant.js
One-shot commands skip this startup check. To disable it explicitly, set:
ADM_CHECK_HEALTH_AT_STARTUP=0 node bin/adamant.js
JSON-RPC Usage
Start the JSON-RPC server:
node bin/adamant.js rpc server
The server listens on config.rpc.port and exposes methods that match the existing Console API surface, including:
clientVersionaccountNewdelegateNewgetAddressgetBlockgetBlocksgetChatsgetChatMessagesgetChatTransactionsgetDelegategetMessagegetTransactiongetTransactionsgetTransactionsInBlockByIdgetTransactionsInBlockByHeightgetTransactionsReceivedByAddressnodeHeightnodeStatusnodeVersionsendTokenssendMessagesendRichsendSignalvoteFor
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. 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
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.jsoncis user-local and must not be committed- Node responses can fail or be stale; check
successand error fields before trusting data - POST retries and signing behavior are owned by
adamant-api
Links
- ADAMANT website
- ADAMANT Console docs
- ADAMANT documentation
- ADAMANT Improvement Proposals
- AIPs source
- ADAMANT Node
- ADAMANT API schema
- ADAMANT OpenAPI specification source
- ADAMANT JavaScript API
- ADAMANT JavaScript API docs
- ADAMANT wallet metadata
- ADAMANT blockchain explorer
- Console issues
- Frozen historical Console wiki
License
GPL-3.0