public async Task <bool> LoadWallet() { var client = new RestClient($"{ApiUrl}"); var request = new RestRequest("/api/Wallet/load", Method.Post); var body = new WalletModel { Name = settings.WalletName, Password = settings.WalletPassword }; request.AddJsonBody(body); var response = await client.ExecuteAsync(request); return(response.StatusCode == HttpStatusCode.OK); }
public async Task <bool> CreateWallet() { var client = new RestClient($"{ApiUrl}"); var request = new RestRequest("/api/Wallet/recover", Method.Post); var body = new WalletModel { Name = settings.WalletName, Password = settings.WalletPassword, Mnemonic = settings.WalletRecoveryPhrase, CreationDate = DateTime.UtcNow }; request.AddJsonBody(body); var response = await client.ExecuteAsync(request); return(response.StatusCode == HttpStatusCode.OK); }