From 8fbf923c257f6ad483d7aa8a91b65c1b4d159d7d Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Fri, 8 Sep 2017 20:30:44 +0200 Subject: [PATCH] Update binaries to use our key commands, not the ones from go-crypto --- client/commands/keys/delete.go | 2 +- client/commands/keys/get.go | 2 +- client/commands/keys/list.go | 2 +- client/commands/keys/new.go | 2 +- client/commands/keys/recover.go | 2 +- client/commands/keys/root.go | 2 +- client/commands/keys/update.go | 2 +- client/commands/keys/utils.go | 2 +- client/commands/txs/helpers.go | 4 ++-- client/rest/handlers.go | 7 ++++--- client/rest/helpers.go | 2 +- examples/basecoin/cmd/basecli/main.go | 4 ++-- examples/counter/cmd/countercli/main.go | 4 ++-- examples/eyes/cmd/eyescli/main.go | 4 ---- 14 files changed, 19 insertions(+), 22 deletions(-) diff --git a/client/commands/keys/delete.go b/client/commands/keys/delete.go index 033cf2768..d79f7254f 100644 --- a/client/commands/keys/delete.go +++ b/client/commands/keys/delete.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "fmt" diff --git a/client/commands/keys/get.go b/client/commands/keys/get.go index dfade2b74..7310d83c1 100644 --- a/client/commands/keys/get.go +++ b/client/commands/keys/get.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "github.com/pkg/errors" diff --git a/client/commands/keys/list.go b/client/commands/keys/list.go index 51eeeda12..afdfb2784 100644 --- a/client/commands/keys/list.go +++ b/client/commands/keys/list.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import "github.com/spf13/cobra" diff --git a/client/commands/keys/new.go b/client/commands/keys/new.go index ce4634074..0a1a5a607 100644 --- a/client/commands/keys/new.go +++ b/client/commands/keys/new.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "fmt" diff --git a/client/commands/keys/recover.go b/client/commands/keys/recover.go index 4896c4e05..52a8d0860 100644 --- a/client/commands/keys/recover.go +++ b/client/commands/keys/recover.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "github.com/pkg/errors" diff --git a/client/commands/keys/root.go b/client/commands/keys/root.go index 4744c993e..9ec37a8ce 100644 --- a/client/commands/keys/root.go +++ b/client/commands/keys/root.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "github.com/spf13/cobra" diff --git a/client/commands/keys/update.go b/client/commands/keys/update.go index f31af509c..f79a5cc1a 100644 --- a/client/commands/keys/update.go +++ b/client/commands/keys/update.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package cmd +package keys import ( "fmt" diff --git a/client/commands/keys/utils.go b/client/commands/keys/utils.go index a7e3ed183..85aa434b2 100644 --- a/client/commands/keys/utils.go +++ b/client/commands/keys/utils.go @@ -1,4 +1,4 @@ -package cmd +package keys import ( "bufio" diff --git a/client/commands/txs/helpers.go b/client/commands/txs/helpers.go index f7600368c..013b15d24 100644 --- a/client/commands/txs/helpers.go +++ b/client/commands/txs/helpers.go @@ -10,12 +10,11 @@ import ( "strings" "github.com/bgentry/speakeasy" - "github.com/mattn/go-isatty" + isatty "github.com/mattn/go-isatty" "github.com/pkg/errors" "github.com/spf13/viper" crypto "github.com/tendermint/go-crypto" - keycmd "github.com/tendermint/go-crypto/cmd" "github.com/tendermint/go-crypto/keys" wire "github.com/tendermint/go-wire" "github.com/tendermint/go-wire/data" @@ -24,6 +23,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk" "github.com/cosmos/cosmos-sdk/client/commands" + keycmd "github.com/cosmos/cosmos-sdk/client/commands/keys" "github.com/cosmos/cosmos-sdk/modules/auth" ) diff --git a/client/rest/handlers.go b/client/rest/handlers.go index ee2bfb89f..330e82e2c 100644 --- a/client/rest/handlers.go +++ b/client/rest/handlers.go @@ -6,10 +6,11 @@ import ( "github.com/gorilla/mux" "github.com/pkg/errors" - sdk "github.com/cosmos/cosmos-sdk" - keysutils "github.com/tendermint/go-crypto/cmd" keys "github.com/tendermint/go-crypto/keys" "github.com/tendermint/tmlibs/common" + + sdk "github.com/cosmos/cosmos-sdk" + keycmd "github.com/cosmos/cosmos-sdk/client/commands/keys" ) type Keys struct { @@ -18,7 +19,7 @@ type Keys struct { } func DefaultKeysManager() keys.Manager { - return keysutils.GetKeyManager() + return keycmd.GetKeyManager() } func NewDefaultKeysManager(algo string) *Keys { diff --git a/client/rest/helpers.go b/client/rest/helpers.go index be9118ef8..5085135e8 100644 --- a/client/rest/helpers.go +++ b/client/rest/helpers.go @@ -1,7 +1,6 @@ package rest import ( - keycmd "github.com/tendermint/go-crypto/cmd" "github.com/tendermint/go-crypto/keys" wire "github.com/tendermint/go-wire" @@ -9,6 +8,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk" "github.com/cosmos/cosmos-sdk/client/commands" + keycmd "github.com/cosmos/cosmos-sdk/client/commands/keys" ) // PostTx is same as a tx diff --git a/examples/basecoin/cmd/basecli/main.go b/examples/basecoin/cmd/basecli/main.go index d69e795b7..6145e8642 100644 --- a/examples/basecoin/cmd/basecli/main.go +++ b/examples/basecoin/cmd/basecli/main.go @@ -5,11 +5,11 @@ import ( "github.com/spf13/cobra" - keycmd "github.com/tendermint/go-crypto/cmd" "github.com/tendermint/tmlibs/cli" "github.com/cosmos/cosmos-sdk/client/commands" "github.com/cosmos/cosmos-sdk/client/commands/auto" + "github.com/cosmos/cosmos-sdk/client/commands/keys" "github.com/cosmos/cosmos-sdk/client/commands/proxy" "github.com/cosmos/cosmos-sdk/client/commands/query" rpccmd "github.com/cosmos/cosmos-sdk/client/commands/rpc" @@ -76,7 +76,7 @@ func main() { BaseCli.AddCommand( commands.InitCmd, commands.ResetCmd, - keycmd.RootCmd, + keys.RootCmd, seeds.RootCmd, rpccmd.RootCmd, query.RootCmd, diff --git a/examples/counter/cmd/countercli/main.go b/examples/counter/cmd/countercli/main.go index adf76516c..0e7c251e6 100644 --- a/examples/counter/cmd/countercli/main.go +++ b/examples/counter/cmd/countercli/main.go @@ -5,10 +5,10 @@ import ( "github.com/spf13/cobra" - keycmd "github.com/tendermint/go-crypto/cmd" "github.com/tendermint/tmlibs/cli" "github.com/cosmos/cosmos-sdk/client/commands" + "github.com/cosmos/cosmos-sdk/client/commands/keys" "github.com/cosmos/cosmos-sdk/client/commands/proxy" "github.com/cosmos/cosmos-sdk/client/commands/query" "github.com/cosmos/cosmos-sdk/client/commands/seeds" @@ -73,7 +73,7 @@ func main() { commands.InitCmd, commands.ResetCmd, commands.VersionCmd, - keycmd.RootCmd, + keys.RootCmd, seeds.RootCmd, query.RootCmd, txcmd.RootCmd, diff --git a/examples/eyes/cmd/eyescli/main.go b/examples/eyes/cmd/eyescli/main.go index 2ba4a5355..374e59d07 100644 --- a/examples/eyes/cmd/eyescli/main.go +++ b/examples/eyes/cmd/eyescli/main.go @@ -5,12 +5,10 @@ import ( "github.com/spf13/cobra" - keycmd "github.com/tendermint/go-crypto/cmd" "github.com/tendermint/tmlibs/cli" "github.com/cosmos/cosmos-sdk/client/commands" "github.com/cosmos/cosmos-sdk/client/commands/auto" - "github.com/cosmos/cosmos-sdk/client/commands/proxy" "github.com/cosmos/cosmos-sdk/client/commands/query" rpccmd "github.com/cosmos/cosmos-sdk/client/commands/rpc" "github.com/cosmos/cosmos-sdk/client/commands/seeds" @@ -52,12 +50,10 @@ func main() { // we use out own init command to not require address arg commands.InitCmd, commands.ResetCmd, - keycmd.RootCmd, seeds.RootCmd, rpccmd.RootCmd, query.RootCmd, txcmd.RootCmd, - proxy.RootCmd, commands.VersionCmd, auto.AutoCompleteCmd, )