Current behavior:

```
src/bitcoin-cli -signet decodescript 2103d3b9c8cc852f3b4a06bad1711fd1a1761a592bf1475edc0a5f97b31759eba330ac736476a914b6e87320e876a740fc1365aeb1f4b6ab2fe4210b88ad53b268
```
```json
{
  "asm": "03d3b9c8cc852f3b4a06bad1711fd1a1761a592bf1475edc0a5f97b31759eba330 OP_CHECKSIG OP_IFDUP OP_NOTIF OP_DUP OP_HASH160 b6e87320e876a740fc1365aeb1f4b6ab2fe4210b OP_EQUALVERIFY OP_CHECKSIGVERIFY 3 OP_CHECKSEQUENCEVERIFY OP_ENDIF",
  "desc": "raw(2103d3b9c8cc852f3b4a06bad1711fd1a1761a592bf1475edc0a5f97b31759eba330ac736476a914b6e87320e876a740fc1365aeb1f4b6ab2fe4210b88ad53b268)#uul8nd2t",
  "type": "nonstandard",
  "p2sh": "2N62ryy2gBC2QBSdsm832Tv6qCW5py53wJn",
  "segwit": {
    "asm": "0 43c1d0387e91045591f19ff6d60af2bc0d91473b79dc3238aa9d0430f89741bc",
    "desc": "addr(tb1qg0qaqwr7jyz9ty03nlmdvzhjhsxez3em08wryw92n5zrp7yhgx7qj56vra)#ugngfnm5",
    "hex": "002043c1d0387e91045591f19ff6d60af2bc0d91473b79dc3238aa9d0430f89741bc",
    "address": "tb1qg0qaqwr7jyz9ty03nlmdvzhjhsxez3em08wryw92n5zrp7yhgx7qj56vra",
    "type": "witness_v0_scripthash",
    "p2sh-segwit": "2N9diLEHbASsz1oAeDQJPg5mb4LaAju9175"
  }
}
```

It would be nice if this (also) returned miniscript.

Perhaps `getaddressinfo` could do this as well (after #24148).

cc @sipa, @darosior 
return
         {
             {RPCResult::Type::STR, "asm", "Disassembly of the public key script"},
             {RPCResult::Type::STR, "desc", "Inferred descriptor for the output"},
             {RPCResult::Type::STR_HEX, "hex", "The raw public key script bytes, hex-encoded"},
             {RPCResult::Type::STR, "address", true, "The Bitcoin address (only if a well-defined address exists)"},
             {RPCResult::Type::STR, "type", "The type (one of: " + GetAllOutputTypes() + ")"},
         };
}
static std::vector<RPCResult> DecodeTxDoc(const std::string& txid_field_doc)
{
    return {
        {RPCResult::Type::STR_HEX, "txid", txid_field_doc},
        {RPCResult::Type::STR_HEX, "hash", "The transaction hash (differs from txid for witness transactions)"},
        {RPCResult::Type::NUM, "size", "The serialized transaction size"},
        {RPCResult::Type::NUM, "vsize", "The virtual transaction size (differs from size for witness transactions)"},
        {RPCResult::Type::NUM, "weight", "The transaction's weight (between vsize*4-3 and vsize*4)"},
        {RPCResult::Type::NUM, "version", "The version"},
        {RPCResult::Type::NUM_TIME, "locktime", "The lock time"},
        {RPCResult::Type::ARR, "vin", "",
        {
            {RPCResult::Type::OBJ, "", "",
            {
                {RPCResult::Type::STR_HEX, "coinbase", true, "The coinbase value (only if coinbase transaction)"},
                {RPCResult::Type::STR_HEX, "txid", true, "The transaction id (if not coinbase transaction)"},
                {RPCResult::Type::NUM, "vout", true, "The output number (if not coinbase transaction)"},