Bitcoin Asked by Mars Lee on October 23, 2021
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
?
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 (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.
Answered by darosior on October 23, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP