Convert multi sig address to threshold + params

Hi,

Might be a dumb question. Can I convert a multisig address to its initial structure? Something like:

 const mparams = {
        version: 1,
        threshold: 2,
        addrs: [
            account1.addr,
            account2.addr
        ],
    };

I found the fromMultisigPreImgAddrs in the js-algorand-sdk, but I’d like something akin to reversing this step. Couldn’t find any code online for this.

Context: I want to get the threshold / version / addresses from a multisig address.

You can check whether a structure matches an address.
But you cannot do the conversion back if you don’t know the initial structure. This is because the address is essentially a hash of this structure and inverting a hash is not feasible (if you don’t know candidates for the values that have been hashed).

Ahh gotcha. Guess I’ll just have to buy a quantum computer and start breaking hashes :laughing: