Post
Topic
Board Development & Technical Discussion
Re: How to find multisignature transactions ?
by
kristiano92
on 06/10/2020, 16:45:58 UTC
Thanks for this explanation Smiley Is it possible to decode also outputs in this way to check that it is multisig address ?

No, you can't even know the script itself before the address is used as input.

On a side note, when Taproot is activated on Bitcoin network, you only can see part of the script used to redeem input.


Okay Smiley So I am not able to check that transactions outputs are P2SH-Multisig ?


Quote
3. Decode the script from vin -> scriptsig -> asm. Only take hex script after last "[ALL]"

Command :

Code:
decodescript 532102002a57268073cbc5472d35d8f8fae2c52825241592f53e53ae516913d8c82bd121026c1061b95ccfc52594c9b376382e2f0240a523b3b1dc5db6a9cdd9730a4a0c2121029e8c3ae6c0516df4075089ab9475c9335985569ac0f3b9f1a4b0d946785937cd2102c6a7c72de9221cba7029f1b920a86bb84997d9c91a2e4428b1397cba669dd3162103ba7c7d7b8d2379de450441445c30a638c555305cbe044abb88f10643d9621bf055ae

The output :

Code:
{
  "asm": "3 02002a57268073cbc5472d35d8f8fae2c52825241592f53e53ae516913d8c82bd1 026c1061b95ccfc52594c9b376382e2f0240a523b3b1dc5db6a9cdd9730a4a0c21 029e8c3ae6c0516df4075089ab9475c9335985569ac0f3b9f1a4b0d946785937cd 02c6a7c72de9221cba7029f1b920a86bb84997d9c91a2e4428b1397cba669dd316 03ba7c7d7b8d2379de450441445c30a638c555305cbe044abb88f10643d9621bf0 5 OP_CHECKMULTISIG",
  "reqSigs": 3,
  "type": "multisig",
  "addresses": [
    "1LqxDSWQLcg3nKvmWNAGoADMPzswHpLcKj",
    "1NTkRiGiZP1FoSb6JkraMH4TyoKG3WMXzT",
    "1D7Wmurjy264dpZK8LdJ1xc3f6ALAcNJAx",
    "1HapYFsTiZBdXe1L1hegv11yM3apJWxZui",
    "1Fdhk674u3WejXsJmpxsyQss5VMvYd8j87"
  ],
  "p2sh": "3FuqMT3VeyRhB917aiJUeWSn2jRt4M3hw8",
  "segwit": {
    "asm": "0 259ea6036131f75feb83db7882dfd5a91fb9bcebb270e3c2f68991c54a64b2dc",
    "hex": "0020259ea6036131f75feb83db7882dfd5a91fb9bcebb270e3c2f68991c54a64b2dc",
    "reqSigs": 1,
    "type": "witness_v0_scripthash",
    "addresses": [
      "bc1qyk02vqmpx8m4l6urmdug9h744y0mn08tkfcw8shk3xgu2jnyktwqnxdsjq"
    ],
    "p2sh-segwit": "389rC5x48fCbcmsWirjyGorUsS4mf7Ldwx"
  }
}

Could you explain what params "ps2h" and "p2sh-segwit mean ? What are these two addresses: "bc1qyk02vqmpx8m4l6urmdug9h744y0mn08tkfcw8shk3xgu2jnyktwqnxdsjq" and "389rC5x48fCbcmsWirjyGorUsS4mf7Ldwx" ?