thesimplekid / nostrdizer-cli

Coordinate Bitcoin collaborative transactions over Nostr
BSD 3-Clause "New" or "Revised" License
21 stars 1 forks source link
bitcoin nostr rust

nostrdizer

License

A Nostr client built to create Bitcoin Collaborative transactions, known as Coinjoins. Based on the Joinmarket model where there is a maker and a taker. A maker is always online available to take part in the transaction, and a taker who chooses when and what size of transaction to create.

To incentivize running a maker the taker pays a small fee to the maker for their service. The Maker also has the benefit of gaining privacy from each transaction they participate in so they can choose to set a fee of zero to be more likely to be selected by the taker in a transaction.

State

I'm currently in the process of changing from using bitcoincore-rpc to BDK, so there is quite a bit of dead or half finished code around, that I'm going to leave until I finish getting BDK to work. Using the bitcoincore-rpc a complete transaction can occur, however it does not actually verify the transaction is correct (ie you don't spend to much on maker fees, the maker gets back what they put in). Since im planning to use BDK for this I'm not going to fix it and just bypass it as a proof of concept.


This is Alpha level software with many things that need to be changed, added, improved and tested, please do not use on mainnet.

An Overview of the order flow.

Getting started

Run Maker

cargo r -- --rpc-url "<url of bitcoin core RPC API>" --wallet <name of wallet> run-maker

Run Taker

cargo r -- --rpc-url "<url of bitcoin core RPC API>" --wallet <name of wallet> send-transaction --send-amount <Send amount> --number-of-makers <number of makers>

Known Issues

Working but should fix

A Note on Forks

My fork of rust-bitcoin-rpc is required as a few functions are not merged upstream. I do intend to clean this up and create a PR to merge upstream as I would rather not depend on forks

Bitcoin Core

Bitcoin core is requited, v23 and v22 have been tested. Other versions may work but have not been tested.

Contact

I can be contacted for comments or questions on nostr at _@thesimplekid.com (npub1qjgcmlpkeyl8mdkvp4s0xls4ytcux6my606tgfx9xttut907h0zs76lgjw) or via email tsk@thesimplekid.com.

License

Code is under the BSD 3-Clause License (LICENSE or https://opensource.org/licenses/BSD-3-Clause)