public static bool IsAddressValid(string address) { bool isValid = false; BitcoinLib.Responses.ValidateAddressResponse validateResponse = null; try { validateResponse = CoinService.ValidateAddress(address); } catch (RpcException exception) { // Debug.WriteLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception); bitcoin_Logger.LogLine("[Failed]\n\nPlease check your configuration and make sure that the daemon is up and running and that it is synchronized. \n\nException: " + exception, responseTip.Helpers.Logger.log_types.ERROR_LOG); // newBtcAdress = "RPC exception"; } catch (Exception e) { // Debug.WriteLine("General exception at: " + e.StackTrace); bitcoin_Logger.LogLine("General exception at: " + e.StackTrace, responseTip.Helpers.Logger.log_types.ERROR_LOG); // newBtcAdress = "General exception"; } if (validateResponse != null) { isValid = validateResponse.IsValid; } return(isValid); }
private void btnSendNamesToAddress_Click(object sender, EventArgs e) { BitcoinLib.Responses.ValidateAddressResponse validate = xayaCoinService.ValidateAddress(txtChiAddressToSendNamesTo.Text); if (validate.IsValid) { foreach (ListViewItem item in lvNames.Items) { if (item.Checked) { Console.WriteLine(item.Text); // Send names to address JObject job = new JObject(); job["destAddress"] = txtChiAddressToSendNamesTo.Text; string result = xayaCoinService.NameUpdate(item.Text, "{}", job); Console.WriteLine(result); } } } }