Skip to content

Commit

Permalink
fix: modify key type name (#145)
Browse files Browse the repository at this point in the history
* fix: modify key type name

* chore: fix lint error
  • Loading branch information
Woosang Son authored Apr 26, 2021
1 parent 60ec2db commit ff6eab4
Show file tree
Hide file tree
Showing 46 changed files with 107 additions and 1,498 deletions.
44 changes: 22 additions & 22 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -740,7 +740,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -888,7 +888,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -979,7 +979,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -1131,7 +1131,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -1219,7 +1219,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -1381,7 +1381,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -1603,7 +1603,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -1812,7 +1812,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -2030,7 +2030,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -2632,7 +2632,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -2682,7 +2682,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -2851,7 +2851,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -3083,7 +3083,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -3356,7 +3356,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -3572,7 +3572,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -3916,7 +3916,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -4069,7 +4069,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -4215,7 +4215,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -4445,7 +4445,7 @@ paths:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -28804,7 +28804,7 @@ definitions:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -28900,7 +28900,7 @@ definitions:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down Expand Up @@ -28967,7 +28967,7 @@ definitions:
properties:
type:
type: string
example: tendermint/PubKeySecp256k1
example: ostracon/PubKeySecp256k1
value:
type: string
example: Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH
Expand Down
2 changes: 1 addition & 1 deletion client/docs/swagger_legacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2155,7 +2155,7 @@ definitions:
properties:
type:
type: string
example: "tendermint/PubKeySecp256k1"
example: "ostracon/PubKeySecp256k1"
value:
type: string
example: "Avz04VhtKJh8ACCVzlI8aTosGy0ikFXKIVHQ3jKMrosH"
Expand Down
4 changes: 2 additions & 2 deletions client/keys/add_ledger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func Test_runAddCmdLedgerWithCustomCoinType(t *testing.T) {
require.Equal(t, "keyname1", key1.GetName())
require.Equal(t, keyring.TypeLedger, key1.GetType())
require.Equal(t,
"terrapub1addwnpepqvpg7r26nl2pvqqern00m6s9uaax3hauu2rzg8qpjzq9hy6xve7sw0d84m6",
"terrapub1cqmsrdepqvpg7r26nl2pvqqern00m6s9uaax3hauu2rzg8qpjzq9hy6xve7swm8dz8g",
sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, key1.GetPubKey()))

config.SetCoinType(438)
Expand Down Expand Up @@ -122,6 +122,6 @@ func Test_runAddCmdLedger(t *testing.T) {
require.Equal(t, "keyname1", key1.GetName())
require.Equal(t, keyring.TypeLedger, key1.GetType())
require.Equal(t,
"linkpub1addwnpepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzszgelc",
"linkpub1cqmsrdepq27djm9tzq3sftqsayx95refxk8r5jn0kyshhql9mdjhjx829zlvzygzwr2",
sdk.MustBech32ifyPubKey(sdk.Bech32PubKeyTypeAccPub, key1.GetPubKey()))
}
13 changes: 7 additions & 6 deletions client/keys/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,15 @@ func Test_runImportCmd(t *testing.T) {
})

keyfile := filepath.Join(kbHome, "key.asc")
armoredKey := `-----BEGIN TENDERMINT PRIVATE KEY-----
salt: A790BB721D1C094260EA84F5E5B72289
armoredKey := `-----BEGIN OSTRACON PRIVATE KEY-----
kdf: bcrypt
salt: A278E4F0DC466EF58CC9FC3149688593
type: secp256k1
HbP+c6JmeJy9JXe2rbbF1QtCX1gLqGcDQPBXiCtFvP7/8wTZtVOPj8vREzhZ9ElO
3P7YnrzPQThG0Q+ZnRSbl9MAS8uFAM4mqm5r/Ys=
=f3l4
-----END TENDERMINT PRIVATE KEY-----
mSB5rEfN4VCi1EnEca5PigV/WphYtrBFft+QyZ2ISztMeQmuhFNFWwjLBsJm5zXv
KNXMn0ZEeCZtbyNzPPdQUQBwcbueq9vx5NDqQCg=
=wp9z
-----END OSTRACON PRIVATE KEY-----
`
require.NoError(t, ioutil.WriteFile(keyfile, []byte(armoredKey), 0644))

Expand Down
147 changes: 0 additions & 147 deletions client/keys/migrate.go

This file was deleted.

Loading

0 comments on commit ff6eab4

Please sign in to comment.