private void CreateNewAccount() { var password = _screenManager.AskInvisible("password: "******"account successfully created!"); } }
private void CreateNewAccount() { var password = _screenManager.AskInvisible("password: "******"Account pub key: " + keypair.GetEncodedPublicKey().ToHex(true)); _screenManager.PrintLine("Account address: 0x" + keypair.GetAddressHex()); } }
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 } }); }
public CommandInfo NewAccount(string password = "") { var result = new CommandInfo("account new", "account"); if (password == "") { password = AskInvisible("password:"******"Account address: " + keypair.GetAddressHex()); } return(result); }