<p>The website displays the <code>scriptPubKey</code> of the first output as if it was a P2SH (more commonly used for multisig), but it's not.</p>
<p>This is a bare multisig. As another explorer example, <a href="https://blockstream.info/tx/56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970?expand" rel="nofollow noreferrer">Esplora displays it more accurately</a> (there is no address for this Script type).</p>
<p>The <code>addresses</code> field of <code>getrawtransaction</code> (and a few other commands) output will for bare multisig outputs give you the P2PKH address of each of the key used in the multisig.</p>

CC BY-SA 4.0
2020-07-21T09:24:34.830Z
What do you mean the scriptPubKey of the first output? There are many fields in scriptPubKey.
Mars Lee
CC BY-SA 4.0
2020-07-21T09:27:10.887Z
So those who own these three addresses can spend the bitcoin?
Mars Lee
CC BY-SA 4.0
2020-07-21T09:39:47.243Z
*1st question:* I mean the actual `scriptPubkey` (or output locking script), not the JSON entry of the `getrawtransaction` output.
*2nd question:* In this specific case (2 of 3), 2 of them agreeing can.
Antoine Poinsot
CC BY-SA 4.0
2020-07-21T09:45:58.200Z
Last question. Where can I find the actual `scriptPubkey `? Thank you.
Mars Lee
CC BY-SA 4.0
2020-07-21T10:25:26.173Z
The actual scriptPubkey is represented as hexadecimal in the `["scriptPubkey"]["hex"]` JSON entry.
Antoine Poinsot
CC BY-SA 4.0
2020-07-21T09:07:54.603Z
2020-07-21T09:14:33.850Z
2020-07-21T09:14:33.850Z
Antoine Poinsot
<p>Run this command:</p>
<p><code>bitcoin-cli getrawtransaction 56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970 2</code></p>
<p>You will see the first vout is a multisig as follow:</p>
<pre><code> {
      &quot;value&quot;: 0.04030000,
      &quot;n&quot;: 0,
      &quot;scriptPubKey&quot;: {
        &quot;asm&quot;: &quot;2 02c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb926242 033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d 036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a 3 OP_CHECKMULTISIG&quot;,
        &quot;hex&quot;: &quot;522102c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb92624221033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d21036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a53ae&quot;,
        &quot;reqSigs&quot;: 2,
        &quot;type&quot;: &quot;multisig&quot;,
        &quot;addresses&quot;: [
          &quot;1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech&quot;,
          &quot;1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW&quot;,
          &quot;1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF&quot;
        ]
      }
 },
</code></pre>
<p>And from <a href="https://bitinfocharts.com/bitcoin/tx/56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970#perv=5LB2z&amp;next=&amp;" rel="nofollow noreferrer">bitinfochart</a>, we can see the destination address is not</p>
<ol>
<li><code>1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech</code></li>
<li><code>1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW</code></li>
<li><code>1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF</code></li>
</ol>
<p>but <code>3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4</code></p>
<p>Can someone tell me how to get the destination address, <code>3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4</code>?</p>

CC BY-SA 4.0
2020-07-21T10:28:02.337Z
You keep overwriting my edits but you seem to misunderstand their purpose. See my answer, `3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4` **is not** the "destination address": their is no concept of address for the bare multisig `scriptPubKey`s. The explorer you consulted misleaded you.
Antoine Poinsot
<bitcoin-core><bitcoind><multi-signature><bitcoin-cli>
How to know the destination address of a multisig?
Mars Lee
# How to know the destination address of a multisig?

(Asked by: username_0 on 2020-07-21)

Run this command:
bitcoin-cli getrawtransaction 56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970 2
You will see the first vout is a multisig as follow:
 {
      "value": 0.04030000,
      "n": 0,
      "scriptPubKey": {
        "asm": "2 02c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb926242 033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d 036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a 3 OP_CHECKMULTISIG",
        "hex": "522102c08786d63f78bd0a6777ffe9c978cf5899756cfc32bfad09a89e211aeb92624221033e81519ecf373ea3a5c7e1c051b71a898fb3438c9550e274d980f147eb4d069d21036d568125a969dc78b963b494fa7ed5f20ee9c2f2fc2c57f86c5df63089f2ed3a53ae",
        "reqSigs": 2,
        "type": "multisig",
        "addresses": [
          "1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech",
          "1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW",
          "1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF"
        ]
      }
 },

And from bitinfochart, we can see the destination address is not

1PfTD843HiN2PPpxFnMwyxN7se6MEf2ech
1JXc8zsSeAPwqfAzLbBnZxNTfetZexH2bW
1Ng4YU2e2H3E86syX2qrsmD9opBHZ42vCF

but 3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4
Can someone tell me how to get the destination address, 3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4?

**Tags:** bitcoin-core, bitcoind, multi-signature, bitcoin-cli

> **Comments:**
> **username_1**: You keep overwriting my edits but you seem to misunderstand their purpose. See my answer, `3844dWM7n5c1oAYhtQc5uLtKB6TjN5PSW4` **is not** the "destination address": their is no concept of address for the bare multisig `scriptPubKey`s. The explorer you consulted misleaded you.  

---

## 1 answers

### Answer by username_1 on 2020-07-21. Score: 0 | Accepted answer

The website displays the `scriptPubKey` of the first output as if it was a P2SH (more commonly used for multisig), but it's not.

This is a bare multisig. As another explorer example, [Esplora displays it more accurately](https://blockstream.info/tx/56214420a7c4dcc4832944298d169a75e93acf9721f00656b2ee0e4d194f9970?expand) (there is no address for this Script type).

The `addresses` field of `getrawtransaction` (and a few other commands) output will for bare multisig outputs give you the P2PKH address of each of the key used in the multisig.

> **Comments:**
> **username_0**: What do you mean the scriptPubKey of the first output? There are many fields in scriptPubKey.  
> **username_0**: So those who own these three addresses can spend the bitcoin?  
> **username_1**: *1st question:* I mean the actual `scriptPubkey` (or output locking script), not the JSON entry of the `getrawtransaction` output. *2nd question:* In this specific case (2 of 3), 2 of them agreeing can.  
> **username_0**: Last question. Where can I find the actual `scriptPubkey `? Thank you.  
> **username_1**: The actual scriptPubkey is represented as hexadecimal in the `["scriptPubkey"]["hex"]` JSON entry.  

---

