Skip to content

Quick guide for beginners

cryptorex edited this page Oct 21, 2021 · 33 revisions

Keep running wallet to strengthen the BitcoinZ network. Backup your wallet in many locations & keep your coins wallet offline.

Prerequisites:

  • Install Ubuntu 16.04 (or buy VPS in Amazon AWS or Google GCP etc) & login to shell

Run BitcoinZ full node

Installation

Install from deb package (Ubuntu 16.04 tested)

sudo apt update
sudo apt-get install libc6-dev g++-multilib python pwgen
cd ~
wget https://github.com/btcz/bitcoinz/releases/download/2.0.7/bitcoinz-2.0.7-8a82569-amd64.deb
sudo dpkg -i bitcoinz*.deb
zcash-fetch-params
# Create config only if it is not already created
mkdir -p ~/.bitcoinz
echo "rpcuser=rpc`pwgen 15 1`" > ~/.bitcoinz/bitcoinz.conf
echo "rpcpassword=rpc`pwgen 15 1`" >> ~/.bitcoinz/bitcoinz.conf
# Run BitcoinZ
zcashd

Install script (Ubuntu 16.04 tested)

cd ~
wget https://raw.githubusercontent.com/btcz/bitcoinz/master/zcutil/get-bitcoinz.sh -O get-bitcoinz.sh
chmod +x get-bitcoinz.sh
./get-bitcoinz.sh

Install manually

  • Install packages
sudo apt update
sudo apt-get install libc6-dev g++-multilib python p7zip-full pwgen
  • Download BitcoinZ
cd ~
wget https://github.com/btcz/bitcoinz/releases/download/2.0.7/bitcoinz-2.0.7-8a82569-linux64.zip
  • Extract BitcoinZ
7z x bitcoinz*linux64.zip
  • Change directory & fetch params
cd ~/bitcoinz-pkg
./fetch-params.sh
  • Create config file
mkdir -p ~/.bitcoinz
echo "rpcuser=rpc`pwgen 15 1`" > ~/.bitcoinz/bitcoinz.conf
echo "rpcpassword=rpc`pwgen 15 1`" >> ~/.bitcoinz/bitcoinz.conf
  • Run full node and wait for download all blocks. Full node should be running don't kill it.
cd ~/bitcoinz-pkg
./zcashd -exportdir=.

Setup BitcoinZ as a service for current user

wget https://raw.githubusercontent.com/btcz/bitcoinz/master/zcutil/setup-bitcoinz-service.sh -O setup-bitcoinz-service.sh
chmod +x setup-bitcoinz-service.sh
sudo ./setup-bitcoinz-service.sh $USER

Service status:

systemctl status bitcoinz

BitcoinZ commands

- Login to console & change directory to bitcoinz-pkg

cd ~/bitcoinz-pkg

- Get your public BitcoinZ address (taddr)

./zcash-cli listreceivedbyaddress 0 true

- Get address private key

./zcash-cli dumpprivkey t1VHqiM5GTzVPZY9uSysPP48LfwQgaii1wy

Save private key in safe location
- Send coins

./zcash-cli z_sendmany t1eRPBQ6FAagpjbpRmtzXsjsSvGkorAQFSr '[{"amount": 1, "address": "t1f8xsf4U6qxYajSLD6sFLwKj4qyNRtqLk8"}]'

or Windows client example

zcash-cli z_sendmany "t1eRPBQ6FAagpjbpRmtzXsjsSvGkorAQFSr" "[{"amount": 0.1, "address": "t1f8xsf4U6qxYajSLD6sFLwKj4qyNRtqLk8"}]"

where:
t1eRPBQ6FAagpjbpRmtzXsjsSvGkorAQFSr - from address
1 - amount
t1f8xsf4U6qxYajSLD6sFLwKj4qyNRtqLk8 - to address
- Get transaxtion id (txid)

./zcash-cli z_getoperationstatus

- Get transaction details (as an argument pass txid from previous step)

./zcash-cli gettransaction ad4a0557eb45dc81ffdc15030be0dbad93e31ac00b66f9311b0e4526103916ff

- Check total balance

./zcash-cli z_gettotalbalance

- In case of disaster recover your address from private key

./zcash-cli importprivkey Kxnabekc1eXJyT7Pwb23GEvmzjArsHW3EYt93KWzrrL7ncqBoSMK

where priv key = Kxnabekc1eXJyT7Pwb23GEvmzjArsHW3EYt93KWzrrL7ncqBoSMK

***Backup your wallet***
- copy wallet.dat from ~/.bitcoinz folder to safe locations

In Windows wallet directory is %APPDATA%\BitcoinZ. 
Run in cmd:

cd %APPDATA%\BitcoinZ && explorer .

- Run the following command & safe walletdata in safe locations

./zcash-cli z_exportwallet walletdata


More commands: 
https://github.com/zcash/zcash/blob/master/doc/payment-api.md