add option --node-keystore for previous usecase
@@ -58,6 +58,7 @@ var (
importFormat string
importFilePath string
exportAsWif bool
+ remoteKeystore bool
rootConfig CliConfig
@@ -83,6 +84,7 @@ func init() {
rootCmd.PersistentFlags().StringVarP(&host, "host", "H", "localhost", "Host address to aergo server")
rootCmd.PersistentFlags().Int32VarP(&port, "port", "p", 7845, "Port number to aergo server")
rootCmd.PersistentFlags().StringVar(&dataDir, "keystore", "$HOME/.aergo", "Path to keystore")
+ rootCmd.PersistentFlags().BoolVar(&remoteKeystore, "node-keystore", false, "use node keystore")
}
func initConfig() {
@@ -102,6 +104,9 @@ func initConfig() {
if err != nil {
log.Fatalf("Fail to load configuration file %v: %v", cliCtx.Vc.ConfigFileUsed(), err)
}
+ if remoteKeystore {
+ rootConfig.KeyStorePath = ""
+ }
}
func Execute() {
