<p>Yes. Script for P2SH should be:</p>

<pre><code>OP_HASH160, address_hash, OP_EQUAL
</code></pre>

CC BY-SA 3.0
2014-08-14T09:57:49.417Z
Thanks, it works now. Could you please elaborate why this script is required for P2SH or perhaps point out to some links on the matter?
src091
CC BY-SA 3.0
2014-08-14T10:20:15.427Z
https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki and everything else about bip-16
amaclin
CC BY-SA 3.0
2014-08-13T20:08:30.533Z
2014-08-13T20:08:30.533Z
amaclin
<p>Does sending funds <strong>to</strong> a multisig address require different script than the one used for ordinary addresses? If yes, how should this script look like? (Under multisig address I mean Bitcoin script hash which starts with 3 instead of 1).</p>

<p>I write a bitcoin library in Scala for research purposes which can be found here: <a href="https://github.com/ahahaebat/BitScala" rel="nofollow">https://github.com/ahahaebat/BitScala</a>. Current code creates correct transactions for ordinary addresses but fails to do so for multisig ones.</p>

<p>Currently the script is the same for both types of addresses:<br>
OP_DUP, OP_HASH160, address_hash, OP_EQUALVERIFY, OP_CHECKSIG  </p>

<p>Should I change it somehow for multisig addresses?</p>

<development><multi-signature>
Script for sending funds to a multisig address
src091
# Script for sending funds to a multisig address

(Asked by: username_0 on 2014-08-13)

Does sending funds **to** a multisig address require different script than the one used for ordinary addresses? If yes, how should this script look like? (Under multisig address I mean Bitcoin script hash which starts with 3 instead of 1).

I write a bitcoin library in Scala for research purposes which can be found here: <https://github.com/ahahaebat/BitScala>. Current code creates correct transactions for ordinary addresses but fails to do so for multisig ones.

Currently the script is the same for both types of addresses:  
OP\_DUP, OP\_HASH160, address\_hash, OP\_EQUALVERIFY, OP\_CHECKSIG

Should I change it somehow for multisig addresses?

**Tags:** development, multi-signature


---

## 1 answers

### Answer by username_1 on 2014-08-13. Score: 1 | Accepted answer

Yes. Script for P2SH should be:
OP_HASH160, address_hash, OP_EQUAL

> **Comments:**
> **username_0**: Thanks, it works now. Could you please elaborate why this script is required for P2SH or perhaps point out to some links on the matter?  
> **username_1**: https://github.com/bitcoin/bips/blob/master/bip-0016.mediawiki and everything else about bip-16  

---

