<p>Bitcoin Script has only one function: determining the conditions under which a transaction output can be spent, in its entirety. The result of evaluating a script is just &quot;true&quot; or &quot;false&quot;.</p>
<p>So no, you cannot have a single script that corresponds to two payouts, because every output has exactly one script. You can have an output with a script that lets it be spent when two keys sign off, or one that lets it be spent when one of them signs off. But it's always going to be the entire output, with the entirety of the value it has.</p>

CC BY-SA 4.0
2021-12-18T03:50:09.307Z
2021-12-18T03:50:09.307Z
Pieter Wuille
<p>No, currently scripts have no way to inspect the outputs of the spending transaction and require. There is no way to restrict what scripts can be created, nor what amounts outputs can be.</p>
<p>There are ideas for covenants where a script can do those things, but these are not deployed, and there are currently no plans to deploy them.</p>

CC BY-SA 4.0
2021-12-18T01:19:15.230Z
2021-12-18T01:19:15.230Z
Ava Chow
<p>Is it possible to write a Bitcoin script that pays multiple recipients?
For instance, a script funded with 2 BTC by Alice that pays 1 BTC each to Bob and Charlie.</p>
<p>Eventually I'd like to build a system using Lightning, where Alice, Bob and Charlie are all part of a channel. Alice would fund the channel and the script would determine how much of the funds go to Bob and Charlie.</p>

<lightning-network><script>
Bitcoin script with multiple recipients?
Tim
# Bitcoin script with multiple recipients?

(Asked by: username_0 on 2021-12-18)

Is it possible to write a Bitcoin script that pays multiple recipients?
For instance, a script funded with 2 BTC by Alice that pays 1 BTC each to Bob and Charlie.

Eventually I'd like to build a system using Lightning, where Alice, Bob and Charlie are all part of a channel. Alice would fund the channel and the script would determine how much of the funds go to Bob and Charlie.

**Tags:** lightning-network, script


---

## 2 answers

### Answer by username_1 on 2021-12-18. Score: 2 | Accepted answer

Bitcoin Script has only one function: determining the conditions under which a transaction output can be spent, in its entirety. The result of evaluating a script is just "true" or "false".

So no, you cannot have a single script that corresponds to two payouts, because every output has exactly one script. You can have an output with a script that lets it be spent when two keys sign off, or one that lets it be spent when one of them signs off. But it's always going to be the entire output, with the entirety of the value it has.


---

### Answer by username_2 on 2021-12-18. Score: 1

No, currently scripts have no way to inspect the outputs of the spending transaction and require. There is no way to restrict what scripts can be created, nor what amounts outputs can be.

There are ideas for covenants where a script can do those things, but these are not deployed, and there are currently no plans to deploy them.


---

