Skip to content

Commit

Permalink
Merge PR cosmos#2455: Print out all 3 public key encoding with gaiadebug
Browse files Browse the repository at this point in the history
  • Loading branch information
zmanian authored and cwgoes committed Oct 9, 2018
1 parent cd21427 commit d6be4fc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cmd/gaia/cmd/gaiadebug/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,17 @@ func runPubKeyCmd(cmd *cobra.Command, args []string) error {
if err != nil {
return err
}

consenusPub, err := sdk.Bech32ifyConsPub(pubKey)
if err != nil {
return err
}
fmt.Println("Address:", pubKey.Address())
fmt.Printf("Hex: %X\n", pubkeyBytes)
fmt.Println("JSON (base64):", string(pubKeyJSONBytes))
fmt.Println("Bech32 Acc:", accPub)
fmt.Println("Bech32 Val:", valPub)
fmt.Println("Bech32 Validator Operator:", valPub)
fmt.Println("Bech32 Validator Consensus:", consenusPub)
return nil
}

Expand Down

0 comments on commit d6be4fc

Please sign in to comment.