Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: bit_kevin on June 10, 2013, 04:37:14 PM



Title: In what situation vout[N]->scriptPubKey->addresses can be more than one address?
Post by: bit_kevin on June 10, 2013, 04:37:14 PM
why vout[N]->scriptPubKey->addresses set as an array, I saw most of them just one address in it.

In what situation vout[N]->scriptPubKey->addresses can be more than one address?

example raw Tx vout:
Code:
    "vout" : [
        {
            "value" : 1.01839070,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 291921b5e6a69b8fd69e3028781788bb25253e4a OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914291921b5e6a69b8fd69e3028781788bb25253e4a88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "14kJp3c6FVRQgNHpjsiisuKWqPqj58FB9p"
                ]
            }
        },
        {
            "value" : 50.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 9f1c05f9200f65712601f6c74f9d22b31aa8d12b OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a9149f1c05f9200f65712601f6c74f9d22b31aa8d12b88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "1FWJ1bb2JiGZqKVnDZzyZoPqqXebpyWUKW"
                ]
            }
        }
    ],




Title: Re: In what situation vout[N]->scriptPubKey->addresses can be more than one address?
Post by: grue on June 10, 2013, 04:48:46 PM
why vout[N]->scriptPubKey->addresses set as an array, I saw most of them just one address in it.

In what situation vout[N]->scriptPubKey->addresses can be more than one address?
multisig/multiaddress transactions.


Title: Re: In what situation vout[N]->scriptPubKey->addresses can be more than one address?
Post by: bit_kevin on June 10, 2013, 04:55:59 PM
why vout[N]->scriptPubKey->addresses set as an array, I saw most of them just one address in it.

In what situation vout[N]->scriptPubKey->addresses can be more than one address?
multisig/multiaddress transactions.

could you please show me an exist Tx id like this?


Title: Re: In what situation vout[N]->scriptPubKey->addresses can be more than one address?
Post by: kjj on June 10, 2013, 07:51:27 PM
I suspect that there are some in the chain, but I'm not sure how to search for them.  These days, we (generally) use P2SH instead of plain multisig.  In P2SH, the address shown is the hash of the redemption script, so just one address is shown (starting with a 3).