Skip to content

Instantly share code, notes, and snippets.

@tecnovert
Created June 26, 2022 00:27
Show Gist options
  • Save tecnovert/6731e0fcd57c7b3e97d7d32810b2519d to your computer and use it in GitHub Desktop.
Save tecnovert/6731e0fcd57c7b3e97d7d32810b2519d to your computer and use it in GitHub Desktop.
Installing Basicswap on OSX
# Create new OSX 10.15 vm
From https://github.com/myspaghetti/macos-virtualbox
wget https://raw.githubusercontent.com/myspaghetti/macos-virtualbox/master/macos-guest-virtualbox.sh
bash -i macos-guest-virtualbox.sh
When the vbox gui starts up and the language window shows press enter in the terminal.
Run through prompts until script completes and exits.
Complete setup through gui.
Optionally setup ssh login for easier copy pasting.
In vbox settings setup port forwarding from Host 2225 to Guest 22
Go to System Preferences -> Sharing, enable Remote Login for all users.
ssh -p 2225 user@localhost
% sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.7
BuildVersion: 19H15
% ls /Applications
Safari.app Utilities
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
...
==> The Xcode Command Line Tools will be installed.
Press RETURN/ENTER to continue or any other key to abort:
...
"Downloading Command Line Tools" for Xcode takes a long time.
https://github.com/Homebrew/discussions/discussions/131
For a crude progress meter the df command should show the used space increasing.
% python3 --version
Python 3.8.2
Install dependencies:
brew install wget unzip python git protobuf gnupg automake libtool pkg-config curl jq
% python3 --version
Python 3.8.2
Close the terminal and open a new one to update the python symlinks
% python3 --version
Python 3.9.13
% pip3 --version
pip 22.1.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
Basicswap dependencies:
export SWAP_DATADIR=/Users/$USER/coinswaps
mkdir -p "$SWAP_DATADIR/venv"
python3 -m venv "$SWAP_DATADIR/venv"
. $SWAP_DATADIR/venv/bin/activate && python -V
Python 3.9.13
(venv) user@users-MacBook-Pro basicswap % cd $SWAP_DATADIR
(venv) user@users-MacBook-Pro basicswap % wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/anonswap.zip
(venv) user@users-MacBook-Pro basicswap % unzip coincurve-anonswap.zip
(venv) user@users-MacBook-Pro basicswap % cd $SWAP_DATADIR/coincurve-anonswap
(venv) user@users-MacBook-Pro basicswap % pip3 install .
Basicswap:
(venv) user@users-MacBook-Pro basicswap % cd $SWAP_DATADIR
(venv) user@users-MacBook-Pro basicswap % git clone https://gitlab.com/particl/basicswap.git
(venv) user@users-MacBook-Pro basicswap % cd $SWAP_DATADIR/basicswap
(venv) user@users-MacBook-Pro basicswap % sudo python3 bin/install_certifi.py
Installing collected packages: certifi
Successfully installed certifi-2022.6.15
WARNING: There was an error checking the latest version of pip.
-- removing any existing file or link
-- creating symlink to certifi certificate bundle
-- setting permissions
-- update complete
(venv) user@users-MacBook-Pro basicswap % protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
(venv) user@users-MacBook-Pro basicswap % pip3 install .
CURRENT_XMR_HEIGHT=$(curl https://localmonero.co/blocks/api/get_stats | jq .height)
echo $CURRENT_XMR_HEIGHT
2653825
(venv) user@users-MacBook-Pro basicswap % basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --xmrrestoreheight=$CURRENT_XMR_HEIGHT
"info": "Wallet has been generated successfully."
}
2022-06-25 17:13:30,960 INFO : Finalise
Interrupting 15440
Interrupting 15452
IMPORTANT - Save your particl wallet recovery phrase:
...
(venv) user@users-MacBook-Pro basicswap % basicswap-run --datadir=$SWAP_DATADIR
Starting server at http://127.0.0.1:12700.
Exit with Ctrl + c.
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment