-
Notifications
You must be signed in to change notification settings - Fork 102
Description
Describe the feature you'd like
Change handling is too simplistic. It's not possible to specify the position of the change output. That is critical for some smart contracts to work correctly, because the outputs positions are visible on-chain and controlled by the transaction builder.
It would be really useful to mark an output as a change output. This way a user can provide the minimum amounts the output is expected to have, and the library can calculate the change and put it in the marked output. Change outputs can easily be some script outputs with datums and complicated requirements for their positions.
Is your feature request related to a problem? Please describe.
Yes, change output is always added last and can't be controlled by users.
Describe the solution you'd like
Add an option to mark an output as "change" where the change would be added during building.
Additional context
No response
Would you be willing to implement it?
- Yes, I will implement it.