Skip to content
Multi-transaction contracts/joins. POC code only.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


See for the base idea.

In a nutshell: do cooperative contracts over multiple transactions, including CoinJoins but boosting deniability cf a single CoinJoin, with no extra interactivity (time-wise) overhead. See BIP141 for the main point about the ability to sign in advance. More docs here later.

Note that this repo is marked "POC" because it is, in fact, just a proof of concept, there is no intent to create fully usable code at this point. Using joinmarket-clientserver as a backend for the bitcoin stuff, but note the for-occ-poc branch is needed. Install in development mode, then you can just switch to that branch.

(As you can see from the last sentence, this is just a bunch of monkey patching. I told you it was POC!).

Consequently, this is a DO NOT USE at least for now.

Try it on regtest if you like, of course.

(Warning mainly because no test suite yet, but there are other issues too).

The syntax is:

python wallet-name server port
python wallet-name server port

On regtest, it just funds with necessary utxos on regtest to make it work; remove/comment if you want to try it with wallets, then you need utxos in the specified ranges. There is just one template found in the file, retrieved as fixed, for now. You'd either edit it (see comments) or make a new one. Alter the input amount ranges passed to the get_utxos_from_wallet function correspondingly.

(Here should go actual documentation).

The input utxos are p2sh-p2wpkh (funded from segwit Joinmarket wallets, compatible, see above), and the 2 of 2 co-owned outputs are native p2wsh.

Publishes whole tx chain to occresults.txt so you can take a look.

Bitcoin tx fees: set statically at top of for now. Obv needs to be dynamic.

Optionally broadcasts everything directly to chain without waiting if you set broadcast_all = 1 in the config under POLICY. Otherwise use what's in occresults.txt to broadcast them manually, in sequence, using sendrawtransaction. Config and wallets are in ~/.CoinJoinXT/*

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.