+ pi libsodium-dev python3-pip
+ cd /a/opt/joinmarket
+ # using develop branch, as it seems to be mostly bug fixes,
+ # and this is quite new software.
+ # note: python3 does not work.
+ pip install -r requirements.txt
+ # we need bitcoin.conf in the data dir according to
+ # https://github.com/JoinMarket-Org/joinmarket/wiki/Running-JoinMarket-with-Bitcoin-Core-full-node
+ # following the example .service script, I don\'t have it there,
+ # and I generate it, so lets just symlink it.
+ sudo -u bitcoin ln -sf /etc/bitcoin/bitcoin.conf /nocow/.bitcoin
+
+ # one time, manually did python wallet-tool.py generate.
+ # The "wallet" is just a key which deterministically generates addresses.
+ # One time: move the wallet, then link to it.
+ # ln -s /p/joinmarket/wallet.json wallets
+ #
+ # see wallet addresses via:
+ # python wallet-tool.py wallet.json
+ # send to the first 3 mixing depth 0 addresses.
+ # depths are like "identities", to separate out association with
+ # each other. the big hash in that output is the depth/branch id,
+ # ignore it afaik.
+ #
+ # after sending btc to wallet from a 3rd party service, check that
+ # at least 20% of utxo of each transaction was sent to you,
+ # btc listtransactions 10 0 true
+ # btc getrawtransaction TXID 1
+ #
+ # to view status, do
+ # python wallet-tool.py wallet.json history
+ #
+ # to help make other people,
+ # python yield-generator-basic.py wallet.json
+
+ for var in rpcuser rpcpassword; do
+ u="$(s sed -rn "s/^$var=(.*)/\1/p" /etc/bitcoin/bitcoin.conf)"
+ # escape backslashes
+ u="${u//\\/\\\\\\\\}"
+ # escape commas
+ u="${u//,/\\,}"
+ sed -ri "s,^(rpc_${var#rpc}\s*=).*,\1 $u," joinmarket.cfg
+ done
+ sed -ri "s/^\s*(blockchain_source\s*=).*/\1 bitcoin-rpc/" joinmarket.cfg