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


if (!DecodeHexTx(mtx, request.params[0].get_str(), try_no_witness, try_witness)) {
        throw JSONRPCError(RPC_DESERIALIZATION_ERROR, "TX decode failed");
    }
    UniValue result(UniValue::VOBJ);
    TxToUniv(CTransaction(std::move(mtx)), uint256(), result, false);
    return result;
},
    };
}
static RPCHelpMan decodescript()
{
    return RPCHelpMan{
        "decodescript",
        "\nDecode a hex-encoded script.\n",
        {
            {"hexstring", RPCArg::Type::STR_HEX, RPCArg::Optional::NO, "the hex-encoded script"},
        },
        RPCResult{
            RPCResult::Type::OBJ, "", "",
            {
                {RPCResult::Type::STR, "asm", "Script public key"},
                {RPCResult::Type::STR, "desc", "Inferred descriptor for the script"},
                {RPCResult::Type::STR, "type", "The output type (e.g. " + GetAllOutputTypes() + ")"},
                {RPCResult::Type::STR, "address", true, "The Bitcoin address (only if a well-defined address exists)"},
                {RPCResult::Type::STR, "p2sh", true,
                 "address of P2SH script wrapping this redeem script (not returned for types that should not be wrapped)"},
                {RPCResult::Type::OBJ, "segwit", true,
                 "Result of a witness script public key wrapping this redeem script (not returned for types that should not be wrapped)",
                 {
                     {RPCResult::Type::STR, "asm", "String representation of the script public key"},