CLI process transaction
Requires:
This MR:
1. Makes it possible to remove signatures from loaded transaction in TUI
(When Signed? checkbox is not selected). Previously loading an already signed transaction resulted in saving it always as signed.
2. Created clive process transaction command
that has the following options:
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * --from-file TEXT The file to load the transaction from. [required] │
│ --force-unsign --no-force-unsign Whether to force unsigning the transaction. [default: no-force-unsign] │
│ --already-signed-mode [error|override|multisign] How to handle the situation when transaction is already signed. [default: error] │
│ --profile-name TEXT The profile to use. (defaults to the last used profile) [default: alice] │
│ --password TEXT Password to unlock the wallet. │
│ --sign TEXT Key alias to sign the transaction with. │
│ --beekeeper-remote TEXT Beekeeper remote endpoint. (starts locally if not provided) [default: http://0.0.0.0:35381] │
│ --broadcast --no-broadcast Whether broadcast the transaction. (i.e. dry-run) [default: broadcast] │
│ --save-file TEXT The file to save the transaction to (format is determined by file extension - .bin or .json). │
│ --help -h Show this message and exit. │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
and features:
- could print out the transaction stored in
.bin/.jsonfile (--no-broadcast) - could broadcast the transaction stored in a file:
- if already signed - right away (
--broadcast) - if not signed - sign it with the working account keys (
--broadcast --sign --password)
- if already signed - right away (
- could specify how to treat already signed transaction when
--signand--passwordis already provided (--already-signed-modecouldoverridethe actual signature or add another one a.k.amulisignor treat such a situation aserrorby default) - could load unsigned transaction and save it as signed into a given file (
--save-file --sign --password) - could be used make the transaction file conversion
.bin->.jsonand.json->.bin - could remove the signature from loaded transaction (
--force-unsign)
Edited by Mateusz Żebrak