Post
Topic
Board Development & Technical Discussion
Re: MultiSig BUT with Bitcoin Addresses NOT Public Keys
by
edmundedgar
on 08/01/2015, 22:39:26 UTC
Technically an address can be created from the hash of a custom script (P2SH) but I am unsure if there are the necessary op_codes in the scripting language to allow you to validate against signature of one of many pubkeyhashes.

You can do "or" cases like this with branching OP_IFs (inside P2SH). Simplest case 1/2:

Code:
OP_IF
OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG.
OP_ELSE
OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG.
OP_ENDIF

...then sign with an OP_1 or OP_0 flag on the end to say which branch should be used.

For JavaScript this may help:
https://github.com/edmundedgar/bitcoin-branching-transaction-builder
I haven't tried it for this specific case, but I think it would be OK.

This is currently non-standard, but it should become standard as people start running bitcoin 0.10. In the meantime you should be able to broadcast it with blockchain.info, and it should get mined by Discus Fish or Eligius, which will generally get it mined in an hour or two.