<p>No, that won't work. <code>joinpsbts</code> must be used before any signatures are created. Otherwise existing signatures will not be valid for the joined transaction. Rather, each person must create their own PSBT, send them to each other or to some coordinator where the PSBTs are then joined together with <code>joinpsbts</code>. Then the joined PSBT can be distributed back to everyone, who processes and signs it. Once signed, each person must, again, send the signed PSBT to everyone else or to the coordinator where all the PSBTs are combined with <code>combinepsbt</code>. Then the combined PSBT can be finalized and broadcast.</p>

<p>Note that currently <code>joinpsbts</code> has a major privacy leak as the inputs and outputs are added to the joined PSBT in the order that the transactions were specified. There is an open <a href="https://github.com/bitcoin/bitcoin/pull/16512" rel="nofollow noreferrer">Pull Request</a> that fixes this issue.</p>

CC BY-SA 4.0
2019-08-02T03:34:32.817Z
This is going to be an amazing feature, any ideas when that PR may get merged?
Fontaine
CC BY-SA 4.0
2023-04-03T16:41:47.623Z
Is this working? We tried to reproduce step by step but we can't sign the joined transactions
JuliSmz
CC BY-SA 4.0
2023-04-06T16:24:21.030Z
@JuliSmz As far as I know, nothing has changed with `joinpsbts`.
Ava Chow
CC BY-SA 4.0
2019-08-01T01:27:39.447Z
2019-08-01T01:27:39.447Z
Ava Chow
<p>I am developing a feature in my app for "manual coinjoins" which follows this as inspiration: <a href="https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Manual_CoinJoin_Workflow" rel="nofollow noreferrer">https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Manual_CoinJoin_Workflow</a></p>

<p>I am not an experienced coinjoin user and just want to make sure I am not missing something here.</p>

<p>The flow I am using is:</p>

<p>User A creates a PSBT with one utxo input of 0.1 btc and one output of 0.0995 btc sending the output to a new address of theirs.
User A processes the PSBT to sign for the input.</p>

<p>User A passes the PSBT on to user B who creates another PSBT with identical input amount and identical output amount and processes the PSBT to sign the input.</p>

<p>User B can pass it on to others who repeat the process or finalize and broadcast.</p>

<p>Is this the proper way to do it? Does the order in which the users process the PSBT with their wallet matter? </p>

<bitcoin-core><bitcoind><json-rpc><bitcoin-cli><bip174-psbt>
Correct way to use joinpsbt for manual coinjoin?
Fontaine
# Correct way to use joinpsbt for manual coinjoin?

(Asked by: username_0 on 2019-07-31)

I am developing a feature in my app for "manual coinjoins" which follows this as inspiration: <https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki#Manual_CoinJoin_Workflow>

I am not an experienced coinjoin user and just want to make sure I am not missing something here.

The flow I am using is:

User A creates a PSBT with one utxo input of 0.1 btc and one output of 0.0995 btc sending the output to a new address of theirs.
User A processes the PSBT to sign for the input.

User A passes the PSBT on to user B who creates another PSBT with identical input amount and identical output amount and processes the PSBT to sign the input.

User B can pass it on to others who repeat the process or finalize and broadcast.

Is this the proper way to do it? Does the order in which the users process the PSBT with their wallet matter?

**Tags:** bitcoin-core, bitcoind, json-rpc, bitcoin-cli, bip174-psbt


---

## 1 answers

### Answer by username_1 on 2019-08-01. Score: 1 | Accepted answer

No, that won't work. `joinpsbts` must be used before any signatures are created. Otherwise existing signatures will not be valid for the joined transaction. Rather, each person must create their own PSBT, send them to each other or to some coordinator where the PSBTs are then joined together with `joinpsbts`. Then the joined PSBT can be distributed back to everyone, who processes and signs it. Once signed, each person must, again, send the signed PSBT to everyone else or to the coordinator where all the PSBTs are combined with `combinepsbt`. Then the combined PSBT can be finalized and broadcast.

Note that currently `joinpsbts` has a major privacy leak as the inputs and outputs are added to the joined PSBT in the order that the transactions were specified. There is an open [Pull Request](https://github.com/bitcoin/bitcoin/pull/16512) that fixes this issue.

> **Comments:**
> **username_0**: This is going to be an amazing feature, any ideas when that PR may get merged?  
> **username_2**: Is this working? We tried to reproduce step by step but we can't sign the joined transactions  
> **username_1**: @username_2 As far as I know, nothing has changed with `joinpsbts`.  

---

