Send only confirmed coins ?
I would like to know if it is possible to send coins from confirmed parent transactions only and exclude unconfirmed ones.
If it is possible, how can I do it via command line ?
Electrum already prioritizes confirmed utxos over all else.
You mean you want it to return an error and fail sending if the send amount is over the total of confirmed utxos amounts?
Correct.
Also if there is a way to get the confirmed bitcoins then send them all while excluding unconfirmed transaction.
Alternatively, using "Max" feature when sending but exclude unconfirmed transactions.
I took a peek at the source code, and it's doable. You would need to pass an boolean arg through like 5 nested methods, but it's doable.
Currently the source can not do as you ask via CLI.
In GUI mode you can use coin control to manually select the utxos.
I will actually use the GUI to spend coins.
So the solution is enabling coin table and select the address / addresses to spend from ?
The only solution I came up with is using command line to list an export addresses with no pending transactions and use the GUI to select them
reopening. I think it would be useful to have that as an option.
In my recent experience, Electrum picked coins from an unconfirmed transaction with priority. It would be good to have some control over this.
If @ecdsa can craft us something on the next release, it will be perfect.
currently, miners do not take coin age into account in order to decide transaction priority. Thus, the only reason not to use the 'privacy' policy is that it uses unconfirmed inputs. The correct way to fix that is to have a single policy, that prioritizes confirmed inputs and then behaves like the current privacy coin chooser.
then we can remove the policy selector from the GUI, and replace it with an option to send only confirmed inputs.
I added the option, but I did not remove the coin selection policy choice; the privacy policy must first be fixed, so that it prioritizes confirmed inputs, when the option is disabled.