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


SHOW_TXID,                
    SHOW_DETAILS,             
    SHOW_DETAILS_AND_PREVOUT  
};
CScript ParseScript(const std::string& s);
std::string ScriptToAsmStr(const CScript& script, const bool fAttemptSighashDecode = false);
[[nodiscard]] bool DecodeHexTx(CMutableTransaction& tx, const std::string& hex_tx, bool try_no_witness = false, bool try_witness = true);
[[nodiscard]] bool DecodeHexBlk(CBlock&, const std::string& strHexBlk);
bool DecodeHexBlockHeader(CBlockHeader&, const std::string& hex_header);
/**
 * Parse a hex string into 256 bits
 * @param[in] strHex a hex-formatted, 64-character string
 * @param[out] result the result of the parsing
 * @returns true if successful, false if not
 *
 * @see ParseHashV for an RPC-oriented version of this
 */
bool ParseHashStr(const std::string& strHex, uint256& result);
std::vector<unsigned char> ParseHexUV(const UniValue& v, const std::string& strName);
int ParseSighashString(const UniValue& sighash);
UniValue ValueFromAmount(const CAmount amount);
std::string FormatScript(const CScript& script);
std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0);
std::string SighashToStr(unsigned char sighash_type);
void ScriptToUniv(const CScript& script, UniValue& out, bool include_hex = true, bool include_address = false);
void TxToUniv(const CTransaction& tx, const uint256& block_hash, UniValue& entry, bool include_hex = true, int serialize_flags = 0, const CTxUndo* txundo = nullptr, TxVerbosity verbosity = TxVerbosity::SHOW_DETAILS);
#endif