<p>Bitcoin transactions are essentially the movement of coins, by encumbering the coins with a restriction on who may redeem them. Bitcoin's internal scripting language is used to accomplish this.The restrictions can be overcome by the owner of the coins, since only they can meet the requirements of that script.</p>

<p>An example is a pay-to-pubkey script. The network interprets this as: whoever can produce a signature from the private key of this public key, can spend the coins. It looks like this:
[public key] OP_CHECKSIG. </p>

<p>To redeem the coins, one provides a the right signature.</p>

<p>Scripts can have varying degrees of complexity. For example:
OP_IF OP_2 [pubkey1] [pubkey2] OP_2 OP_CHECKMULTISIG OP_ELSE [publickey3] OP_CHECKSIG OP_ENDIF.</p>

<p>This script ensures that coins can only be redeemed if the owners of pubkey1 and pubkey2 provide a signature for a suggested transaction, OR, if the owner of publickey3 provides a signature. If either of these conditions are met, then the coins can be spent. That makes it programmable on a very low level. </p>

<p>Scripts are evaluated by the network whenever a transaction occurs, ensuring that the signatures or data which is provided actually meets the needs of the restrictions on the funds.</p>

<p>And although distinct to bitcoins scripting language, since bitcoin software is usually networked to maintain up-to-date knowledge on which transactions are currently spent and unspent, you could write applications to move money around without any human intervention. </p>

<p>In a sense, most payments API's are programmable cash, but the scripting language bitcoin uses is as low as you can get.</p>

CC BY-SA 3.0
2014-12-13T14:39:33.383Z
2014-12-15T09:05:06.277Z
2014-12-15T09:05:06.277Z
karimkorun
<p>The <a href="https://bitcoin.stackexchange.com/a/34017/5406">answer of Mallory-Erik</a> falls a bit short.</p>

<p>Bitcoin uses Script to create and redeem transaction scripts. <em>Spend to Address</em> is the most commonly used, but it is also possible to script other schemes. Some you might have heard about already are multisignature addresses, and contracts.</p>

<p><a href="https://en.bitcoin.it/wiki/Script" rel="nofollow noreferrer">Bitcoin Script</a> is somewhat limited, as it is not Turing-complete, other than for example Ethereum.</p>

<p>Also check out: </p>

<ul>
<li><a href="https://bitcoin.stackexchange.com/q/547/5406">Useful alternative Bitcoin transaction scripts</a> - Features a comprehensive list of other scripts, although 3 years old.</li>
<li><a href="https://bitcoin.stackexchange.com/q/553/5406">How do Scripts work?</a></li>
</ul>

<p>You may also find interesting questions filed under <a href="/questions/tagged/script" class="post-tag" title="show questions tagged &#39;script&#39;" rel="tag">script</a>.</p>

CC BY-SA 3.0
2014-12-13T11:22:10.427Z
2014-12-17T22:56:59.580Z
2017-04-13T12:47:34.187Z
Murch
<p>With Ethereum or similar technologies, crypto-cash can can be.</p>

<p>You heard first here! :) With the new blockchain tech, </p>

<p><strong>the money's not in the bank, the bank is in the money.</strong></p>

<p>But not bitcoin itself that I know of. </p>

CC BY-SA 3.0
2014-12-17T13:59:45.603Z
Murch's answer is surely better than mine, but if I may ask, why the down vote?
Mallory-Erik
CC BY-SA 3.0
2014-12-17T23:03:20.983Z
I downvoted it because I don't think it is a useful answer. The question was "How is Bitcoin programmable money?", but the answer talks about Ethereum instead, adds some empty rhetoric, and finally states that you don't know the answer to the actual question.
Murch
CC BY-SA 3.0
2014-12-13T06:17:22.770Z
2014-12-13T06:17:22.770Z
Mallory-Erik
<p>In my local Bitcoin meetup, someone said Bitcoin is "programmable cash".
Can someone please explain if and to what respect this is true? I read about a few BIP (Bitcoin improvement proposals) that specify something about that, but I'm not sure I'm getting the complete picture.
Thanks in advance for your help!</p>

CC BY-SA 3.0
2013-12-16T15:02:40.357Z
"I read about a few BIP (Bitcoin improvement proposals) that specify something about that"
Can you specify which ones?
Jan Moritz
CC BY-SA 3.0
2013-12-16T15:24:47.383Z
Well, basically BIP 11 and BIP 16 seem quite relevant to me regarding the aspect of "programmable cash". But I'm not quite sure wether if I need to read others as well, and in what order, to get the complete picture.
entreprogreur
CC BY-SA 3.0
2013-12-21T22:02:16.503Z
In the meantime I found out that someone - when sending cash - can "program" on how the recipient will be able to spend the money. Kind of placing restrictions on spending for the receiver. I read that the coding works through a programming language called Forth, which I already heard about in my youth in the 70ies :-). I would be much interested if some know more of the details, pros and cons of this "programming" feature of Bitcoin and can explain the big picture. Any hints appreciated!
entreprogreur
<script><introducing-bitcoin>
In what respect is Bitcoin "programmable cash"?
entreprogreur
# In what respect is Bitcoin "programmable cash"?

(Asked by: username_0 on 2013-12-16)

In my local Bitcoin meetup, someone said Bitcoin is "programmable cash".
Can someone please explain if and to what respect this is true? I read about a few BIP (Bitcoin improvement proposals) that specify something about that, but I'm not sure I'm getting the complete picture.
Thanks in advance for your help!

**Tags:** script, introducing-bitcoin

> **Comments:**
> **username_1**: "I read about a few BIP (Bitcoin improvement proposals) that specify something about that" Can you specify which ones?  
> **username_0**: Well, basically BIP 11 and BIP 16 seem quite relevant to me regarding the aspect of "programmable cash". But I'm not quite sure wether if I need to read others as well, and in what order, to get the complete picture.  
> **username_0**: In the meantime I found out that someone - when sending cash - can "program" on how the recipient will be able to spend the money. Kind of placing restrictions on spending for the receiver. I read that the coding works through a programming language called Forth, which I already heard about in my youth in the 70ies :-). I would be much interested if some know more of the details, pros and cons of this "programming" feature of Bitcoin and can explain the big picture. Any hints appreciated!  

---

## 3 answers

### Answer by username_2 on 2014-12-13. Score: 4

Bitcoin transactions are essentially the movement of coins, by encumbering the coins with a restriction on who may redeem them. Bitcoin's internal scripting language is used to accomplish this.The restrictions can be overcome by the owner of the coins, since only they can meet the requirements of that script.

An example is a pay-to-pubkey script. The network interprets this as: whoever can produce a signature from the private key of this public key, can spend the coins. It looks like this:
[public key] OP\_CHECKSIG.

To redeem the coins, one provides a the right signature.

Scripts can have varying degrees of complexity. For example:
OP\_IF OP\_2 [pubkey1] [pubkey2] OP\_2 OP\_CHECKMULTISIG OP\_ELSE [publickey3] OP\_CHECKSIG OP\_ENDIF.

This script ensures that coins can only be redeemed if the owners of pubkey1 and pubkey2 provide a signature for a suggested transaction, OR, if the owner of publickey3 provides a signature. If either of these conditions are met, then the coins can be spent. That makes it programmable on a very low level.

Scripts are evaluated by the network whenever a transaction occurs, ensuring that the signatures or data which is provided actually meets the needs of the restrictions on the funds.

And although distinct to bitcoins scripting language, since bitcoin software is usually networked to maintain up-to-date knowledge on which transactions are currently spent and unspent, you could write applications to move money around without any human intervention.

In a sense, most payments API's are programmable cash, but the scripting language bitcoin uses is as low as you can get.


---

### Answer by username_3 on 2014-12-13. Score: 3

The [answer of username_4](https://bitcoin.stackexchange.com/a/34017/5406) falls a bit short.

Bitcoin uses Script to create and redeem transaction scripts. *Spend to Address* is the most commonly used, but it is also possible to script other schemes. Some you might have heard about already are multisignature addresses, and contracts.

[Bitcoin Script](https://en.bitcoin.it/wiki/Script) is somewhat limited, as it is not Turing-complete, other than for example Ethereum.

Also check out:

* [Useful alternative Bitcoin transaction scripts](https://bitcoin.stackexchange.com/q/547/5406) - Features a comprehensive list of other scripts, although 3 years old.
* [How do Scripts work?](https://bitcoin.stackexchange.com/q/553/5406)

You may also find interesting questions filed under [script](/questions/tagged/script "show questions tagged 'script'").


---

### Answer by username_4 on 2014-12-13. Score: 0

With Ethereum or similar technologies, crypto-cash can can be.

You heard first here! :) With the new blockchain tech,

**the money's not in the bank, the bank is in the money.**

But not bitcoin itself that I know of.

> **Comments:**
> **username_4**: username_3's answer is surely better than mine, but if I may ask, why the down vote?  
> **username_3**: I downvoted it because I don't think it is a useful answer. The question was "How is Bitcoin programmable money?", but the answer talks about Ethereum instead, adds some empty rhetoric, and finally states that you don't know the answer to the actual question.  

---

