Beispiel #1
0
        private void CreateNewAccount()
        {
            var password = _screenManager.AskInvisible("password: "******"account successfully created!");
            }
        }
Beispiel #2
0
        private void CreateNewAccount()
        {
            var password = _screenManager.AskInvisible("password: "******"Account pub key: " + keypair.GetEncodedPublicKey().ToHex(true));
                _screenManager.PrintLine("Account address: 0x" + keypair.GetAddressHex());
            }
        }
Beispiel #3
0
        private Dictionary <string, string> GetAndCreateAccountKey(DeployArg arg)
        {
            if (string.IsNullOrWhiteSpace(arg.ChainAccount))
            {
                var keyStore = new AElfKeyStore(ApplicationHelpers.ConfigPath);
                var key      = keyStore.Create(arg.AccountPassword);
                arg.ChainAccount = key.GetAddressHex();
            }

            var fileName   = arg.ChainAccount + ".ak";
            var filePath   = Path.Combine(ApplicationHelpers.ConfigPath, "keys", fileName);
            var keyContent = File.ReadAllText(filePath);

            return(new Dictionary <string, string> {
                { fileName, keyContent }
            });
        }
Beispiel #4
0
        public CommandInfo NewAccount(string password = "")
        {
            var result = new CommandInfo("account new", "account");

            if (password == "")
            {
                password = AskInvisible("password:"******"Account address: " + keypair.GetAddressHex());
            }

            return(result);
        }