Update install notes for OSX.
Download correct XMR release. Trust added PGP keys.
This commit is contained in:
		
							parent
							
								
									d2ded157f8
								
							
						
					
					
						commit
						a638c55ecb
					
				@ -154,8 +154,9 @@ def prepareCore(coin, version, settings, data_dir):
 | 
			
		||||
 | 
			
		||||
    release_filename = '{}-{}-{}'.format(coin, version, BIN_ARCH)
 | 
			
		||||
    if coin == 'monero':
 | 
			
		||||
        release_url = 'https://downloads.getmonero.org/cli/monero-linux-x64-v{}.tar.bz2'.format(version)
 | 
			
		||||
 | 
			
		||||
        if os_name == 'osx':
 | 
			
		||||
            os_name = 'mac'
 | 
			
		||||
        release_url = 'https://downloads.getmonero.org/cli/monero-{}-x64-v{}.tar.bz2'.format(os_name, version)
 | 
			
		||||
        release_path = os.path.join(bin_dir, release_filename)
 | 
			
		||||
        if not os.path.exists(release_path):
 | 
			
		||||
            downloadFile(release_url, release_path)
 | 
			
		||||
@ -240,6 +241,7 @@ def prepareCore(coin, version, settings, data_dir):
 | 
			
		||||
            rv = gpg.import_keys(urllib.request.urlopen(pubkeyurl).read())
 | 
			
		||||
            print('import_keys', rv)
 | 
			
		||||
            assert('F0AF4D462A0BDF92' in rv.fingerprints[0])
 | 
			
		||||
            gpg.trust_keys('F0AF4D462A0BDF92', 'TRUST_FULLY')
 | 
			
		||||
            with open(assert_path, 'rb') as fp:
 | 
			
		||||
                verified = gpg.verify_file(fp)
 | 
			
		||||
    else:
 | 
			
		||||
@ -251,7 +253,10 @@ def prepareCore(coin, version, settings, data_dir):
 | 
			
		||||
 | 
			
		||||
            pubkeyurl = 'https://raw.githubusercontent.com/tecnovert/basicswap/master/gitianpubkeys/{}_{}.pgp'.format(coin, signing_key_name)
 | 
			
		||||
            logger.info('Importing public key from url: ' + pubkeyurl)
 | 
			
		||||
            gpg.import_keys(urllib.request.urlopen(pubkeyurl).read())
 | 
			
		||||
            rv = gpg.import_keys(urllib.request.urlopen(pubkeyurl).read())
 | 
			
		||||
 | 
			
		||||
            for key in rv.fingerprints:
 | 
			
		||||
                gpg.trust_keys(key, 'TRUST_FULLY')
 | 
			
		||||
 | 
			
		||||
            with open(assert_sig_path, 'rb') as fp:
 | 
			
		||||
                verified = gpg.verify_file(fp, assert_path)
 | 
			
		||||
@ -286,6 +291,7 @@ def prepareDataDir(coin, settings, chain, particl_mnemonic):
 | 
			
		||||
            fp.write('rpc-bind-ip=127.0.0.1\n')
 | 
			
		||||
            fp.write('zmq-rpc-bind-port={}\n'.format(core_settings['zmqport']))
 | 
			
		||||
            fp.write('zmq-rpc-bind-ip=127.0.0.1\n')
 | 
			
		||||
            fp.write('prune-blockchain=1')
 | 
			
		||||
 | 
			
		||||
        wallet_conf_path = os.path.join(data_dir, coin + '_wallet.conf')
 | 
			
		||||
        if os.path.exists(wallet_conf_path):
 | 
			
		||||
 | 
			
		||||
@ -53,21 +53,42 @@ Remove any existing wallets after copying over a pruned chain or the Bitcoin dae
 | 
			
		||||
 | 
			
		||||
## Run Without Docker:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Ubuntu Setup:
 | 
			
		||||
 | 
			
		||||
    $ apt-get install -y wget python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config
 | 
			
		||||
 | 
			
		||||
    $ export SWAP_DATADIR=/var/data/coinswaps
 | 
			
		||||
### OSX Setup:
 | 
			
		||||
 | 
			
		||||
Install Homebrew:
 | 
			
		||||
 | 
			
		||||
    https://brew.sh/
 | 
			
		||||
 | 
			
		||||
Command Line Tools:
 | 
			
		||||
 | 
			
		||||
    $ xcode-select --install
 | 
			
		||||
 | 
			
		||||
Dependencies:
 | 
			
		||||
 | 
			
		||||
    $ brew install wget unzip python git protobuf gnupg automake libtool pkg-config
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
### Basicswap:
 | 
			
		||||
 | 
			
		||||
    $ export SWAP_DATADIR=/Users/$USER/coinswaps
 | 
			
		||||
    $ mkdirs -p "$SWAP_DATADIR/venv"
 | 
			
		||||
    $ python3 -m venv "$SWAP_DATADIR/venv"
 | 
			
		||||
    $ . $SWAP_DATADIR/venv/bin/activate && python -V
 | 
			
		||||
    $ cd $SWAP_DATADIR
 | 
			
		||||
    $ wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip
 | 
			
		||||
    $ unzip coincurve-anonswap.zip
 | 
			
		||||
    $ cd coincurve-anonswap
 | 
			
		||||
    $ cd $SWAP_DATADIR/coincurve-anonswap
 | 
			
		||||
    $ python3 setup.py install --force
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    $ cd $SWAP_DATADIR
 | 
			
		||||
    $ git clone https://github.com/tecnovert/basicswap.git
 | 
			
		||||
    $ cd basicswap
 | 
			
		||||
    $ cd $SWAP_DATADIR/basicswap
 | 
			
		||||
    $ protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
 | 
			
		||||
    $ pip3 install .
 | 
			
		||||
 | 
			
		||||
@ -75,6 +96,9 @@ Prepare the datadir:
 | 
			
		||||
 | 
			
		||||
    XMR_RPC_HOST="node.xmr.to" BASE_XMR_RPC_PORT=18081 basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --withoutcoins=litecoin --xmrrestoreheight=2245107
 | 
			
		||||
 | 
			
		||||
    OR using a local XMR daemon:
 | 
			
		||||
    basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --withoutcoins=litecoin --xmrrestoreheight=2245107
 | 
			
		||||
 | 
			
		||||
Record the mnemonic from the output of the above command.
 | 
			
		||||
 | 
			
		||||
Start the app
 | 
			
		||||
@ -84,6 +108,14 @@ Start the app
 | 
			
		||||
Open in browser: `http://localhost:12700`
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Start after installed:
 | 
			
		||||
 | 
			
		||||
    $ export SWAP_DATADIR=/Users/$USER/coinswaps
 | 
			
		||||
    $ python3 -m venv "$SWAP_DATADIR/venv"
 | 
			
		||||
    $ basicswap-run --datadir=$SWAP_DATADIR
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Old notes
 | 
			
		||||
=============
 | 
			
		||||
 | 
			
		||||
@ -97,34 +129,6 @@ Old notes
 | 
			
		||||
    $ python bin/basicswap-run.py
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
## OSX
 | 
			
		||||
 | 
			
		||||
Install Homebrew:
 | 
			
		||||
 | 
			
		||||
    https://brew.sh/
 | 
			
		||||
 | 
			
		||||
Command Line Tools:
 | 
			
		||||
 | 
			
		||||
    $ xcode-select --install
 | 
			
		||||
 | 
			
		||||
Dependencies:
 | 
			
		||||
 | 
			
		||||
    $ brew install python git protobuf gnupg
 | 
			
		||||
 | 
			
		||||
Python certificates:
 | 
			
		||||
 | 
			
		||||
    $ /Applications/Python\ 3.7/Install\ Certificates.command
 | 
			
		||||
 | 
			
		||||
Basicswap
 | 
			
		||||
 | 
			
		||||
    $ git clone https://github.com/tecnovert/basicswap.git
 | 
			
		||||
    $ cd basicswap
 | 
			
		||||
    $ protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
 | 
			
		||||
    $ pip3 install .
 | 
			
		||||
    $ basicswap-prepare
 | 
			
		||||
    $ basicswap-run
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
# Windows
 | 
			
		||||
 | 
			
		||||
Install git and python3:
 | 
			
		||||
 | 
			
		||||
@ -1,2 +1,2 @@
 | 
			
		||||
HTML_PORT=127.0.0.1:12700:12700
 | 
			
		||||
#COINDATA_PATH=/var/data/basicswap
 | 
			
		||||
#COINDATA_PATH=/var/data/coinswaps
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user