From 2a4f082765799f64cce7240d337f507fac742fc2 Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Wed, 2 Aug 2017 12:55:24 -0700 Subject: [PATCH] Edit readme --- README.md | 53 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index c161aa7..9609f65 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ Bitcoin scripts use python-bitcoinlib, and Zcash scripts use python-zcashlib (a ## Setup -To successfully run this, you'll need python3, the dependencies installed, and a bitcoin and zcash daemon synced on whichever chain you want to trade on. +To successfully run this code, you'll need python3, the dependencies installed, and a bitcoin and zcash daemon synced on whichever chain you want to trade on. It's recommended that you install python3 in a virtualenv. Run this command from the top level of the directory: ``` @@ -14,45 +14,39 @@ virtualenv -p python3 venv source venv/bin/activate ``` +To install this code, clone the repo and install as a python package. +``` +git clone https://github.com/zcash/zbxcat.git +pip install zbxcat +``` + To install dependencies, run: ``` pip install -r requirements.txt ``` -To install python-zcashlib for testing and editing, clone the repository to your local filesystem. +You'll have to clone the repository to install python-zcashlib. ``` git clone https://github.com/arcalinea/python-zcashlib.git +pip install ``` -# Testing +Run Zcash and Bitcoin daemons locally, on whichever network you want to trade on (recommended: testnet, regtest). -Install modules locally in editable mode through pip, so that you can make changes to the code and they will be applied immediately. +Make sure the rpcuser and rpcpassword values are set in your zcash.conf or bitcoin.conf files. -To use pip to install a package in editable mode, use the `-e` flag to pass in the path on your local filesystem: - -`pip install -e ` - -## Run Zcash and Bitcoin daemons locally - -To test, run a Zcash daemon and bitcoin daemon in regtest mode. - -To run a bitcoin daemon in regtest mode, with the ability to inspect transactions outside your wallet (useful for testing purposes), use the command +Example `~/.zcash/zcash.conf` file: ``` -bitcoind -regtest -txindex=1 -daemon +rpcuser=user +rpcpassword=password ``` -Be sure to run a Zcash daemon in regtest mode as well. -``` -zcashd -regtest -txindex=1 --daemon -``` +## Walking through a new trade +You can try this on regtest on one computer, or on testnet across two computers. -## Workflow for a new trade - -Install our code as a python package in editable mode. Installing relative to the directory containing `setup.py` should work. - -`pip install -e ` +Since this is beta software that is still under active development, we recommend that you do not trade more than you can afford to lose on mainnet. ### Seller: @@ -99,3 +93,16 @@ Redeems seller p2sh. The secret they need to redeem will be automatically parsed `xcat checktrade testtrade` Trade is done! Buyer or seller can check the status again, but it will indicate that it is complete. + + +# Testing and Development + +You can install modules locally in editable mode through pip, so that you can make changes to the code and they will be applied immediately. + +To use pip to install a package in editable mode, use the `-e` flag to pass in the path on your local filesystem: + +`pip install -e ` + +To install our code as a python package in editable mode, passing in the directory containing `setup.py` should work. + +`pip install -e `