feat: add changeset tx type #189
Draft
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.
DEVSVCS-3460
This pull request introduces support for a new "Changeset" transaction type across several CLI commands, enabling users to output changes as YAML files for MCMS owned workflows. The implementation includes generating and writing changeset YAML files, updating handler logic to support the new transaction type, and refactoring CLI flags for consistency.
Support for "Changeset" Transaction Type and YAML File Generation:
Changesettransaction type to the transaction handling logic, enabling commands to output changes as YAML files instead of sending transactions directly. (cmd/client/tx.go[1] [2];cmd/client/client_factory.go[3]WriteChangesetFileutility to generate or append to changeset YAML files in the appropriate directory structure, supporting workflows that require durable, auditable change records. (cmd/common/utils.gocmd/common/utils.goR220-R263)cmd/account/link_key/link_key.go[1];cmd/account/unlink_key/unlink_key.go[2];cmd/secrets/common/handler.go[3] [4]Refactoring and Consistency Improvements:
AddRawTxFlagfunction withAddTxnTypeFlagsand ensuredAddSkipConfirmationis consistently used across all relevant CLI commands, allowing users to select transaction output type (regular, raw, ledger, or changeset) more flexibly. (cmd/account/link_key/link_key.go[1];cmd/account/unlink_key/unlink_key.go[2];cmd/secrets/create/create.go[3];cmd/secrets/delete/delete.go[4]Handler and Dependency Updates:
cmd/secrets/common/handler.go[1] [2];cmd/account/link_key/link_key.go[3];cmd/account/unlink_key/unlink_key.go[4];cmd/secrets/common/handler.go[5];cmd/secrets/delete/delete.go[6]Smart Contract Client Updates:
AllowlistRequestmethod in the workflow registry client to return a transaction output, supporting the new transaction type and enabling downstream logic to handle changeset generation. (cmd/client/workflow_registry_v2_client.gocmd/client/workflow_registry_v2_client.goL681-R712)