A simple DEX protocol based on Lightning and Nostr
Run the following command to install Python 3 and the Python pip package manager:
sudo apt-get install python3 python3-pip
pip3 install poetry
poetry install
To create a new wallet, you can use the following command:
poetry run cli create
Write the words on paper [24]: phrase exist unusual fame river select fit refuse modify guide fun father old easy exercise bind rubber beef scout spice pulse penalty flash since
If you already have a mnemonic phrase, you can recover your wallet using the following command:
poetry run cli recovery "phrase exist unusual fame river select fit refuse modify guide fun father old easy exercise bind rubber beef scout spice pulse penalty flash since"
Replace "Words" with your own mnemonic phrase.
To join an exchange, you can use the following command:
poetry run cli join npub1zks4p228gncmqdskml0n8fvfeguyqp8xrht29kt6kh2swsmzdgyqx46anu
Replace npub1zks4p228gncmqdskml0n8fvfeguyqp8xrht29kt6kh2swsmzdgyqx46anu with the address of the desired exchange.
poetry run cli trade --operation BUY --amount 10 --pair BTC/BRL --price 142975 --payment-method PIX
Txid: 6b43f7dc980b10583fcf1b453ac621b2670ca0a83dae9b92055d14cecb7f4477
To list all trade orders on the exchange, you can use the following command:
$ poetry run cli book
Txid Type Pair Value Price Method Payment
-------- ------ ------- ------- ------- ----------------
6b43f7dc BUY BTC/BRL 10 142975 PIX