Documentation

cli-wallet

Introduction

The cli-wallet that connects to the hybrixd platform environment can be run on your own personal computer or server by downloading the command-line application. This makes it possible to control and use a wallet from the command line. It also makes it easy to use and integrate blockchain into your own shell scripts.

Download for Linux/MacOS

Getting started

cli-wallet can be run on the following operating systems:
  • GNU/Linux
  • MacOS (Darwin)

cli-wallet requires NodeJS (https://nodejs.org ). We recommend using NodeJS version 8.12 or higher.

To install the hybrix cli-wallet download the release above, and extract the zip file to your system.

You can now start cli-wallet as seen in examples below. Note that you should pass options to let cli-wallet know what to do for you. Below we also mention the quiet output option to make it easy to put cli-wallet in your own scripts.


To look at all the possible command line arguments, simply add --help.

./cli-wallet --help

USAGE: node cli-wallet.js [OPTION1] [OPTION2]... arg1 arg2... The following options are supported: -h, --hostname The hostname to use. For local specify: http://127.0.0.1:1111/ Default: https://api.hybrix.io/ -A, --API Perform an API call [argument: API_path] -u, --userid Set username -p, --passwd Set password -c, --create Generate new deterministic account -a, --address Get address of account [argument: symbol] -b, --balance Get the balance of an address [argument: symbol] -r, --rawtransaction Create a raw transaction [argument: symbol] [argument: amount] [argument: target_address] -s, --sendtransaction Send transaction [argument: symbol] [argument: amount] [argument: target_address] -P, --publickey Get public key from account [argument: symbol] -S, --secretkey Get private key from account [argument: symbol] -K, --keysobject Get internal keys object from account [argument: symbol] -q, --quiet No extra output other than raw data -FE, --forceEthNonce Force nonce transaction number for Ethereum [argument: integer]

Creating a new wallet is also very easy:

./cli-wallet --create

To get the Bitcoin balance of your wallet type:

./cli-wallet --balance btc --userid USERNAME --passwd PASSWORD

You can also get the address belonging to Ethereum in your wallet:

./cli-wallet --address eth --userid USERNAME --passwd PASSWORD

To send a Dogecoin transaction you can do the following:

./cli-wallet --sendtransaction doge 1 DAJXE83WEsiyMYiG2CVmp3kZ9MafrmkH5c --userid USERNAME --passwd PASSWORD

It is also possible to create the transaction without sending it:

./cli-wallet --rawtransaction doge 1 DAJXE83WEsiyMYiG2CVmp3kZ9MafrmkH5c --userid USERNAME --passwd PASSWORD

To export your public key you can do this:

./cli-wallet --publickey nxt --userid USERNAME --passwd PASSWORD

Exporting your private key can also be done:

./cli-wallet --secretkey trx --userid USERNAME --passwd PASSWORD

Direct API calls can be done in session like this:

./cli-wallet --userid USERNAME --passwd PASSWORD -A /engine/storage/load/someKey

If you want to include cli-wallet in a shell script, you may want to use the -q (quiet) option to make it easier to use the output of the command.

./cli-wallet --userid USERNAME --passwd PASSWORD -q -b ltc

No results.