bitcoind
has a decodescript
method.
$ bitcoin-cli decodescript "512102974ffd58d960908d6f2930fbcc4aa288580d05b35a70869e9a8ada3d080acf392103ef884166c7bd20324fd7f959dc680989a6a8b0d62c348defa900fcd4d31200f152ae"
{
"asm": "1 02974ffd58d960908d6f2930fbcc4aa288580d05b35a70869e9a8ada3d080acf39 03ef884166c7bd20324fd7f959dc680989a6a8b0d62c348defa900fcd4d31200f1 2 OP_CHECKMULTISIG",
"reqSigs": 1,
"type": "multisig",
"addresses": [
"1CmMoanE9uahYETLahBTGZSFZSQGV8ADrR",
"12z2brRNYFkqJe3zP58uoiGcLqDxfk6J7r"
],
"p2sh": "34EJTjAmEPbPGXAPQWU7sn4beoZyGTTxBw",
"segwit": {
"asm": "0 a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
"hex": "0020a45407120f912ef91ecd7e66a27cb4dc106f962172470b1b39c1bb5008898277",
"reqSigs": 1,
"type": "witness_v0_scripthash",
"addresses": [
"bc1q532qwys0jyh0j8kd0en2yl95msgxl93pwfrskxeecxa4qzyfsfmsfgd3m5"
],
"p2sh-segwit": "32KAK2XxwcYPc5iu3tNoXv3ksu4Gf3NsH3"
}
}
bitcoin-core.cli getrawtransaction 75b431e0a8c4617ca8adefe593ba66aa30907742b6dc8772761bfe7edabd74b4 true
., docs: bitcoincore.org/en/doc/22.0.0/rpc/rawtransactions/… This produces better output than some online tracker disassembles e.g. blockchain.com/explorer/transactions/btc/… which sometimes fail to show things correctly for non standard transactions.