fix: --output-document
flag for multisign
#363
Merged
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.
Cherry pick the fix from cosmos@0b5e7ed
Resolves celestiaorg/celestia-app#2980
Testing
Before
The output gets dumped to the terminal
$ celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document signedTx.json --chain-id $CHAIN_ID {"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"celestia17rehcgutjfra8zhjl8675t8hhw8wsavzzutv06","to_address":"celestia1m50mjfm6uktkxysc6tpqhq6u56smc0jcvln72p","amount":[{"denom":"utia","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AxMTEFDH8oyBPIH+d2MKfCIY1yAsEd0HVekoPaAOiu9c"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ax0ANkTPWcCDWy9O2TcUXw90Z0DxnX2zqPvhi4VJPUl5"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlUwWCGLzhclCMEKc2YLEap9H8JT5tWq1kB8BagU1TVH"}]},"mode_info":{"multi":{"bitarray":{"extra_bits_stored":3,"elems":"YA=="},"mode_infos":[{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}},{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}}]}},"sequence":"0"}],"fee":{"amount":[{"denom":"utia","amount":"1000"}],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["CkBX8yw0SnvYD3Is60cXErxdwRhcXL864parxmgw9f77ER3hAwMUFr7H1rgY2GcZ37zFwRpvJL3jESGjYsImemu/CkAcQwYaVho6JgmcF1JjOcmmfA4TyVlGBySx2FSQHDb58Ta/5M5rTzgy2/gpBbcEjFzk7K4GSXkFIY8pmJdWB6jR"]}%
After
The output goes to the file
$ ./build/celestia-appd tx multisign unsignedTx.json multisig test1sig.json test2sig.json --output-document signedTx.json --chain-id $CHAIN_ID $ cat signedTx.json {"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"celestia17rehcgutjfra8zhjl8675t8hhw8wsavzzutv06","to_address":"celestia1m50mjfm6uktkxysc6tpqhq6u56smc0jcvln72p","amount":[{"denom":"utia","amount":"1"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.multisig.LegacyAminoPubKey","threshold":2,"public_keys":[{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AxMTEFDH8oyBPIH+d2MKfCIY1yAsEd0HVekoPaAOiu9c"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"Ax0ANkTPWcCDWy9O2TcUXw90Z0DxnX2zqPvhi4VJPUl5"},{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"AlUwWCGLzhclCMEKc2YLEap9H8JT5tWq1kB8BagU1TVH"}]},"mode_info":{"multi":{"bitarray":{"extra_bits_stored":3,"elems":"YA=="},"mode_infos":[{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}},{"single":{"mode":"SIGN_MODE_LEGACY_AMINO_JSON"}}]}},"sequence":"0"}],"fee":{"amount":[{"denom":"utia","amount":"1000"}],"gas_limit":"210000","payer":"","granter":""},"tip":null},"signatures":["CkBX8yw0SnvYD3Is60cXErxdwRhcXL864parxmgw9f77ER3hAwMUFr7H1rgY2GcZ37zFwRpvJL3jESGjYsImemu/CkAcQwYaVho6JgmcF1JjOcmmfA4TyVlGBySx2FSQHDb58Ta/5M5rTzgy2/gpBbcEjFzk7K4GSXkFIY8pmJdWB6jR"]}