feat(jm-wallet): --input-utxo flag for send by GuTS805 · Pull Request #589 · joinmarket-ng/joinmarket-ng · GitHub
Skip to content

feat(jm-wallet): --input-utxo flag for send - #589

Merged
github-actions[bot] merged 1 commit into
joinmarket-ng:mainfrom
GuTS805:feat/587-cli-input-utxo
Aug 12, 2026
Merged

feat(jm-wallet): --input-utxo flag for send#589
github-actions[bot] merged 1 commit into
joinmarket-ng:mainfrom
GuTS805:feat/587-cli-input-utxo

Conversation

@GuTS805

@GuTS805 GuTS805 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Follow up to #588 (this is stacked on it, so it depends on that one going in first - diff will look bigger than it actually is until then, sorry about that).

Adds --input-utxo TXID:VOUT to jm-wallet send, repeatable, mutually exclusive with --select-utxos. This is the CLI part i mentioned in #587 - now that prepare_direct_send/resolve_input_utxos accept an explicit list, the flag itself ended up pretty thin like i expected.

behaviour is the same as the API side:

  • every utxo you list has to be unfrozen and belong to --mixdepth, otherwise it errors out with why
  • works for sweeps too, --amount 0 + --input-utxo sweeps exactly what you listed and nothing else
  • fidelity bonds only if expired and this wallet can actually sign them
  • no falling back to auto selection if something in the list doesnt work, it just fails

One thing i want to flag: i did NOT touch jm-taker coinjoin here even tho m0wer mentioned it too. Reason is the coinjoin utxo selection is more involved - it has to interact with maker fees/podle stuff and can pull in more utxos beyond what you preselected if the value isnt enough (this already happens today with --select-utxos). Doing the same "exact set or error" rule there would need its own discussion since it might not even be the right behaviour for coinjoin. Happy to take a stab at it separately once we agree on what it should actually do, or you can if you'd rather.

test plan:

  • new unit tests for the _send_transaction path with --input-utxo (spends only the named utxo, unknown utxo exits without broadcasting) + a CLI-level test for the mutual exclusivity check
  • full jmwallet --help sort test still passes (flag is alphabetically placed)
  • regenerated completions for jm-wallet only, ruff clean
  • ran the full jmwallet/jmwalletd suite, only the 7 pre-existing WSL chmod failures unrelated to this

@m0wer
m0wer force-pushed the feat/587-cli-input-utxo branch from ba03043 to 44e0198 Compare August 11, 2026 15:56
@GuTS805
GuTS805 force-pushed the feat/587-cli-input-utxo branch from 44e0198 to 24e0b51 Compare August 11, 2026 17:30
@GuTS805

GuTS805 commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

@GuTS805
GuTS805 force-pushed the feat/587-cli-input-utxo branch from 24e0b51 to 7b0bdd8 Compare August 11, 2026 23:05
Adds a repeatable --input-utxo TXID:VOUT flag to jm-wallet send,
mutually exclusive with --select-utxos. When given, it resolves the
listed outpoints through the same resolve_input_utxos validation used
by direct-send (unfrozen, correct mixdepth, expired/signable fidelity
bonds only) and spends exactly those UTXOs instead of auto-selecting,
including for sweeps. Anything unusable exits with a reason rather
than falling back to automatic selection.

Follow-up to the direct-send input_utxos support (issue joinmarket-ng#587).
jm-taker coinjoin is intentionally left out of this change: its UTXO
selection has to interoperate with maker fee negotiation and can
expand beyond the taker's own preselected inputs, so it needs its own
design pass rather than reusing this same "exact set or error" rule.

Changelog: Add a repeatable --input-utxo flag to jm-wallet send for explicit coin control
@m0wer
m0wer force-pushed the feat/587-cli-input-utxo branch from 7b0bdd8 to 924c433 Compare August 12, 2026 06:23
@m0wer

m0wer commented Aug 12, 2026

Copy link
Copy Markdown
Member

/fast-forward

@github-actions

Copy link
Copy Markdown

@github-actions
github-actions Bot merged commit 924c433 into joinmarket-ng:main Aug 12, 2026
19 checks passed
@GuTS805
GuTS805 deleted the feat/587-cli-input-utxo branch August 12, 2026 11:51
@m0wer m0wer added the SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin. label Aug 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

SoB Issues, PRs, tasks, and discussions related to Summer of Bitcoin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants