Command-line wallet

The command-line 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

Quick start

The command-line wallet can be run on the following operating systems:

  • GNU/Linux
  • MacOS (Darwin)
  • Windows Subsystem for Linux (link)

The command-line wallet requires NodeJS. We recommend using NodeJS version 12.

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

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

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

./cli-wallet --help

Short Command Description
-h --help Display help
-a--addressGet address of account [argument: symbol]
-R--apiPerform an API routing call [argument: API_path]
-b--balanceGet the balance of an address [argument: symbol]]
-c--createGenerate new deterministic account
-D--debugRun in debug mode
-d--description... Add a transaction description [argument: string]
-h--hostnameThe hostname to use (for local specify: 'http://127.0.0.1:1111/', default is: 'https://api.hybrix.io/')
-i--importKeyImport private key [argument: privateKey]
-K--keysobjectGet internal keys object from account [argument: symbol]
-l--localUse local host
-M--module... Execute a module function (use -M help moduleName to see specific help)
-n--norootUse local host with non root port
-o--offsetSpecify the account offset to use [argument: offset]
-p--passwordSet password [argument: password]
-P--publickeyGet public key from account [argument: symbol]
-q--quietNo extra output other than raw data
-r--rawtransactionCreate a raw transaction [argument: symbol] [argument: amount] [argument: target_address]
-S--secretkeyGet private key from account [argument: symbol]
-s--sendtransactionSend transaction [argument: symbol] [argument: amount] [argument: target_address]
-T--testUse test credentials
-u--usernameSet username [argument: username]
-V--verboseDisplay verbose output
-v--versionRetrieve the version
-y--yesConsent to all requests (please know what you're doing)
TODO.banking module
allocation module
-M allocation allocationSignature
-M allocation createCreate new allocation account, returning the ID. [optional argument: initial deposit amount]
-M allocation detailsGet the details of the account
-M allocation pairStatsShow pair stats (sorted by volume in HY)
-M allocation pairsShow an overview of allocated pairs
-M allocation securityDetailsGet the details of the security reserve
deal module
-M deal documentationDisplay documentation information for this module
-M deal pairsShow pairs available for swapping

Examples

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 a 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