I think about "inputs": "script_asm", "required_signatures", "type"; "outputs": "required_signatures", "type". What do you think ?
Looks good as long as it supports SegWit, otherwise it won't recognize them.
Based the description:
github.com/blockchain-etl/bitcoin-etl-airflow - transactions.json#L125-L127 {
"name": "type",
"type": "STRING",
"description": "The address type of the spent output"
},
Alternatively, for bitcoin-cli / console: look for
OP_CHECKMULTISIG or
OP_CHECKMULTISIGVERIFY at the end of the script.
That's
0xAE or
0xAF at the end of either asm or hex.
If it is SegWit, it should have "
txinwitness" and it's at the end of it.