I was playing around with a probably-too-cute script for LN channel smart contract, and was looking for something to decide for me if miniscript can infer the structure of the script.

f.e.

```
decodescript 82012088a914ffffffffffffffffffffffffffffffffffffffff8820ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffad51b2

{
  "asm": "OP_SIZE 32 OP_EQUALVERIFY OP_HASH160 ffffffffffffffffffffffffffffffffffffffff OP_EQUALVERIFY ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff OP_CHECKSIGVERIFY 1 OP_CHECKSEQUENCEVERIFY",
  "desc": "raw(82012088a914ffffffffffffffffffffffffffffffffffffffff8820ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffad51b2)#5guaahuv",
  "type": "nonstandard",
  "p2sh": "33YyjgxsJYwSi8Wbp7TaCSFAuJBoUfYWDQ",
  "segwit": {
    "asm": "0 99f5d0b69f9828fea9363198cf812e95d7fc5e94c7881092b8e3f43984c1bd5c",
    "desc": "addr(bc1qn86apd5lnq50a2fkxxvvlqfwjhtlch55c7yppy4cu06rnpxph4wqrar3md)#wtlf0gwk",
    "hex": "002099f5d0b69f9828fea9363198cf812e95d7fc5e94c7881092b8e3f43984c1bd5c",
    "address": "bc1qn86apd5lnq50a2fkxxvvlqfwjhtlch55c7yppy4cu06rnpxph4wqrar3md",
    "type": "witness_v0_scripthash",
    "p2sh-segwit": "3MRJN2wTnD2BVm31HLcBwueAYpbbximrtk"
  }
}
```

Since it's evaluated at "top level for `desc` it cannot get any meaningful structure from it. Perhaps in `segwit` it could try infering the miniscript in the segwit context


in.pushKV("vout", (int64_t)txin.prevout.n);
            UniValue o(UniValue::VOBJ);
            o.pushKV("asm", ScriptToAsmStr(txin.scriptSig, true));
            o.pushKV("hex", HexStr(txin.scriptSig));
            in.pushKV("scriptSig", o);
        }
        if (!tx.vin[i].scriptWitness.IsNull()) {
            UniValue txinwitness(UniValue::VARR);
            for (const auto& item : tx.vin[i].scriptWitness.stack) {
                txinwitness.push_back(HexStr(item));
            }
            in.pushKV("txinwitness", txinwitness);
        }
        if (have_undo) {
            const Coin& prev_coin = txundo->vprevout[i];
            const CTxOut& prev_txout = prev_coin.out;
            amt_total_in += prev_txout.nValue;
            if (verbosity == TxVerbosity::SHOW_DETAILS_AND_PREVOUT) {
                UniValue o_script_pub_key(UniValue::VOBJ);
                ScriptToUniv(prev_txout.scriptPubKey, o_script_pub_key, true, true);
                UniValue p(UniValue::VOBJ);
                p.pushKV("generated", bool(prev_coin.fCoinBase));
                p.pushKV("height", uint64_t(prev_coin.nHeight));
                p.pushKV("value", ValueFromAmount(prev_txout.nValue));
                p.pushKV("scriptPubKey", o_script_pub_key);
                in.pushKV("prevout", p);
            }
        }
        in.pushKV("sequence", (int64_t)txin.nSequence);
        vin.push_back(in);