Can a scriptPubKey have multiple addresses?

2

2

When working directly with bitcoind, I can getRawTransaction for any transaction in the network. The vout has multiple outgoing addresses usually which contain a scriptPubKey. The scriptPubKey has a field called addresses, which is an array. I've only seen transactions with one address in this field. Is it possible to have more, if so, what does that mean?

Shamoon

Posted 2012-09-13T12:14:42.767

Reputation: 2 689

Answers

4

Any of the addresses in that array can spend that output. Multisig transactions will give you multiple addresses there.

theymos

Posted 2012-09-13T12:14:42.767

Reputation: 8 228

So, if it's a 1 of 3 raw multisig, then it will list all three addresses? And if it's a 2 of 3, then it will list no addresses because no single address can spend the UTXO?morsecoder 2014-10-16T19:00:35.367

Nope, I just found this transaction, which disproves my theory. If it's an n of m raw multisig output script, all m addresses are given in the scriptPubKey array.

morsecoder 2014-10-16T22:17:58.223