<p>The current signature scheme that bitcoin is using (ECDSA) doesn't support signature aggregation, so you will have to sign each input and provide one signature per input (assuming it requires only one signature) and your transaction size will grow accordingly.  </p>

<blockquote>
  <p>sell 5000 pcs coffee every day for $1 each</p>
</blockquote>

<p>Then you might want to look into Lightning Network. It works on top of bitcoin as a second layer and for micro and frequent payments it is the better choice:<br>
<a href="https://lightning.network" rel="nofollow noreferrer">https://lightning.network</a><br>
<a href="https://bitcoin.stackexchange.com/questions/43700/how-does-the-lightning-network-work-in-simple-terms">How does the Lightning network work in simple terms?</a></p>

CC BY-SA 4.0
2019-10-08T14:00:37.310Z
2019-10-08T14:00:37.310Z
Coding Enthusiast
<p>From <a href="https://bitcoin.stackexchange.com/questions/41209/how-to-sign-a-transaction-with-multiple-inputs">this</a> question I've learned that a transaction with <code>N</code> inputs requires <code>N</code> sign operations.</p>

<p>But what if there a huge amount of inputs? E.g. I have a coffee shop and I sell 5000 pcs coffee every day for $1 each. If I want to transfer my daily income I'll end up with a transaction with 5000 inputs. </p>

<p>Counting with 100kB max transaction size ~300..400 inputs can be included in one transaction. So I need to make 10..15 transactions every day. In addition, if I have a hardware wallet that needs let's say 500 ms to make a signature it will take 5000*0.5 sec = 41 min to sign all the inputs.</p>

<p>What is the correct way to handle this?</p>

<p>Is there an option to sign the transaction only once and use this signature for all the inputs?</p>

<signature><input>
Multiple inputs with one signature
Gábor Kiss-Vámosi
# Multiple inputs with one signature

(Asked by: username_0 on 2019-10-08)

From [this](https://bitcoin.stackexchange.com/questions/41209/how-to-sign-a-transaction-with-multiple-inputs) question I've learned that a transaction with `N` inputs requires `N` sign operations.

But what if there a huge amount of inputs? E.g. I have a coffee shop and I sell 5000 pcs coffee every day for $1 each. If I want to transfer my daily income I'll end up with a transaction with 5000 inputs.

Counting with 100kB max transaction size ~300..400 inputs can be included in one transaction. So I need to make 10..15 transactions every day. In addition, if I have a hardware wallet that needs let's say 500 ms to make a signature it will take 5000\*0.5 sec = 41 min to sign all the inputs.

What is the correct way to handle this?

Is there an option to sign the transaction only once and use this signature for all the inputs?

**Tags:** signature, input


---

## 1 answers

### Answer by username_1 on 2019-10-08. Score: 2 | Accepted answer

The current signature scheme that bitcoin is using (ECDSA) doesn't support signature aggregation, so you will have to sign each input and provide one signature per input (assuming it requires only one signature) and your transaction size will grow accordingly.

> sell 5000 pcs coffee every day for $1 each

Then you might want to look into Lightning Network. It works on top of bitcoin as a second layer and for micro and frequent payments it is the better choice:  
<https://lightning.network>  
[How does the Lightning network work in simple terms?](https://bitcoin.stackexchange.com/questions/43700/how-does-the-lightning-network-work-in-simple-terms)


---

