Author

Topic: More than one address within each vout? (Read 1143 times)

kjj
legendary
Activity: 1302
Merit: 1026
October 18, 2012, 10:29:10 AM
#6
In theory, you should be able to create scripts that could be satisfied with multiple keys.  In practice, you'd usually do this with P2SH, at least now, and the hash of the script becomes the address.
legendary
Activity: 1974
Merit: 1029
October 18, 2012, 09:12:22 AM
#5
I think never.

It may contain multiple vouts, but each should have only one address.  Even with multisig, I think the address shown would be the hash of the multisig script.

Then it's funny that the field is called "addresses" instead of "address" and that it's actually an array, instead of a plain scalar:

Code:
    "vout" : [
        {
            "value" : 0.01055000,
            "n" : 0,
            "scriptPubKey" : {
                [some stuff],
                "addresses" : [
                    "17BXw4qwrKv8bd8gLZtYj75V368K88GJW6"
                ]
            }
        },

vs (hypothetical):

Code:
    "vout" : [
        {
            "value" : 0.01055000,
            "n" : 0,
            "scriptPubKey" : {
                [some stuff],
                "address" : "17BXw4qwrKv8bd8gLZtYj75V368K88GJW6"
            }
        },

There must be some reason to this.
member
Activity: 90
Merit: 10
October 15, 2012, 12:26:37 PM
#4
Thanks guys!

And if someone can find a counterexample, please let me know!
kjj
legendary
Activity: 1302
Merit: 1026
October 15, 2012, 11:02:04 AM
#3
I think never.

It may contain multiple vouts, but each should have only one address.  Even with multisig, I think the address shown would be the hash of the multisig script.
hero member
Activity: 651
Merit: 501
My PGP Key: 92C7689C
October 15, 2012, 10:46:28 AM
#2
If you run bitcoind getrawtransaction abcd1234... 1 you get a fairly complex JSON object with all the information about the given transaction.  My question concerns the "addresses" field deep inside each "vout": if I understand regular Bitcoin transactions correctly, this array should usually contain only one address; on what circumstances would it contain more than one address?  Also, could someone point me towards one transaction (either mainchain or testchain) where more than one address is used?


Have a look at output #1 in the following testnet transaction:

http://blockexplorer.com/testnet/tx/829ce39233f7a073e4ffc4c7b594209a06f1987c86c51c17fcfcbdd2393bcdbf

This has two addresses.  Multi-signature transactions would use more than one address, but I'm not sure if this is an example of such.
member
Activity: 90
Merit: 10
October 15, 2012, 10:10:16 AM
#1
If you run bitcoind getrawtransaction abcd1234... 1 you get a fairly complex JSON object with all the information about the given transaction.  My question concerns the "addresses" field deep inside each "vout": if I understand regular Bitcoin transactions correctly, this array should usually contain only one address; on what circumstances would it contain more than one address?  Also, could someone point me towards one transaction (either mainchain or testchain) where more than one address is used?
Jump to: