Improve multisig UX: Add --out-file parameter and enhance sign-tx#1127
Open
Improve multisig UX: Add --out-file parameter and enhance sign-tx#1127
--out-file parameter and enhance sign-tx#1127Conversation
af22be3 to
40a10b4
Compare
--out-file parameter and enhance sign-tx
…to enhancement/option-to-save-tx-cbor
LGLO
reviewed
Dec 19, 2025
| { | ||
| // Extract cborHex from the serialized transaction | ||
| let tx_json = serde_json::to_value(&tx_data.tx)?; | ||
| if let Some(cbor_hex) = tx_json.get("cborHex").and_then(|v| v.as_str()) { |
Contributor
There was a problem hiding this comment.
You have tx_data.tx that are bytes. Then you serialized it Cardano file JSON and then you take this field containing bytes of the transaction instead of using it directly.
You could just hex::encode(tx_data.tx), couldn't you?
LGLO
reviewed
Dec 19, 2025
| // Try to extract cborHex from transaction_to_sign format | ||
| if let Some(cbor_hex) = json_value | ||
| .get("transaction_to_sign") | ||
| .and_then(|v| v.get("tx")) |
Contributor
There was a problem hiding this comment.
A this point I would parse MultiSigTransactionData instead of manually traversing its format
LGLO
approved these changes
Dec 19, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Improves the multisig workflow by eliminating the need for manual
jqextraction of transaction CBOR hex. Adds an optional--out-fileparameter to governed-map commands and enhancessign-txto accept multiple input formats.Changes
1. Added
--out-fileto governed-map commandsinsert,update, andremovecommandscborHexto the specified file during multisig flows--out-filespecified butcborHexunavailable2. Enhanced
sign-txinput handlingtransaction_to_signJSON stringextract_cbor_hex()with deterministic parsing order (file → JSON → hex)3. Code quality improvements
PathBufinstead ofStringfor file paths (type safety)clap::ValueHint::FilePathfor better shell autocompletionExample Usage
Checklist
changelog.mdfor affected crate