1

Any way to create a multisig address from Bitcoin addresses (instead of public keys)?

If not, why not? What would the problem be?

EDITED - Thanks for the answers. This is for an application that generates multisig transactions with escrow for external users. Of course anyone who controls an address can find the public key, but that's probably beyond many casual users (or too much of an hassle).

1

No. OP_CHECKMULTISIG only supports multiple pubkey not pubkeyhash (addresses).

  • So? OP_CHECKSIG only supports pubkeys, too. – Nick ODell Apr 4 '15 at 18:11
2

While you can't generate a multisig address directly from a number of non-multisig addresses, you can easily get their public key on a single call. In bitcoin-core you have to call validateaddress and then retrieve the pubkey field from the response, which is the hex value of the raw public key that you can then use to generate your multisig.

  • I don't think this works for addresses that aren't in your wallet. – Nick ODell Apr 4 '15 at 18:15
  • @NickODell it doesn't but each party can get their public keys using their own wallets and then combine them to create a multisig address. – George Kimionis Apr 5 '15 at 3:48
  • Oh, I see. Good point. – Nick ODell Apr 5 '15 at 4:45
  • Yes, this only works for your addresses. – Giulio Prisco Apr 5 '15 at 7:30
  • OK, so each party can find their public keys and send them to the party that creates the multisig address. Bu1 1. Finding the public key may be too complex for casual users, 2. I don't see how users of services like Circle (the majority of new users) can find their public keys. – Giulio Prisco Apr 5 '15 at 8:26
2

This is possible, but there isn't really any code to do it automatically.

Instead of creating a scriptPubKey like

<pubkey 1> <pubkey 2> <pubkey 3> 2 OP_CHECKSIG

you'd make one like

OP_DUP OP_HASH160 <pubkeyhash 1> OP_EQUALVERIFY OP_ROT
OP_DUP OP_HASH160 <pubkeyhash 2> OP_EQUALVERIFY OP_ROT 
OP_DUP OP_HASH160 <pubkeyhash 3> OP_EQUALVERIFY OP_ROT 2 OP_CHECKSIG

Also, the code of the receiver would need to change, in order to recognize the output as spendable.

It's probably much easier to get their public keys. If they've used their addresses on the network, you can look it up using https://blockchain.info/q/pubkeyaddr/<addr>

Example: https://blockchain.info/q/pubkeyaddr/1snowqQP5VmZgU47i5AWwz9fsgHQg94Fa

Or, you can use George Kimionis's method to decode addresses.

  • Thanks Nick, could you point me to George Kimionis's method to decode addresse? – Giulio Prisco Apr 5 '15 at 8:19
  • That's just the answer below. – Nick ODell Apr 5 '15 at 8:20
  • A problem is that many casual users don't know their public keys and are unable to find them, and others (e.g. Circle etc.) can't know them at all. – Giulio Prisco Apr 5 '15 at 8:20
  • oops sorry I didn't see that – Giulio Prisco Apr 5 '15 at 8:22
  • @NickODell Wow! Have you actually run this script? I'll give it a shot on testnet, bc as you know I love script stuff – Wizard Of Ozzie Apr 6 '15 at 3:24

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.