0

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?

1

Yes. Script for P2SH should be:

OP_HASH160, address_hash, OP_EQUAL

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.