Skip to content
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

Convert Ledger secp256k1 privkey to proto.Message #7872

Closed
wants to merge 10 commits into from
Closed
2 changes: 1 addition & 1 deletion client/keys/show.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func runShowCmd(cmd *cobra.Command, args []string) (err error) {
return nil
}

return ledger.ShowAddress(*hdpath, info.GetPubKey(), sdk.GetConfig().GetBech32AccountAddrPrefix())
return ledger.ShowAddress(hdpath, info.GetPubKey(), sdk.GetConfig().GetBech32AccountAddrPrefix())
}

return nil
Expand Down
18 changes: 18 additions & 0 deletions crypto/codec/amino_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package codec

import "os"

// nolint: govet
func ExamplePrintRegisteredTypes() {
amino.PrintTypes(os.Stdout)
// Output:
// | Type | Name | Prefix | Length | Notes |
// | ---- | ---- | ------ | ----- | ------ |
// | PubKey | tendermint/PubKeySr25519 | 0x0DFB1005 | variable | |
Comment on lines +7 to +11
Copy link
Contributor Author

@amaury1093 amaury1093 Nov 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please note that I explicitly removed amino support for PrivKeyLedgerSecp256k1. I cannot see where it's needed, but if it's needed, I can add it back (in the same way we do for other pubkeys).

// | PubKey | tendermint/PubKeyEd25519 | 0x1624DE64 | variable | |
// | PubKey | tendermint/PubKeySecp256k1 | 0xEB5AE987 | variable | |
// | LegacyAminoPubKey | tendermint/PubKeyMultisigThreshold | 0x22C1F7E2 | variable | |
// | PrivKey | tendermint/PrivKeySr25519 | 0x2F82D78B | variable | |
// | PrivKey | tendermint/PrivKeyEd25519 | 0xA3288910 | variable | |
// | PrivKey | tendermint/PrivKeySecp256k1 | 0xE1B0F79B | variable | |
}
Loading