docs: encode/decode transaction (#10133)
## Description Closes: #10102 <!-- Add a description of the changes that this PR introduces and the files that are the most critical to review. --> Adds examples for encoding/decoding a transaction using the CLI. Also fixes CLI use and description. --- ### Author Checklist *All items are required. Please add a note to the item if the item is not applicable and please add links to any relevant follow up issues.* I have... - [ ] included the correct `docs:` prefix in the PR title - [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting)) - [ ] provided a link to the relevant issue or specification - [ ] followed the [documentation writing guidelines](https://github.com/cosmos/cosmos-sdk/blob/master/docs/DOC_WRITING_GUIDELINES.md) - [ ] reviewed "Files changed" and left comments if necessary - [ ] confirmed all CI checks have passed ### Reviewers Checklist *All items are required. Please add a note if the item is not applicable and please add your handle next to the items reviewed if you only reviewed selected items.* I have... - [ ] confirmed the correct `docs:` prefix in the PR title - [ ] confirmed all author checklist items have been addressed - [ ] confirmed that this PR only changes documentation - [ ] reviewed content for consistency - [ ] reviewed content for thoroughness - [ ] reviewed content for spelling and grammar - [ ] tested instructions (if applicable)
This commit is contained in:
@@ -16,7 +16,7 @@ const flagHex = "hex"
|
||||
// it into a JSON-encoded transaction.
|
||||
func GetDecodeCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "decode [amino-byte-string]",
|
||||
Use: "decode [protobuf-byte-string]",
|
||||
Short: "Decode a binary encoded transaction string",
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
|
||||
@@ -17,7 +17,7 @@ func GetEncodeCommand() *cobra.Command {
|
||||
Use: "encode [file]",
|
||||
Short: "Encode transactions generated offline",
|
||||
Long: `Encode transactions created with the --generate-only flag and signed with the sign command.
|
||||
Read a transaction from <file>, serialize it to the Amino wire protocol, and output it as base64.
|
||||
Read a transaction from <file>, serialize it to the Protobuf wire protocol, and output it as base64.
|
||||
If you supply a dash (-) argument in place of an input filename, the command reads from standard input.`,
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
|
||||
Reference in New Issue
Block a user