Using the command line interface

This page will help you get your command line connected to dHealth Network.

This document describes how to interact with the DHealth Public Network using symbol-cli.

Install symbol-cli

$ npm i -g symbol-cli

Import your account(s)

The DHealth network parameters are the following:

  • generation-hash: ED5761EA890A096C50D3F50B7C2F0CCB4B84AFC9EA870F381E84DDE36D04EF16
  • namespace-id: dhealth.dhp
  • divisibility: 6
  • epoch-adjustment: 1616978397
$ symbol-cli profile import \
    --profile [profile-name] \
    --url http://dual-02.dhealth.cloud:3000 \
    --network MAIN_NET \
    --generation-hash ED5761EA890A096C50D3F50B7C2F0CCB4B84AFC9EA870F381E84DDE36D04EF16 \
    --namespace-id "dhealth.dhp" \
    --divisibility 6 \
    --epoch-adjustment 1616978397

Request account information from the node

$ symbol-cli account info --profile [profile-name]

Monitor all account information (in realtime)

$ symbol-cli monitor all --profile [profile-name]

Create a transfer transaction

  • Bob Sending 0.000001 DHP to Alice (i.e. NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q)
$ symbol-cli transaction transfer --profile [profile-name] \
    --mosaics @dhealth.dhp::1 \
    --recipient-address NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q
    --message "Hello, Alice!"

:warning: Note that the symbol-cli package requires the input of absolute amounts. In this case, we specify an amount of 1 as this equals to the smallest unit available with DHP, namely: 0.000001 dhealth.dhp (i.e. with 6 decimal places).

  • Bob Sending 1 DHP to Alice (i.e. NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q)
$ symbol-cli transaction transfer --profile [profile-name] \
    --mosaics @dhealth.dhp::1000000 \
    --recipient-address NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q
    --message "Hello, Alice!"

:warning: Note that the symbol-cli package requires the input of absolute amounts. In this case, we specify an amount of 1000000 as this equals to 1 dhealth.dhp.

  • Bob Sending 50 DHP to Alice (i.e. NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q)
$ symbol-cli transaction transfer --profile [profile-name] \
    --mosaics @dhealth.dhp::50000000 \
    --recipient-address NDON5KFUJ6G7NB2PNMA4TFSLTP4RWE4CRIDOF2Q
    --message "Hello, Alice!"

:warning: Note that the symbol-cli package requires the input of absolute amounts. In this case, we specify an amount of 50000000 as this equals to 50 dhealth.dhp.