Author

Topic: [ANN]Users guide of Hcash Wallet CLI mainchain test version (Read 171 times)

newbie
Activity: 44
Merit: 0
Default account adopts ECDSA algo, and quantum-resistance account adopts BLISS algo.
member
Activity: 154
Merit: 10
What is the algo?
newbie
Activity: 44
Merit: 0
Downloading and compiling code of Hcash’ s test chain of main chain
Installing and compiling Hcash source code require at least 1.7 version of Go
Install glide tool go get ‐u github.com/Masterminds/glide
Download and compiling hcashd git clone https://github.com/HcashOrg/hcashd$GOPATH/src/github.com/HcashOrg/hcashd cd
$GOPATH/src/github.com/HcashOrg/hcashd glide install go install $(glide nv)
Download and compiling hcashwallet git clone https://github.com/HcashOrg/hcashwallet$GOPATH/src/github.com/HcashOrg/hcashwallet cd $GOPATH/src/github.com/HcashOrg/hcashwallet glide install go install $(glide nv)

Create hcashwallet
hcashwallet ‐‐create
Caution: Please write down seed which may be used to recover wallet. Run hcashd and hcashwallet

Run hcashd
hcashd
Run hcashwallet
hcashwallet ‐‐pass="your password"

Inquire account balance

hcashctl ‐‐wallet getbalance
Output three accounts, one is default account, one is quantum-resistance account, one is import-type account. Default account adopts ECDSA signature but not algorithm of quantum-resistance signiture. Default account can do fund transfer, purchase tickets to participate in PoS and PoW. Quantum-resistance account adopts BLISS signature which is high-efficiency algorithm of quantum-resistance signiture. Quantum-resistance account can transfer fund and participate PoW mining.

The meaning of outputs of this command is listed below:
       **field**                                    **meaning**
immaturecoinbaserewards             Unmatured mining bonus(mining
                                                   bonus will be ready to use after
                                                   acquiring 128 confirmations of
                                                   main blocks. Before the mining
                                                   bonus is ready to use, the status
                                                   is called unmatured. )

immaturestakegeneration              Unmatured bonus of
                                                   voting(bonus of voting will be
                                                   ready to use after 128
                                                   confirmations of main blocks as
                                                   well)

   lockedbytickets                          Lock-in fund used for buying
                                                   ticket(Participating ticket
                                                   purchasing will lock in a certain
                                                   amount of hcash which is called
                                                   price of ticket. The lock-in fund
                                                   will be unlocked after users get
                                                   bonus of purchasing ticket)

     spendable                               Available account balance
 
       total                                     Total account balance

   unconfirmed                              Unconfirmed amount

Get payment receiving address
    hcashctl ‐–wallet getnewaddress "accountname"
The default account's address prefix is Hs and the anti-quantum account's address prefix is Hb

Transaction

    hcashctl ‐‐wallet sendfrom "accountname" "toaddress" amount

          **field**                  **meaning**
      accountname               Account name for paying
         toaddress                 Payment receiving address
          amount                   Transaction amount

Purchase tickets to participate in PoS
    Hcashctl ‐‐wallet purchaseticket "fromaccount" spendlimit minconf=1 "ticketaddress" numtickets

         **field**                       **meaning**
        fromaccount                 The account for ticket
                                           purchase, only for default
                                           account so far
         spendlimit                   Maximum amount of money
                                           for tickets purchase
           minconf                    Minimum number of tickets
                                           purchase
       ticketaddress                 Address for receiving voting
                                           reward
         numtickets                  Number of tickets

PoW
set mining reward address To set mining reward address in configuration files, the path of the configuration files under different operating systems varies.
* The config path for Win 10 is: ~/AppData/Local/Hcashd/hcashd.conf
*The config path for Linux is: ~/.hcashd/hcashd.conf The config path for Mac is: ~/Library/Application Support/Hcashd/hcashd.conf
Add miningaddr=XXXX XXXX to the last line in the config file to gain newaffress for clients.
hcashctl setgenerate true X
X indicates the number of threads

Inquire mining rate
     hcashctl gethashespersec
Quit mining
     hcashctl setgenerate false
Wallet recovery
     hcashwallet ‐‐create
Type ‘ seed’ to recover

Jump to: