HcashWallet CLI Beta User Guide - HcashOrg/hcashd GitHub Wiki
Download and build
-
The compilation and installation of Hcash requires a golang environment of version higher than 1.7
-
Install glide tool to manage project dependencies
go get -u github.com/Masterminds/glide
-
Download and build 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 build 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
Input your wallet password and confirm it.
Input n
or no
Input n
or no
Note: Please save the seed in a secrete place for wallet recovery.
Input OK
to complete wallet creation.
Start hcashwallet and hcashd
- Start hcashd
hcashd
- Start hcashwallet
hcashwallet --pass="your password"
Query the account balance
hcashctl --wallet getbalance
This produces information for three accounts: the default account, the post-quantum account, and the imported account.
The default account uses the ECDSA signature scheme, which is not quantum-safe. The default account can transfer currency, conduct POS by purchasing tickets and conduct POW by mining.
The post-quantum account uses the BLISS signature scheme, which is efficient and quantum-safe. The post-quantum account can transfer currency and conduct POW by mining.
In the output of this command:
field | meaning |
---|---|
immaturecoinbaserewards |
immature mining rewards (the mining rewards cannot be expended with less than 128 block confirmations,before which time called immature) |
immaturestakegeneration |
immature voting rewards (the voting rewards cannot be expended only after 128 block confirmations either) |
lockedbytickets |
the frozen currency for purchasing the tickets (purchasing tickets locks a specific amount of hcash. This specific amount is called the ticket price, which will be unlocked after the owner gains the corresponding voting reward) |
spendable |
amount of spendable hcash |
total |
total amount of hcash |
unconfirmed |
amount of unconfirmed hcash |
Obtain the address for receiving hcash
hcashctl --wallet getnewaddress "accountname"
The addresses for the default account are prefixed by Hs
, and for the post-quantum account prefixed by Hb
Transfer currency
hcashctl --wallet sendfrom "accountname" "toaddress" amount
where fields are defined as
field | meaning |
---|---|
accountname |
name of the paying account |
toaddress |
destination address for the transferred currency |
amount |
amount of the transferred currency |
Conduct PoS by purchasing tickets
hcashctl --wallet purchaseticket "fromaccount" spendlimit minconf=1 "ticketaddress" numtickets
where fields are defined as
field | meaning |
---|---|
fromaccount |
account for the purchase. Currently only the default account is allowed to purchase ticket |
spendlimit |
the maximum amount of currency allowed to purchase tickets |
minconf |
the minimum number of confirmations required for the inputs of this ticket purchase |
ticketaddress |
destination address for receiving the voting reward |
numtickets |
the number of tickets to purchase |
PoW
Set the address for receiving mining rewards
This address is specified in a configuration file. The configuration file path is different in various operating systems.
In Win10: ~/AppData/Local/Hcashd/hcashd.conf
In Linux: ~/.hcashd/hcashd.conf
In Mac: ~/Library/Application Support/Hcashd/hcashd.conf
To specify the address for receiving mining rewards, add a line to the configuration file: miningaddr=XXXX
where XXXX
is a new address obtained by the user.
Start mining
hcashctl setgenerate true X
X
represents the number of threads used for mining.
Query the mining speed
hcashctl gethashespersec
Turn off mining
hcashctl setgenerate false
Recovery wallet
hcashwallet --create
Input your wallet password and confirm it.
Input n
or no
Input y
or yes
, and then input your seed