This code provides a proof of concept for executing Grin-BTC/ETH atomic swaps. It was used to perform the first swaps on Grin testnet (as far as we know), read more about it here. Note that this code is definitely not production-ready and usage is at your own risk.
Getting this code to run is a bit involved, it has not been optimized for user friendliness. The steps to take are:
- Download a copy of this repository
- Clone the Grin fork of secp256k1-zkp
- Copy
build_secp256k1-zkp.sh
to the secp25k1-zkp directory - Excute it to build the library
- Copy the
build/include
andbuild/lib
directories to the grinswap directory - Create and start a venv with python 3.6, and install
cffi eth-hash pysha3
with pip - Execute
./build
to build the python cffi library
Executing a swap is for now a very manual process, requiring sending files between the seller and buyer multiple times.
- Start the venv
- Create a wallet directory and add a
wallet.seed
file with a random seed - If you are selling Grin, you need to have some in your wallet. Run
./example simple_tx receive
and send some Grin to it, on port 17175 - To get started with the swap, run
./swap sell
and follow the directions Any Grin transactions can be submitted with./example <filename> <optional node url>
This code is released under the Apache License 2.0