Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Remove Assembled transaction and simulate and assemble functionality from the client.
Why
Moving the logic into the stellar-cli.
It used to be part of the CLI and when the RPC client was separated from the CLI repo, the assembled tx type and it's related logic got pulled over into the CLI, but it's wrapped up in CLI logic.
The assembly logic would be useful to live somewhere else on its own, or as part of some sort of Rust Stellar SDK if one ever exists, but at the moment the boundary of that type is messy, and it's implementation has logging and other applications concerns wrapped up in it.
In the interest of focusing in the near term on the best CLI user experience, and not getting too caught up in "finding the ultimate code structure" for this which isn't a primary goal, moving it seems like the reasonable thing to do right now, so that through the course of evolving the CLI this type can evolve and find it's place and hopefully surface a better structure to separate into it's own "help you assemble txs" thing, or possibly back into the RPC if at that point it does less.
My hope is that by bringing it close to the CLI, who is the primary user, and unpacking and repacking it, we'll find an API and interface that is a sweet spot to either package on its own, or include back into the rpc client, and potentially use as a guide to implement similar elsewhere or potentially influence the api of the rpc. Likely some of this functionality will move into the xdr lib.
The Assembled type and related functionality are being added as much as possible as a simple copy-paste to limit unnecessary changes in: