Skip to content

refactor(pay): make autoMinUtxo opt-in via BuildOptions#320

Merged
solidsnakedev merged 5 commits into
mainfrom
refactor/autoMinUtxo-opt-in
Apr 29, 2026
Merged

refactor(pay): make autoMinUtxo opt-in via BuildOptions#320
solidsnakedev merged 5 commits into
mainfrom
refactor/autoMinUtxo-opt-in

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

#311 merged auto min-UTxO enforcement that always silently bumps payToAddress outputs. This is dangerous for script-address outputs where validators check exact values, breaks budget determinism for batch payouts, and prevents testing error paths.

Make autoMinUtxo opt-in: add it to BuildOptions (off by default) with a per-call override on PayToAddressParams. Revert the UnfrackChangeHandling test changes since default-off restores pre-#311 behavior.

Add autoMinUtxo flag to TxBuilderConfig (builder-level default) and
PayToAddressParams (per-call override). Default is off, preserving
existing behavior. When enabled, outputs below the protocol minimum
are bumped up automatically.

Revert UnfrackChangeHandling test values to pre-bump defaults.
autoMinUtxo is a per-build concern, not a per-builder one. Move it to
BuildOptions so it is passed to .build() alongside other build-time
settings like protocolParameters and coinSelection.
@solidsnakedev solidsnakedev merged commit 52dc09a into main Apr 29, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant