Skip to content

Installation and configuration

adamant-al edited this page Nov 23, 2018 · 27 revisions

Installation of Adamant-console

Using npm directly

Command below will install adamant-console globally:

npm install -g adamant-console

After you could use it as in command line as adm:

adm 

(Will enter console utility and wait for your commands. Press Ctrl+C twice to exit Adamant-console.)

adm account new

(Will create new ADAMANT account and return to bash.)

Build Amanat-console from source

If you want to build it from source, clone the repository and install dependencies.

git clone https://github.com/Adamant-im/adamant-console/ #fetching code from github
npm install #installing dependencies
chmod a+x index.js #making executable
link index.js /usr/local/bin/adm #create symlink

Then you can use Adamant-console as adm, alternatively you can run it without making executable:

node index.js

Configuration of Adamant-console

Config is in JSON format.

System searches for custom config file in these locations (order priority): '~/.adm/config.json', './config.json'.

If no config is found, config.default.json is taken.

Data in custom config is merged with config.default.json, so you don't need to define already defined values, if you don't want to override them.

Config file name (config.json) can be overwritten using ADM_CONFIG_FILENAME environment variable.

Default config file name location (~/.adm) can be overwritten using ADM_CONFIG_PATH environment variable.

Current ADAMANT account (wallet) to interact with is the one with 'passPhrase' parameter in config.

Note, that '--passPhrase' command parameter has more priority, than 'passPhrase' parameter in config.

Clone this wiki locally