-
Notifications
You must be signed in to change notification settings - Fork 26
Improve multisig UX: Add --out-file parameter and enhance sign-tx
#1127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
af22be3 to
40a10b4
Compare
--out-file parameter and enhance sign-tx
…to enhancement/option-to-save-tx-cbor
| { | ||
| // 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()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
| // 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")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A this point I would parse MultiSigTransactionData instead of manually traversing its format
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