mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-03-08 00:34:58 +00:00
testing
This commit is contained in:
parent
3f732955bd
commit
118b4f84e0
6 changed files with 68 additions and 0 deletions
10
README.md
10
README.md
|
@ -1,2 +1,12 @@
|
|||
# basicswap-bash
|
||||
A BasicSwapDEX bash installer for Debian/Ubuntu
|
||||
|
||||
# Installation
|
||||
```bash
|
||||
wget https://github.com/nahuhh/basicswap-bash/releases/latest/download/basicswap-bash.tar.gz
|
||||
tar xvf basicswap-bash.tar.gz
|
||||
cd basicswap-bash && ./install.sh
|
||||
```
|
||||
# Running BasicSwapDEX
|
||||
`basicswap-bash`
|
||||
|
||||
|
|
5
basicswap-bash
Executable file
5
basicswap-bash
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
export SWAP_DATADIR=$HOME/coinswaps
|
||||
python3 -m venv "$SWAP_DATADIR/venv"
|
||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
||||
./dep/startup.sh
|
3
dep/activate_venv.sh
Executable file
3
dep/activate_venv.sh
Executable file
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
||||
./dep/setup.sh
|
26
dep/setup.sh
Executable file
26
dep/setup.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
## Download & Install coincurve stuff
|
||||
cd $SWAP_DATADIR
|
||||
wget -O coincurve-anonswap.zip https://github.com/tecnovert/coincurve/archive/refs/tags/anonswap_v0.2.zip
|
||||
unzip -d coincurve-anonswap coincurve-anonswap.zip
|
||||
mv ./coincurve-anonswap/*/{.,}* ./coincurve-anonswap || true
|
||||
cd $SWAP_DATADIR/coincurve-anonswap
|
||||
pip3 install .
|
||||
|
||||
## Clone basicswap git
|
||||
cd $SWAP_DATADIR
|
||||
git clone https://github.com/tecnovert/basicswap.git
|
||||
cd $SWAP_DATADIR/basicswap
|
||||
## Install basicswap
|
||||
protoc -I=basicswap --python_out=basicswap basicswap/messages.proto
|
||||
pip3 install .
|
||||
mv basicswap-bash dep/startup.sh /usr/local/bin
|
||||
|
||||
## Run basicswap-prepare with particl and monero
|
||||
CURRENT_XMR_HEIGHT=$(curl "http://$monerod_addr:$monerod_port/get_info" | jq .height)
|
||||
XMR_RPC_HOST=$monerod_addr BASE_XMR_RPC_PORT=$monerod_port basicswap-prepare --datadir=$SWAP_DATADIR --withcoins=monero --xmrrestoreheight=$CURRENT_XMR_HEIGHT
|
||||
echo -e "\n\nMake note of your seed above\n"
|
||||
echo 'Install complete.
|
||||
|
||||
Use `basicswap-bash` to run, `update.sh` to update, and `addcoin.sh` to add a coin'
|
2
dep/startup.sh
Executable file
2
dep/startup.sh
Executable file
|
@ -0,0 +1,2 @@
|
|||
#!/bin/bash
|
||||
basicswap-run --datadir=$SWAP_DATADIR
|
22
install.sh
Executable file
22
install.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#/bin/bash
|
||||
|
||||
## Configure Monero node
|
||||
read -p 'Enter Address of Monero node [example: http://192.168.1.123] ' monerod_addr
|
||||
read -p 'Enter RPC Port for the Monero node [example: 18081] ' monerod_port
|
||||
printf $monerod_addr:$monerod_port
|
||||
echo -e "\nPress anykey to continue, or CTRL-C to exit." && read
|
||||
|
||||
## Update & Install dependencies
|
||||
sudo apt update
|
||||
echo "Installing" && sleep 2
|
||||
sudo apt install -y git wget python3-full python3-pip gnupg unzip protobuf-compiler automake libtool pkg-config curl jq
|
||||
|
||||
## Make venv
|
||||
export SWAP_DATADIR=$HOME/coinswaps
|
||||
export monerod_addr=$monerod_addr
|
||||
export monerod_port=$monerod_port
|
||||
mkdir -p "$SWAP_DATADIR/venv"
|
||||
python3 -m venv "$SWAP_DATADIR/venv"
|
||||
|
||||
## Activate venv
|
||||
./dep/activate_venv.sh
|
Loading…
Reference in a new issue