taraxa-cli
v1.5.55
Published
Taraxa command-line utility
Downloads
13
Readme
Taraxa CLI
Install
Install from NPM
npm install -g taraxa-cli
Usage
taraxa --help
taraxa config --help
taraxa rpc --help
Generate a Config File
Public Testnet
To join the public Testnet: Generate a config for a new testnet node
$ taraxa config -n testnet
Created node config for:
network: testnet
chain id: 55555
address: 0x942FBF4f9D0CbE737e4f83C597D991ffA38fe42c
id: 04a58a7add71a5c973e36fa754f5ddd00f3b15404677f3d20ac4fa02f808857c0d497e20ea95ffd5e3a516fac90693f4f3016291d353f7cf863457bcb834769c75
Wrote config to: /home/user1/.taraxa-node/conf/testnet.json
Note: This file contains private keys. Secure it properly.
Private Testnet
Alternatively, generate a config for a new private network boot node
$ taraxa config
Created node config for:
network: private
chain id: 4444
address: 0x942FBF4f9D0CbE737e4f83C597D991ffA38fe42c
id: 04a58a7add71a5c973e36fa754f5ddd00f3b15404677f3d20ac4fa02f808857c0d497e20ea95ffd5e3a516fac90693f4f3016291d353f7cf863457bcb834769c75
Wrote config to: /home/user1/.taraxa-node/conf/private.json
Note: This file contains private keys. Secure it properly.
Generate a config to join an existing private network by specifying one or more boot nodes by repeating the -b
option
taraxa config -n private -c 4444 -b 127.0.0.1:10002/04a58a7add71a5c973e36fa754f5ddd00f3b15404677f3d20ac4fa02f808857c0d497e20ea95ffd5e3a516fac90693f4f3016291d353f7cf863457bcb834769c75
Run an RPC Command
Using taraxa-js to make RPC calls
$ taraxa rpc getBlockByNumber 0
Create an account
Create an account with private key, address, mnemonic.
Useful for setting up faucets, etc.
$ taraxa account
address: 0xad8e3b38552d2afaf3c92bcc5ed703ac8eca23fc
public key: 0x047cf9de972914851dd24493e75c1251e3807fbfc72298030824cf027ea9e73e285e7342ac10f705ebd500fcfe45db0260e64b737c532970e4b689f9ed1d34aeff
private key: 0x2be664bae0e365a0fd362798870f79c52d565ed7a512f5c57575b12e65d7ab02
mnemonic: cloud myth drink saddle avoid blind provide twist answer online erupt note