Is there any python library could be used to decodescript in output

For example decode the ScriptPubKey like

4104678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5fac

to some data like this

{
"result": {
    "asm": "04678afdb0fe5548271967f1a67130b7105cd6a828e03909a67962e0ea1f61deb649f6bc3f4cef38c4f35504e51ec112de5c384df7ba0b8d578a4c702b6bf11d5f OP_CHECKSIG",
    "reqSigs": 1,
    "type": "pubkey",
    "addresses": [
        "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
    ],
    "p2sh": "3DjjKyU38gSfuVxajV43MUy4vHkg1JVL7T"
},
"error": null,
"id": null
}

In general, something like the function in decodescript rpc.
http://chainquery.com/bitcoin-api/decodescript

Continue reading Is there any python library could be used to decodescript in output

Leave a Comment