Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
I need to know all the utxos I have in my wallet, including the immature ones. When using listunspent, the immature coinbases are not returned:
❯ bitcoin-cli listtransactions
[
{
"address": "bcrt1q0epv47eaxhyenhqcjp8v7wytjx26k35r6w2py6",
"category": "immature",
"amount": 50.00000000,
"label": "",
"vout": 0,
"confirmations": 1,
"generated": true,
"blockhash": "334996db387320711e1176f2591dfc16fe8d92f617af47ae65b97c2a817758b0",
"blockheight": 102,
"blockindex": 0,
"blocktime": 1658995253,
"txid": "480f0340a98755cfb095743b5464e87d0cf1b0200d204507ec8448962bcafbe6",
"walletconflicts": [
],
"time": 1658995253,
"timereceived": 1658995253,
"bip125-replaceable": "no"
}
]
❯ bitcoin-cli listunspent
[
]
Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
What do you think of adding a include_immature_coinbase (default to false) parameter to listunspent? If you think it'd be useful, I can start working on this myself.
Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
At the moment I'm calling listtransaction and adding to the utxo list every immature output I see (https://github.com/bitcoindevkit/bdk/pull/687). This works just fine, but having the include_immature parameter would make the code a bit cleaner (and it would save one RPC call!).