From 4a99f007cea862eb70e78f8c2a1ea5b23184a1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Neves?= Date: Fri, 30 Nov 2018 11:04:25 -0500 Subject: [PATCH] chore: documentation efforts --- NODE.md | 72 +++++++++++++++++++++++++++++++++++++++++++----- NODE_COMMANDS.md | 59 --------------------------------------- package.json | 2 +- 3 files changed, 66 insertions(+), 67 deletions(-) delete mode 100644 NODE_COMMANDS.md diff --git a/NODE.md b/NODE.md index 3644d63..a55f7c3 100644 --- a/NODE.md +++ b/NODE.md @@ -1,24 +1,26 @@ # Zcash Node Setup -## Installation +The original `zcashd` daemon built by the Zcash Company, is built entirely in for Linux systems. If you're running a Linux distro, you should look [here](https://github.com/zcash/zcash) for instructions on how to install it. -Download the attached files, verify checksum of the archive and extract +For macOS users, please follow [this guide](https://github.com/kozyilmaz/zcash-apple) to build the binaries locally on your machine and then install it. After downloading the tarball and the hash, use the steps below to kickstart your node and connect it to the network. + +## Installing + +Download the attached files from Zcash Apple repository, verify the checksum of the archive and then extract its contents: ```bash shasum -a 256 -c zcash-macos-v2.0.1a.tar.bz2.hash tar -xvf zcash-macos-v2.0.1a.tar.bz2 ``` -## How to use +## Running -When launching Zcash on MacOS for the first time, certain initialization steps should be completed. -Please run the commands below once for the first time +When launching Zcash on macOS for the first time, certain initialization steps should be completed. Please run the commands below once for the first time ``` cd zcash-macos-v2.0.1a/usr/local/bin ./zcash-fetch-params ./zcash-init -./zcashd ``` You can just run Zcash by launching the daemon afterwards: @@ -27,4 +29,60 @@ You can just run Zcash by launching the daemon afterwards: ./zcashd ``` -You can refer to NODE_COMMANDS for basic usage \ No newline at end of file +## Basic Commands + +Along with `zcashd`, the daemon provides the `zcash-cli` utility which allows you to run RPC commands to your node, and receive the output data. + +Some useful commands can be found below: + +### General + +> List information for a command +```bash +./zcash-cli help +``` + +> List all shielded addresses +```bash +./zcash-cli z_listaddresses +``` + +> Create new shielded address +```bash +./zcash-cli z_getnewaddress +``` + +> Get total balance +```bash +./zcash-cli z_gettotalbalance +``` + +### Sending Funds +```bash +export ZADDR='zcNeXiyD3JkhKTrU38xM9C6HQGy9aP5qqVFH25qFzQGnmdwYZ2Dr53Jy7iRp64D4CzkMZdmKagN6mmtu3jVKHuZ8xZp8fw3' +export FRIEND='zcfZJW3qLHpSc7q7W1SXRGdVjgM6Q6kRwdkz1DHW5sP2EqcMHf5RCp3Frpf2qnb81j9K6upzRN4HoVxfboVwLTRaZ7bKn8b' +``` + +> Send from shielded address to shielded address (with memo and fee) +```bash +./zcash-cli z_sendmany "$ZADDR" "[{\"address\": \"$FRIEND\", \"amount\": 0.05, \"memo\": \"9876543210\"}]" 1 0.002 +``` + +> Get send result +```bash +./zcash-cli z_getoperationresult [\"$OPID\"] +``` + +> List amounts received by shielded address +```bash +./zcash-cli z_listreceivedbyaddress "$ZADDR" +``` + +## Helpful Resources + +* [Zcash Documentation (ReadTheDocs)](https://zcash.readthedocs.io/en/latest/rtd_pages/user_guide.html) +* [Zcash Apple Daemon](https://github.com/kozyilmaz/zcash-apple) +* [Zcash Community Forum](https://forum.zcashcommunity.com/) +* [Zcash Foundation](https://z.cash.foundation/) +* [Zcash Daemon](https://github.com/zcash/zcash) +* [Zcash Payment API Docs](https://github.com/zcash/zcash/blob/master/doc/payment-api.md) \ No newline at end of file diff --git a/NODE_COMMANDS.md b/NODE_COMMANDS.md deleted file mode 100644 index 5b3b714..0000000 --- a/NODE_COMMANDS.md +++ /dev/null @@ -1,59 +0,0 @@ - -# for detailed information use the guides below -https://github.com/zcash/zcash/wiki/1.0-User-Guide -https://github.com/zcash/zcash/blob/master/doc/payment-api.md -https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list - -# list info for a command -$ ./zcash-cli help - - -# list all accounts (therefore all t-addr's) -$ ./zcash-cli listreceivedbyaddress 0 true - -# list of t-addr's for default account (again all t-addr's) -$ ./zcash-cli getaddressesbyaccount "" - -# list all unspent transaction outputs (t-addr UTXO's) -$ ./zcash-cli listunspent - -# create new t-addr's -$ ./zcash-cli getnewaddress - - - -# list all z-addr's -$ ./zcash-cli z_listaddresses - -# create new z-addr's -$ ./zcash-cli z_getnewaddress - -# get total balance -$ ./zcash-cli z_gettotalbalance - - - -# send funds -$ export TADDR='t1TGVDzsEK2qbG1N8FJQFSAzV1bWWHMGGCS' -$ export ZADDR='zcNeXiyD3JkhKTrU38xM9C6HQGy9aP5qqVFH25qFzQGnmdwYZ2Dr53Jy7iRp64D4CzkMZdmKagN6mmtu3jVKHuZ8xZp8fw3' -$ export FRIEND='zcfZJW3qLHpSc7q7W1SXRGdVjgM6Q6kRwdkz1DHW5sP2EqcMHf5RCp3Frpf2qnb81j9K6upzRN4HoVxfboVwLTRaZ7bKn8b' - -# send from t-addr to z-addr (with memo and fee) -$ ./zcash-cli z_sendmany "$TADDR" "[{\"address\": \"$ZADDR\", \"amount\": 0.1, \"memo\": \"0123456789\"}]" 1 0.002 - -# send from t-addr to t-addr (with fee) -$ ./zcash-cli z_sendmany "$TADDR1" "[{\"address\": \"$TADDR2\", \"amount\": 0.09}]" 1 0.002 - -# send from z-addr to z-addr (with memo and fee) -$ ./zcash-cli z_sendmany "$ZADDR" "[{\"address\": \"$FRIEND\", \"amount\": 0.05, \"memo\": \"9876543210\"}]" 1 0.002 - -# get send result -$ ./zcash-cli z_getoperationresult [\"$OPID\"] - - -# list amounts received by z-addr -$ ./zcash-cli z_listreceivedbyaddress "$ZADDR" - -# list balance both for t-addr and z-addr -$ ./zcash-cli z_getbalance "$TADDR" - diff --git a/package.json b/package.json index a97cc0b..aaac900 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zec-react-wallet", "version": "0.1.1", - "description": "Zcash Reference Wallet built in Electron & React", + "description": "Zcash Reference Wallet", "main": "index.js", "license": "MIT", "scripts": {