Electrum: display redeem script of a P2SH utxo I use Electrum with a multisig wallet. I would like to figure out how to prove ownership of a &quot;coin&quot;.
I understand that I need to share the whole redeem script so that it's hash can be verified against the UTXO I want to prove ownership off. And then I need to sign a message using at least N of M (as defined when creating the multisig wallets) private keys corresponding to the public keys in the redeem script.
My question is how can I display the redeem script in Electrum, in a human readable way that allows to clearly identify N, M and all of the public keys?
How can I display the data structure encoding the redeem script on the blockchain, whose hash constitutes the ps2h address (without spending the UTXO)?
I did not find a good answer, so I coded a small GUI to perform signatures using private keys, verify a signature using a public key (or an address) and verify a p2sh M-of-N multisig script against a list of N public keys and the parameter M.
This information is easy to find with a simple right click on an address in Electrum (View Details).
https://github.com/PiRK/signverify
I made it primarily for BCHA, but it works for BTC if you paste a legacy p2sh address instead of a CashAddr.