<p>It depends.</p>

<p>If your UTXO is a segwit UTXO, then yes. You will have everything that you need to know to calculate the txid before you signed the transaction.</p>

<p>If your UTXO is not a segwit UTXO, then no, you cannot know the txid until you sign the transaction. This is because with spending non-segwit UTXOs, the signature is part of data that is hashed to become the transaction id. So you cannot calculate the transaction id until you know what the signature is.</p>

<hr>

<p>Signing and broadcasting a transaction is not a single step that happens simultaneously. You can sign a transaction before you broadcast it. So you can make your 100 transactions and sign them as you make them. Once all are made, you can then broadcast the transactions.</p>

<p>Furthermore, if you are sending 100 transactions with one output paying someone, and the other being change back to yourself, why don't just create one transaction with 100 outputs? This is far more efficient and will guarantee that all 100 receivers receive their money at exactly the same time. This will also save you on transaction fees.</p>

CC BY-SA 4.0
2019-02-27T01:41:18.300Z
Thanks for the reply. I want to generate transactions online and sign offline, so I wanted to group the operations together. Also, I am using Bitcoin transactions indirectly to transfer OMNI tokens, which doesn't have the concept of multiple recipients :(
apr
CC BY-SA 4.0
2023-10-07T16:06:44.110Z
He wants to have data in the op_return for each recipient therefore he needs to do the thing in a series of transactions, not a single transaction with many recipients (parallel)
Dr Doeg
CC BY-SA 4.0
2019-02-27T01:24:44.520Z
2019-02-27T01:24:44.520Z
Ava Chow
<p>Suppose I have an address with a single UTXO. I want to create 100 transactions and sign/broadcast them all at once. Could I do the following: </p>

<ol>
<li>Create a transaction by hand (where change funds are sent to the sender address)</li>
<li>Calculate the transaction ID</li>
<li>Use the transaction ID and change UTXO output index to create the second transaction</li>
<li>Go to step 2</li>
</ol>

<p>Until I create 100 transactions? I suppose my question boils down to: <strong>Is it possible to calculate the TXID of a raw transaction before it is signed or broadcasted?</strong></p>

<p>Thanks!</p>

<transactions><utxo><broadcast>
Use UTXOs before transaction is signed/broadcasted
apr
# Use UTXOs before transaction is signed/broadcasted

(Asked by: username_0 on 2019-02-27)

Suppose I have an address with a single UTXO. I want to create 100 transactions and sign/broadcast them all at once. Could I do the following:

1. Create a transaction by hand (where change funds are sent to the sender address)
2. Calculate the transaction ID
3. Use the transaction ID and change UTXO output index to create the second transaction
4. Go to step 2

Until I create 100 transactions? I suppose my question boils down to: **Is it possible to calculate the TXID of a raw transaction before it is signed or broadcasted?**

Thanks!

**Tags:** transactions, utxo, broadcast


---

## 1 answers

### Answer by username_1 on 2019-02-27. Score: 3 | Accepted answer

It depends.

If your UTXO is a segwit UTXO, then yes. You will have everything that you need to know to calculate the txid before you signed the transaction.

If your UTXO is not a segwit UTXO, then no, you cannot know the txid until you sign the transaction. This is because with spending non-segwit UTXOs, the signature is part of data that is hashed to become the transaction id. So you cannot calculate the transaction id until you know what the signature is.

---

Signing and broadcasting a transaction is not a single step that happens simultaneously. You can sign a transaction before you broadcast it. So you can make your 100 transactions and sign them as you make them. Once all are made, you can then broadcast the transactions.

Furthermore, if you are sending 100 transactions with one output paying someone, and the other being change back to yourself, why don't just create one transaction with 100 outputs? This is far more efficient and will guarantee that all 100 receivers receive their money at exactly the same time. This will also save you on transaction fees.

> **Comments:**
> **username_0**: Thanks for the reply. I want to generate transactions online and sign offline, so I wanted to group the operations together. Also, I am using Bitcoin transactions indirectly to transfer OMNI tokens, which doesn't have the concept of multiple recipients :(  
> **username_2**: He wants to have data in the op_return for each recipient therefore he needs to do the thing in a series of transactions, not a single transaction with many recipients (parallel)  

---

