mirror of
https://github.com/Nathanwoodburn/FireWallet.git
synced 2025-12-06 08:33:00 +11:00
Compare commits
49 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
64fc28d745
|
|||
|
9f33c74bb0
|
|||
|
8f241fc90a
|
|||
|
dc09194759
|
|||
|
638a367029
|
|||
|
026849575d
|
|||
|
d1a150114e
|
|||
|
5d59bdee64
|
|||
|
74548a22e2
|
|||
|
ac2aa06888
|
|||
|
429cf0d67b
|
|||
|
38838096d6
|
|||
|
fae4bff32b
|
|||
|
df8c675588
|
|||
|
de7109eddc
|
|||
|
1a98a6a1c6
|
|||
|
859562ac22
|
|||
|
0a5412478c
|
|||
|
90cc614ebf
|
|||
|
a024ce7afc
|
|||
|
88ee50f4a6
|
|||
|
23cbace1ea
|
|||
|
6894e9c079
|
|||
|
95d0498672
|
|||
|
88c6b5afe0
|
|||
|
f06bc5b711
|
|||
|
42536e47bb
|
|||
|
404a47ec79
|
|||
|
c3abd0b4de
|
|||
|
41a38e2af1
|
|||
|
699b1051d4
|
|||
|
14cb5453dc
|
|||
|
5323a8ff0d
|
|||
|
2572b17898
|
|||
|
a8f425434e
|
|||
|
07c9618837
|
|||
|
eccc584b2c
|
|||
|
cf2f68f2b3
|
|||
|
5eb80bcd06
|
|||
|
7c38bfc755
|
|||
|
d4620af384
|
|||
|
15cb4efaf1
|
|||
|
18607358bf
|
|||
|
6db6d02e9e
|
|||
|
3eda3d7419
|
|||
|
3f6c2bdded
|
|||
|
2bfca908a9
|
|||
|
531d41a413
|
|||
|
960af0b169
|
@@ -1,12 +1,11 @@
|
||||
using System.Data;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Security.Principal;
|
||||
using System.Text;
|
||||
using Microsoft.VisualBasic;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using ContentAlignment = System.Drawing.ContentAlignment;
|
||||
using Point = System.Drawing.Point;
|
||||
|
||||
namespace FireWallet
|
||||
@@ -60,7 +59,7 @@ namespace FireWallet
|
||||
List<Batch> temp = new List<Batch>();
|
||||
foreach (Batch batch in batches)
|
||||
{
|
||||
if (batch.domain != domain && batch.method != operation)
|
||||
if (batch.domain != domain || batch.method != operation)
|
||||
{
|
||||
temp.Add(batch);
|
||||
}
|
||||
@@ -124,7 +123,7 @@ namespace FireWallet
|
||||
List<Batch> temp = new List<Batch>();
|
||||
foreach (Batch batch in batches)
|
||||
{
|
||||
if (batch.domain != domain && batch.method != operation)
|
||||
if (batch.domain != domain || batch.method != operation)
|
||||
{
|
||||
temp.Add(batch);
|
||||
}
|
||||
@@ -184,7 +183,7 @@ namespace FireWallet
|
||||
List<Batch> temp = new List<Batch>();
|
||||
foreach (Batch batch in batches)
|
||||
{
|
||||
if (batch.domain != domain && batch.method != operation)
|
||||
if (batch.domain != domain || batch.method != operation)
|
||||
{
|
||||
temp.Add(batch);
|
||||
}
|
||||
@@ -240,7 +239,7 @@ namespace FireWallet
|
||||
List<Batch> temp = new List<Batch>();
|
||||
foreach (Batch batch in batches)
|
||||
{
|
||||
if (batch.domain != domain && batch.method != operation)
|
||||
if (batch.domain != domain || batch.method != operation)
|
||||
{
|
||||
temp.Add(batch);
|
||||
}
|
||||
@@ -465,7 +464,7 @@ namespace FireWallet
|
||||
HttpClient httpClient = new HttpClient();
|
||||
private async void buttonSend_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!mainForm.watchOnly)
|
||||
if (!mainForm.WatchOnly)
|
||||
{
|
||||
string batchTX = "[" + string.Join(", ", batches.Select(batch => batch.ToString())) + "]";
|
||||
string content = "{\"method\": \"sendbatch\",\"params\":[ " + batchTX + "]}";
|
||||
@@ -508,7 +507,7 @@ namespace FireWallet
|
||||
JObject result = JObject.Parse(jObject["result"].ToString());
|
||||
string hash = result["hash"].ToString();
|
||||
AddLog("Batch sent with hash: " + hash);
|
||||
NotifyForm notifyForm2 = new NotifyForm("Batch sent\nThis might take a while to mine.", "Explorer", mainForm.userSettings["explorer-tx"] + hash);
|
||||
NotifyForm notifyForm2 = new NotifyForm("Batch sent\nThis might take a while to mine.", "Explorer", mainForm.UserSettings["explorer-tx"] + hash);
|
||||
notifyForm2.ShowDialog();
|
||||
notifyForm2.Dispose();
|
||||
this.Close();
|
||||
@@ -538,14 +537,8 @@ namespace FireWallet
|
||||
notifyForm.Dispose();
|
||||
return;
|
||||
}
|
||||
|
||||
StreamWriter sw = new StreamWriter(dir + "hsd-ledger/bin/names.txt");
|
||||
string domainslist = string.Join(",", batches.Select(batch => batch.domain));
|
||||
sw.Write(domainslist);
|
||||
sw.Dispose();
|
||||
StreamWriter sw2 = new StreamWriter(dir + "hsd-ledger/bin/batch.json");
|
||||
sw2.Write(response);
|
||||
sw2.Dispose();
|
||||
|
||||
string domainslist = string.Join(",", batches.Select(batch => "\\\"" + batch.domain + "\\\""));
|
||||
|
||||
NotifyForm notify = new NotifyForm("Please confirm the transaction on your Ledger device", false);
|
||||
notify.Show();
|
||||
@@ -558,7 +551,9 @@ namespace FireWallet
|
||||
proc.StartInfo.RedirectStandardError = true;
|
||||
proc.StartInfo.FileName = "node.exe";
|
||||
proc.StartInfo.WorkingDirectory = dir + "hsd-ledger/bin/";
|
||||
proc.StartInfo.Arguments = dir + "hsd-ledger/bin/hsd-ledger sendraw batch.json names.txt --api-key " + mainForm.nodeSettings["Key"] + " -w " + mainForm.account;
|
||||
string args = "hsd-ledger/bin/hsd-ledger sendraw \"\"" + response.Replace("\"","\\\"") + "\"\" [" + domainslist + "] --api-key " + mainForm.NodeSettings["Key"] + " -w " + mainForm.Account;
|
||||
|
||||
proc.StartInfo.Arguments = dir + args;
|
||||
var outputBuilder = new StringBuilder();
|
||||
|
||||
// Event handler for capturing output data
|
||||
@@ -582,7 +577,7 @@ namespace FireWallet
|
||||
if (output.Contains("Submitted TXID"))
|
||||
{
|
||||
string hash = output.Substring(output.IndexOf("Submitted TXID") + 16, 64);
|
||||
string link = mainForm.userSettings["explorer-tx"] + hash;
|
||||
string link = mainForm.UserSettings["explorer-tx"] + hash;
|
||||
NotifyForm notifySuccess = new NotifyForm("Transaction Sent\nThis transaction could take up to 20 minutes to mine",
|
||||
"Explorer", link);
|
||||
notifySuccess.ShowDialog();
|
||||
@@ -590,6 +585,8 @@ namespace FireWallet
|
||||
}
|
||||
else
|
||||
{
|
||||
AddLog(args);
|
||||
AddLog(proc.StandardError.ReadToEnd());
|
||||
NotifyForm notifyError = new NotifyForm("Error Transaction Failed\nCheck logs for more details");
|
||||
notifyError.ShowDialog();
|
||||
notifyError.Dispose();
|
||||
@@ -622,7 +619,7 @@ namespace FireWallet
|
||||
}
|
||||
else if (b.method == "UPDATE")
|
||||
{
|
||||
sw.WriteLine(b.domain + "," + b.method + ",[" + string.Join(", ", b.update.Select(record => record.ToString())) + "]");
|
||||
sw.WriteLine(b.domain + "," + b.method + ",[" + string.Join(";", b.update.Select(record => record.ToString())) + "]");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -640,17 +637,85 @@ namespace FireWallet
|
||||
openFileDialog.Title = "Open Batch";
|
||||
if (openFileDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
StreamReader sr = new StreamReader(openFileDialog.FileName);
|
||||
string line;
|
||||
string[] domains = new string[0];
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
try
|
||||
{
|
||||
string[] split = line.Split(',');
|
||||
try
|
||||
StreamReader sr = new StreamReader(openFileDialog.FileName);
|
||||
string line;
|
||||
string[] domains = new string[0];
|
||||
while ((line = sr.ReadLine()) != null)
|
||||
{
|
||||
if (split.Length > 2)
|
||||
string[] split = line.Split(',');
|
||||
try
|
||||
{
|
||||
if (split[1] == "UPDATE")
|
||||
if (split.Length > 2)
|
||||
{
|
||||
if (split[1] == "UPDATE")
|
||||
{
|
||||
// Join the rest of the line
|
||||
string[] updateArray = new string[split.Length - 2];
|
||||
for (int i = 0; i < updateArray.Length; i++)
|
||||
{
|
||||
updateArray[i] = split[i + 2];
|
||||
}
|
||||
string updateString = string.Join(",", updateArray);
|
||||
updateString.TrimStart('[');
|
||||
updateString.TrimEnd(']');
|
||||
|
||||
string[] updateSplit = updateString.Split(';');
|
||||
DNS[] UpdateRecords = new DNS[updateSplit.Length];
|
||||
int r = 0;
|
||||
foreach (string update in updateSplit)
|
||||
{
|
||||
string[] updateRecord = update.Split(',');
|
||||
string type = updateRecord[0];
|
||||
type = type.Split(':')[1].Replace("\"","").Trim();
|
||||
switch (type)
|
||||
{
|
||||
case "NS":
|
||||
string ns = updateRecord[1].Split(':')[1].Replace("\"","").Replace("}","").Trim();
|
||||
UpdateRecords[r] = new DNS(type, ns);
|
||||
break;
|
||||
case "DS":
|
||||
int keyTag = int.Parse(updateRecord[1].Split(':')[1]);
|
||||
int algorithm = int.Parse(updateRecord[2].Split(':')[1]);
|
||||
int digestType = int.Parse(updateRecord[3].Split(':')[1]);
|
||||
string digest = updateRecord[4].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||
|
||||
UpdateRecords[r] = new DNS(type, keyTag, algorithm, digestType, digest);
|
||||
break;
|
||||
case "TXT":
|
||||
string txt = updateRecord[1].Split(':')[1].Replace("\"", "").Replace("}", "");
|
||||
txt = txt.Replace("[", "");
|
||||
txt = txt.Replace("]", "");
|
||||
UpdateRecords[r] = new DNS(type, new string[] { txt.Trim() });
|
||||
break;
|
||||
case "GLUE4":
|
||||
case "GLUE6":
|
||||
string nsGlue = updateRecord[1].Split(':')[1].Replace("\"", "").Trim();
|
||||
string address = updateRecord[2].Split(':')[1].Replace("\"", "").Replace("}", "").Trim();
|
||||
UpdateRecords[r] = new DNS(type, nsGlue, address);
|
||||
break;
|
||||
}
|
||||
r++;
|
||||
}
|
||||
AddBatch(split[0], split[1], UpdateRecords);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (split.Length == 2)
|
||||
{
|
||||
AddBatch(split[0], split[1]);
|
||||
}
|
||||
else if (split.Length == 3)
|
||||
{
|
||||
AddBatch(split[0], split[1], split[2]);
|
||||
}
|
||||
else if (split.Length == 4)
|
||||
{
|
||||
AddBatch(split[0], split[1], Convert.ToDecimal(split[2]), Convert.ToDecimal(split[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Select operation and import domains
|
||||
string[] newDomains = new string[domains.Length + 1];
|
||||
@@ -658,68 +723,53 @@ namespace FireWallet
|
||||
{
|
||||
newDomains[i] = domains[i];
|
||||
}
|
||||
newDomains[domains.Length] = split[0];
|
||||
newDomains[domains.Length] = line.Trim();
|
||||
domains = newDomains;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (split.Length == 2)
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddBatch(split[0], split[1]);
|
||||
}
|
||||
else if (split.Length == 3)
|
||||
{
|
||||
AddBatch(split[0], split[1], split[2]);
|
||||
}
|
||||
else if (split.Length == 4)
|
||||
{
|
||||
AddBatch(split[0], split[1], Convert.ToDecimal(split[2]), Convert.ToDecimal(split[3]));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Select operation and import domains
|
||||
string[] newDomains = new string[domains.Length + 1];
|
||||
for (int i = 0; i < domains.Length; i++)
|
||||
{
|
||||
newDomains[i] = domains[i];
|
||||
}
|
||||
newDomains[domains.Length] = line.Trim();
|
||||
domains = newDomains;
|
||||
AddLog("Error importing batch: " + ex.Message);
|
||||
NotifyForm notifyForm = new NotifyForm("Error importing batch");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
if (domains.Length > 0)
|
||||
{
|
||||
AddLog("Error importing batch: " + ex.Message);
|
||||
NotifyForm notifyForm = new NotifyForm("Error importing batch");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
BatchImportForm batchImportForm = new BatchImportForm(domains);
|
||||
batchImportForm.ShowDialog();
|
||||
if (batchImportForm.batches != null)
|
||||
{
|
||||
foreach (Batch b in batchImportForm.batches)
|
||||
{
|
||||
if (b.method == "BID")
|
||||
{
|
||||
AddBatch(b.domain, b.method, b.bid, b.lockup);
|
||||
}
|
||||
else if (b.method == "TRANSFER")
|
||||
{
|
||||
AddBatch(b.domain, b.method, b.toAddress);
|
||||
}
|
||||
else if (b.method == "UPDATE")
|
||||
{
|
||||
AddBatch(b.domain, b.method, b.update);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddBatch(b.domain, b.method);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (domains.Length > 0)
|
||||
sr.Dispose();
|
||||
} catch (Exception ex)
|
||||
{
|
||||
BatchImportForm batchImportForm = new BatchImportForm(domains);
|
||||
batchImportForm.ShowDialog();
|
||||
if (batchImportForm.batches != null)
|
||||
{
|
||||
foreach (Batch b in batchImportForm.batches)
|
||||
{
|
||||
if (b.method == "BID")
|
||||
{
|
||||
AddBatch(b.domain, b.method, b.bid, b.lockup);
|
||||
}
|
||||
else if (b.method == "TRANSFER")
|
||||
{
|
||||
AddBatch(b.domain, b.method, b.toAddress);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddBatch(b.domain, b.method);
|
||||
}
|
||||
}
|
||||
}
|
||||
AddLog("Error importing batch: " + ex.Message);
|
||||
NotifyForm notifyForm = new NotifyForm("Error importing batch\nMake sure the file is in not in use");
|
||||
notifyForm.ShowDialog();
|
||||
notifyForm.Dispose();
|
||||
}
|
||||
sr.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -732,10 +782,10 @@ namespace FireWallet
|
||||
/// <returns></returns>
|
||||
private async Task<string> APIPost(string path, bool wallet, string content)
|
||||
{
|
||||
string key = mainForm.nodeSettings["Key"];
|
||||
string ip = mainForm.nodeSettings["IP"];
|
||||
string key = mainForm.NodeSettings["Key"];
|
||||
string ip = mainForm.NodeSettings["IP"];
|
||||
string port = "1203";
|
||||
if (mainForm.network == 1)
|
||||
if (mainForm.HSDNetwork == 1)
|
||||
{
|
||||
port = "1303";
|
||||
}
|
||||
@@ -747,21 +797,26 @@ namespace FireWallet
|
||||
req.Content = new StringContent(content);
|
||||
|
||||
// Send request
|
||||
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
||||
|
||||
try
|
||||
{
|
||||
resp.EnsureSuccessStatusCode();
|
||||
HttpResponseMessage resp = await httpClient.SendAsync(req);
|
||||
if (resp.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
AddLog("Post Error: " + resp.StatusCode.ToString());
|
||||
AddLog(await resp.Content.ReadAsStringAsync());
|
||||
AddLog(content);
|
||||
return "Error";
|
||||
}
|
||||
return await resp.Content.ReadAsStringAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
AddLog("Post Error: " + ex.Message);
|
||||
AddLog(await resp.Content.ReadAsStringAsync());
|
||||
AddLog(content);
|
||||
return "Error";
|
||||
}
|
||||
|
||||
return await resp.Content.ReadAsStringAsync();
|
||||
|
||||
}
|
||||
}
|
||||
public class Batch
|
||||
@@ -823,6 +878,10 @@ namespace FireWallet
|
||||
return "[\"UPDATE\", \"" + domain + "\", " + records + "]";
|
||||
|
||||
}
|
||||
else if (method == "UPDATE")
|
||||
{
|
||||
return "[\"UPDATE\", \"" + domain + "\", {\"records\":[]}]";
|
||||
}
|
||||
return "[\"" + method + "\", \"" + domain + "\"]";
|
||||
}
|
||||
}
|
||||
|
||||
2
FireWallet/BatchImportForm.Designer.cs
generated
2
FireWallet/BatchImportForm.Designer.cs
generated
@@ -72,7 +72,7 @@
|
||||
comboBoxMode.FlatStyle = FlatStyle.Flat;
|
||||
comboBoxMode.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
comboBoxMode.FormattingEnabled = true;
|
||||
comboBoxMode.Items.AddRange(new object[] { "OPEN", "BID", "REVEAL", "REDEEM", "RENEW", "TRANSFER", "FINALIZE", "CANCEL" });
|
||||
comboBoxMode.Items.AddRange(new object[] { "OPEN", "BID", "REVEAL", "REDEEM", "REGISTER", "RENEW", "TRANSFER", "FINALIZE", "CANCEL" });
|
||||
comboBoxMode.Location = new Point(346, 42);
|
||||
comboBoxMode.Name = "comboBoxMode";
|
||||
comboBoxMode.Size = new Size(226, 29);
|
||||
|
||||
@@ -263,6 +263,21 @@ namespace FireWallet
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
else if (comboBoxMode.Text == "REGISTER")
|
||||
{
|
||||
batches = new Batch[0];
|
||||
foreach (string domain in listBoxDomains.Items)
|
||||
{
|
||||
if (domain != "")
|
||||
{
|
||||
Batch[] newBatch = new Batch[batches.Length + 1];
|
||||
Array.Copy(batches, newBatch, batches.Length);
|
||||
newBatch[newBatch.Length - 1] = new Batch(domain,"UPDATE",new DNS[0]);
|
||||
batches = newBatch;
|
||||
}
|
||||
}
|
||||
this.Close();
|
||||
}
|
||||
else if (comboBoxMode.Text == "TRANSFER")
|
||||
{
|
||||
batches = new Batch[0];
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace FireWallet
|
||||
InitializeComponent();
|
||||
this.domain = domain;
|
||||
this.mainForm = mainForm;
|
||||
nodeSettings = mainForm.nodeSettings;
|
||||
nodeSettings = mainForm.NodeSettings;
|
||||
|
||||
cancel = true;
|
||||
this.Text = domain + "/ DNS | FireWallet";
|
||||
@@ -363,6 +363,12 @@ namespace FireWallet
|
||||
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
||||
string responseDNS = await APIPost("", false, contentDNS);
|
||||
JObject jObjectDNS = JObject.Parse(responseDNS);
|
||||
|
||||
if (jObjectDNS["result"].ToString() == "")
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
JObject result = (JObject)jObjectDNS["result"];
|
||||
JArray records = (JArray)result["records"];
|
||||
// For each record
|
||||
@@ -439,7 +445,7 @@ namespace FireWallet
|
||||
string key = nodeSettings["Key"];
|
||||
string ip = nodeSettings["IP"];
|
||||
string port = "1203";
|
||||
if (mainForm.network == 1)
|
||||
if (mainForm.HSDNetwork == 1)
|
||||
{
|
||||
port = "1303";
|
||||
}
|
||||
@@ -478,7 +484,7 @@ namespace FireWallet
|
||||
string ip = nodeSettings["IP"];
|
||||
|
||||
string port = "1203";
|
||||
if (mainForm.network == 1)
|
||||
if (mainForm.HSDNetwork == 1)
|
||||
{
|
||||
port = "1303";
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace FireWallet
|
||||
this.explorerTX = explorerTX;
|
||||
this.explorerName = explorerName;
|
||||
this.mainForm = mainForm;
|
||||
this.theme = mainForm.theme;
|
||||
this.theme = mainForm.Theme;
|
||||
|
||||
// Apply theme
|
||||
this.BackColor = ColorTranslator.FromHtml(theme["background"]);
|
||||
@@ -47,7 +47,7 @@ namespace FireWallet
|
||||
mainForm.ThemeControl(c);
|
||||
}
|
||||
|
||||
applyTransparency(mainForm.theme);
|
||||
applyTransparency(mainForm.Theme);
|
||||
}
|
||||
#region Theme
|
||||
private void applyTransparency(Dictionary<string, string> theme)
|
||||
@@ -157,7 +157,7 @@ namespace FireWallet
|
||||
network = Convert.ToInt32(nodeSettings["Network"]);
|
||||
GetName();
|
||||
|
||||
if (mainForm.watchOnly)
|
||||
if (mainForm.WatchOnly)
|
||||
{
|
||||
buttonActionMain.Enabled = false; // Only allow sending in batches for ledger
|
||||
}
|
||||
@@ -264,8 +264,6 @@ namespace FireWallet
|
||||
buttonActionAlt.Hide();
|
||||
buttonActionMain.Hide();
|
||||
groupBoxAction.Text = "Reserved";
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
@@ -281,6 +279,14 @@ namespace FireWallet
|
||||
string contentDNS = "{\"method\": \"getnameresource\", \"params\": [\"" + domain + "\"]}";
|
||||
string responseDNS = await APIPost("", false, contentDNS);
|
||||
JObject jObjectDNS = JObject.Parse(responseDNS);
|
||||
|
||||
if (jObjectDNS["result"].ToString() == "")
|
||||
{
|
||||
// Not registered
|
||||
groupBoxDNS.Visible = false;
|
||||
return;
|
||||
}
|
||||
|
||||
JObject result = (JObject)jObjectDNS["result"];
|
||||
JArray records = (JArray)result["records"];
|
||||
// For each record
|
||||
@@ -816,7 +822,14 @@ namespace FireWallet
|
||||
|
||||
if (!DNSEdit.cancel)
|
||||
{
|
||||
string records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
||||
string records = "";
|
||||
if (DNSEdit.DNSrecords != null)
|
||||
{
|
||||
if (DNSEdit.DNSrecords.Count() > 0)
|
||||
{
|
||||
records = string.Join(", ", DNSEdit.DNSrecords.Select(record => record.ToString()));
|
||||
}
|
||||
}
|
||||
|
||||
string content = "{\"method\": \"sendupdate\", \"params\": [\"" + domain + "\", {\"records\": [" + records + "]}]}";
|
||||
string response = await APIPost("", true, content);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
<PackageIcon>HSDBatcher.png</PackageIcon>
|
||||
<RepositoryUrl>https://github.com/Nathanwoodburn/FireWallet</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<Version>2.6</Version>
|
||||
<Version>3.3</Version>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -27,6 +27,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DnsClient" Version="1.7.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="QRCoder" Version="1.4.3" />
|
||||
</ItemGroup>
|
||||
|
||||
195
FireWallet/MainForm.Designer.cs
generated
195
FireWallet/MainForm.Designer.cs
generated
@@ -41,6 +41,12 @@ namespace FireWallet
|
||||
toolStripStatusLabelaccount = new ToolStripStatusLabel();
|
||||
toolStripStatusLabelLedger = new ToolStripStatusLabel();
|
||||
toolStripSplitButtonlogout = new ToolStripSplitButton();
|
||||
toolStripDropDownButtonHelp = new ToolStripDropDownButton();
|
||||
githubToolStripMenuItem = new ToolStripMenuItem();
|
||||
websiteToolStripMenuItem = new ToolStripMenuItem();
|
||||
supportDiscordServerToolStripMenuItem = new ToolStripMenuItem();
|
||||
toolStripSeparator1 = new ToolStripSeparator();
|
||||
otherProjectsToolStripMenuItem = new ToolStripMenuItem();
|
||||
timerNodeStatus = new System.Windows.Forms.Timer(components);
|
||||
panelaccount = new Panel();
|
||||
groupBoxaccount = new GroupBox();
|
||||
@@ -52,6 +58,7 @@ namespace FireWallet
|
||||
labelaccountusername = new Label();
|
||||
buttonaccountnew = new Button();
|
||||
panelNav = new Panel();
|
||||
buttonNavBids = new Button();
|
||||
buttonNavSettings = new Button();
|
||||
buttonBatch = new Button();
|
||||
buttonNavDomains = new Button();
|
||||
@@ -59,7 +66,6 @@ namespace FireWallet
|
||||
buttonNavSend = new Button();
|
||||
buttonNavPortfolio = new Button();
|
||||
panelPortfolio = new Panel();
|
||||
buttonRenewAll = new Button();
|
||||
buttonRevealAll = new Button();
|
||||
groupBoxTransactions = new GroupBox();
|
||||
groupBoxinfo = new GroupBox();
|
||||
@@ -70,7 +76,9 @@ namespace FireWallet
|
||||
labelBalanceTotal = new Label();
|
||||
labelLocked = new Label();
|
||||
labelBalance = new Label();
|
||||
buttonRenewAll = new Button();
|
||||
panelSend = new Panel();
|
||||
labelSendingHIPAddress = new Label();
|
||||
checkBoxSendSubFee = new CheckBox();
|
||||
buttonSendMax = new Button();
|
||||
buttonSendHNS = new Button();
|
||||
@@ -82,6 +90,7 @@ namespace FireWallet
|
||||
labelSendingAmount = new Label();
|
||||
labelSendingTo = new Label();
|
||||
labelSendPrompt = new Label();
|
||||
labelHIPArrow = new Label();
|
||||
panelRecieve = new Panel();
|
||||
buttonAddressVerify = new Button();
|
||||
pictureBoxReceiveQR = new PictureBox();
|
||||
@@ -89,6 +98,8 @@ namespace FireWallet
|
||||
textBoxReceiveAddress = new TextBox();
|
||||
labelReceive1 = new Label();
|
||||
panelDomains = new Panel();
|
||||
labelDomainSort = new Label();
|
||||
comboBoxDomainSort = new ComboBox();
|
||||
buttonExportDomains = new Button();
|
||||
groupBoxDomains = new GroupBox();
|
||||
panelDomainList = new Panel();
|
||||
@@ -116,6 +127,7 @@ namespace FireWallet
|
||||
textBoxExAddr = new TextBox();
|
||||
labelSettings4 = new Label();
|
||||
textBoxExTX = new TextBox();
|
||||
panelBids = new Panel();
|
||||
statusStripmain.SuspendLayout();
|
||||
panelaccount.SuspendLayout();
|
||||
groupBoxaccount.SuspendLayout();
|
||||
@@ -139,7 +151,7 @@ namespace FireWallet
|
||||
// statusStripmain
|
||||
//
|
||||
statusStripmain.Dock = DockStyle.Top;
|
||||
statusStripmain.Items.AddRange(new ToolStripItem[] { toolStripStatusLabelNetwork, toolStripStatusLabelstatus, toolStripStatusLabelaccount, toolStripStatusLabelLedger, toolStripSplitButtonlogout });
|
||||
statusStripmain.Items.AddRange(new ToolStripItem[] { toolStripStatusLabelNetwork, toolStripStatusLabelstatus, toolStripStatusLabelaccount, toolStripStatusLabelLedger, toolStripSplitButtonlogout, toolStripDropDownButtonHelp });
|
||||
statusStripmain.Location = new Point(0, 0);
|
||||
statusStripmain.Name = "statusStripmain";
|
||||
statusStripmain.Size = new Size(1152, 22);
|
||||
@@ -190,6 +202,51 @@ namespace FireWallet
|
||||
toolStripSplitButtonlogout.Visible = false;
|
||||
toolStripSplitButtonlogout.ButtonClick += Logout;
|
||||
//
|
||||
// toolStripDropDownButtonHelp
|
||||
//
|
||||
toolStripDropDownButtonHelp.DisplayStyle = ToolStripItemDisplayStyle.Text;
|
||||
toolStripDropDownButtonHelp.DropDownItems.AddRange(new ToolStripItem[] { githubToolStripMenuItem, websiteToolStripMenuItem, supportDiscordServerToolStripMenuItem, toolStripSeparator1, otherProjectsToolStripMenuItem });
|
||||
toolStripDropDownButtonHelp.Image = (Image)resources.GetObject("toolStripDropDownButtonHelp.Image");
|
||||
toolStripDropDownButtonHelp.ImageTransparentColor = Color.Magenta;
|
||||
toolStripDropDownButtonHelp.Margin = new Padding(20, 2, 0, 0);
|
||||
toolStripDropDownButtonHelp.Name = "toolStripDropDownButtonHelp";
|
||||
toolStripDropDownButtonHelp.Size = new Size(45, 20);
|
||||
toolStripDropDownButtonHelp.Text = "Help";
|
||||
toolStripDropDownButtonHelp.ToolTipText = "Help";
|
||||
//
|
||||
// githubToolStripMenuItem
|
||||
//
|
||||
githubToolStripMenuItem.Name = "githubToolStripMenuItem";
|
||||
githubToolStripMenuItem.Size = new Size(194, 22);
|
||||
githubToolStripMenuItem.Text = "Github";
|
||||
githubToolStripMenuItem.Click += githubToolStripMenuItem_Click;
|
||||
//
|
||||
// websiteToolStripMenuItem
|
||||
//
|
||||
websiteToolStripMenuItem.Name = "websiteToolStripMenuItem";
|
||||
websiteToolStripMenuItem.Size = new Size(194, 22);
|
||||
websiteToolStripMenuItem.Text = "Website";
|
||||
websiteToolStripMenuItem.Click += websiteToolStripMenuItem_Click;
|
||||
//
|
||||
// supportDiscordServerToolStripMenuItem
|
||||
//
|
||||
supportDiscordServerToolStripMenuItem.Name = "supportDiscordServerToolStripMenuItem";
|
||||
supportDiscordServerToolStripMenuItem.Size = new Size(194, 22);
|
||||
supportDiscordServerToolStripMenuItem.Text = "Support Discord Server";
|
||||
supportDiscordServerToolStripMenuItem.Click += supportDiscordServerToolStripMenuItem_Click;
|
||||
//
|
||||
// toolStripSeparator1
|
||||
//
|
||||
toolStripSeparator1.Name = "toolStripSeparator1";
|
||||
toolStripSeparator1.Size = new Size(191, 6);
|
||||
//
|
||||
// otherProjectsToolStripMenuItem
|
||||
//
|
||||
otherProjectsToolStripMenuItem.Name = "otherProjectsToolStripMenuItem";
|
||||
otherProjectsToolStripMenuItem.Size = new Size(194, 22);
|
||||
otherProjectsToolStripMenuItem.Text = "Other Projects";
|
||||
otherProjectsToolStripMenuItem.Click += otherProjectsToolStripMenuItem_Click;
|
||||
//
|
||||
// timerNodeStatus
|
||||
//
|
||||
timerNodeStatus.Enabled = true;
|
||||
@@ -298,6 +355,7 @@ namespace FireWallet
|
||||
//
|
||||
// panelNav
|
||||
//
|
||||
panelNav.Controls.Add(buttonNavBids);
|
||||
panelNav.Controls.Add(buttonNavSettings);
|
||||
panelNav.Controls.Add(buttonBatch);
|
||||
panelNav.Controls.Add(buttonNavDomains);
|
||||
@@ -310,6 +368,19 @@ namespace FireWallet
|
||||
panelNav.Size = new Size(114, 553);
|
||||
panelNav.TabIndex = 6;
|
||||
//
|
||||
// buttonNavBids
|
||||
//
|
||||
buttonNavBids.FlatStyle = FlatStyle.Flat;
|
||||
buttonNavBids.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonNavBids.Location = new Point(12, 245);
|
||||
buttonNavBids.Name = "buttonNavBids";
|
||||
buttonNavBids.Size = new Size(89, 30);
|
||||
buttonNavBids.TabIndex = 5;
|
||||
buttonNavBids.TabStop = false;
|
||||
buttonNavBids.Text = "Bids";
|
||||
buttonNavBids.UseVisualStyleBackColor = true;
|
||||
buttonNavBids.Click += buttonNavBids_Click;
|
||||
//
|
||||
// buttonNavSettings
|
||||
//
|
||||
buttonNavSettings.FlatStyle = FlatStyle.Flat;
|
||||
@@ -327,7 +398,7 @@ namespace FireWallet
|
||||
//
|
||||
buttonBatch.FlatStyle = FlatStyle.Flat;
|
||||
buttonBatch.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonBatch.Location = new Point(12, 245);
|
||||
buttonBatch.Location = new Point(12, 300);
|
||||
buttonBatch.Name = "buttonBatch";
|
||||
buttonBatch.Size = new Size(89, 30);
|
||||
buttonBatch.TabIndex = 3;
|
||||
@@ -340,7 +411,7 @@ namespace FireWallet
|
||||
//
|
||||
buttonNavDomains.FlatStyle = FlatStyle.Flat;
|
||||
buttonNavDomains.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonNavDomains.Location = new Point(12, 189);
|
||||
buttonNavDomains.Location = new Point(12, 190);
|
||||
buttonNavDomains.Name = "buttonNavDomains";
|
||||
buttonNavDomains.Size = new Size(89, 30);
|
||||
buttonNavDomains.TabIndex = 2;
|
||||
@@ -353,7 +424,7 @@ namespace FireWallet
|
||||
//
|
||||
buttonNavReceive.FlatStyle = FlatStyle.Flat;
|
||||
buttonNavReceive.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonNavReceive.Location = new Point(12, 134);
|
||||
buttonNavReceive.Location = new Point(12, 135);
|
||||
buttonNavReceive.Name = "buttonNavReceive";
|
||||
buttonNavReceive.Size = new Size(89, 30);
|
||||
buttonNavReceive.TabIndex = 1;
|
||||
@@ -394,24 +465,12 @@ namespace FireWallet
|
||||
panelPortfolio.Controls.Add(groupBoxTransactions);
|
||||
panelPortfolio.Controls.Add(groupBoxinfo);
|
||||
panelPortfolio.Controls.Add(groupBoxbalance);
|
||||
panelPortfolio.Location = new Point(1065, 80);
|
||||
panelPortfolio.Location = new Point(1036, 129);
|
||||
panelPortfolio.Name = "panelPortfolio";
|
||||
panelPortfolio.Size = new Size(956, 538);
|
||||
panelPortfolio.TabIndex = 7;
|
||||
panelPortfolio.Visible = false;
|
||||
//
|
||||
// buttonRenewAll
|
||||
//
|
||||
buttonRenewAll.FlatStyle = FlatStyle.Flat;
|
||||
buttonRenewAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonRenewAll.Location = new Point(813, 9);
|
||||
buttonRenewAll.Name = "buttonRenewAll";
|
||||
buttonRenewAll.Size = new Size(89, 32);
|
||||
buttonRenewAll.TabIndex = 10;
|
||||
buttonRenewAll.Text = "Renew All";
|
||||
buttonRenewAll.UseVisualStyleBackColor = true;
|
||||
buttonRenewAll.Click += buttonRenewAll_Click;
|
||||
//
|
||||
// buttonRevealAll
|
||||
//
|
||||
buttonRevealAll.FlatStyle = FlatStyle.Flat;
|
||||
@@ -518,8 +577,21 @@ namespace FireWallet
|
||||
labelBalance.TabIndex = 0;
|
||||
labelBalance.Text = "labelBalance";
|
||||
//
|
||||
// buttonRenewAll
|
||||
//
|
||||
buttonRenewAll.FlatStyle = FlatStyle.Flat;
|
||||
buttonRenewAll.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
buttonRenewAll.Location = new Point(813, 9);
|
||||
buttonRenewAll.Name = "buttonRenewAll";
|
||||
buttonRenewAll.Size = new Size(89, 32);
|
||||
buttonRenewAll.TabIndex = 10;
|
||||
buttonRenewAll.Text = "Renew All";
|
||||
buttonRenewAll.UseVisualStyleBackColor = true;
|
||||
buttonRenewAll.Click += buttonRenewAll_Click;
|
||||
//
|
||||
// panelSend
|
||||
//
|
||||
panelSend.Controls.Add(labelSendingHIPAddress);
|
||||
panelSend.Controls.Add(checkBoxSendSubFee);
|
||||
panelSend.Controls.Add(buttonSendMax);
|
||||
panelSend.Controls.Add(buttonSendHNS);
|
||||
@@ -531,12 +603,23 @@ namespace FireWallet
|
||||
panelSend.Controls.Add(labelSendingAmount);
|
||||
panelSend.Controls.Add(labelSendingTo);
|
||||
panelSend.Controls.Add(labelSendPrompt);
|
||||
panelSend.Location = new Point(1113, 42);
|
||||
panelSend.Controls.Add(labelHIPArrow);
|
||||
panelSend.Location = new Point(1041, 235);
|
||||
panelSend.Name = "panelSend";
|
||||
panelSend.Size = new Size(974, 521);
|
||||
panelSend.TabIndex = 2;
|
||||
panelSend.Visible = false;
|
||||
//
|
||||
// labelSendingHIPAddress
|
||||
//
|
||||
labelSendingHIPAddress.AutoSize = true;
|
||||
labelSendingHIPAddress.Location = new Point(375, 130);
|
||||
labelSendingHIPAddress.Name = "labelSendingHIPAddress";
|
||||
labelSendingHIPAddress.Size = new Size(64, 15);
|
||||
labelSendingHIPAddress.TabIndex = 17;
|
||||
labelSendingHIPAddress.Text = "To Address";
|
||||
labelSendingHIPAddress.Visible = false;
|
||||
//
|
||||
// checkBoxSendSubFee
|
||||
//
|
||||
checkBoxSendSubFee.AutoSize = true;
|
||||
@@ -579,11 +662,11 @@ namespace FireWallet
|
||||
//
|
||||
labelSendingError.AutoSize = true;
|
||||
labelSendingError.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
labelSendingError.Location = new Point(615, 131);
|
||||
labelSendingError.Location = new Point(679, 130);
|
||||
labelSendingError.Name = "labelSendingError";
|
||||
labelSendingError.Size = new Size(52, 21);
|
||||
labelSendingError.Size = new Size(78, 21);
|
||||
labelSendingError.TabIndex = 13;
|
||||
labelSendingError.Text = "label1";
|
||||
labelSendingError.Text = "labelError";
|
||||
labelSendingError.Visible = false;
|
||||
//
|
||||
// labelSendingFee
|
||||
@@ -654,6 +737,17 @@ namespace FireWallet
|
||||
labelSendPrompt.TabIndex = 0;
|
||||
labelSendPrompt.Text = "Send HNS";
|
||||
//
|
||||
// labelHIPArrow
|
||||
//
|
||||
labelHIPArrow.AutoSize = true;
|
||||
labelHIPArrow.Font = new Font("Segoe UI", 18F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelHIPArrow.Location = new Point(346, 119);
|
||||
labelHIPArrow.Name = "labelHIPArrow";
|
||||
labelHIPArrow.Size = new Size(32, 32);
|
||||
labelHIPArrow.TabIndex = 18;
|
||||
labelHIPArrow.Text = "⮡ ";
|
||||
labelHIPArrow.Visible = false;
|
||||
//
|
||||
// panelRecieve
|
||||
//
|
||||
panelRecieve.Controls.Add(buttonAddressVerify);
|
||||
@@ -721,17 +815,42 @@ namespace FireWallet
|
||||
//
|
||||
// panelDomains
|
||||
//
|
||||
panelDomains.Controls.Add(labelDomainSort);
|
||||
panelDomains.Controls.Add(comboBoxDomainSort);
|
||||
panelDomains.Controls.Add(buttonRenewAll);
|
||||
panelDomains.Controls.Add(buttonExportDomains);
|
||||
panelDomains.Controls.Add(groupBoxDomains);
|
||||
panelDomains.Controls.Add(labelDomainSearch);
|
||||
panelDomains.Controls.Add(textBoxDomainSearch);
|
||||
panelDomains.Location = new Point(120, 48);
|
||||
panelDomains.Location = new Point(1122, 35);
|
||||
panelDomains.Name = "panelDomains";
|
||||
panelDomains.Size = new Size(920, 536);
|
||||
panelDomains.TabIndex = 18;
|
||||
panelDomains.Visible = false;
|
||||
//
|
||||
// labelDomainSort
|
||||
//
|
||||
labelDomainSort.AutoSize = true;
|
||||
labelDomainSort.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
labelDomainSort.Location = new Point(638, 15);
|
||||
labelDomainSort.Name = "labelDomainSort";
|
||||
labelDomainSort.Size = new Size(42, 21);
|
||||
labelDomainSort.TabIndex = 12;
|
||||
labelDomainSort.Text = "Sort:";
|
||||
//
|
||||
// comboBoxDomainSort
|
||||
//
|
||||
comboBoxDomainSort.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboBoxDomainSort.FlatStyle = FlatStyle.Flat;
|
||||
comboBoxDomainSort.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
comboBoxDomainSort.FormattingEnabled = true;
|
||||
comboBoxDomainSort.Items.AddRange(new object[] { "Default", "Alphabetical", "Expiring", "Value" });
|
||||
comboBoxDomainSort.Location = new Point(686, 12);
|
||||
comboBoxDomainSort.Name = "comboBoxDomainSort";
|
||||
comboBoxDomainSort.Size = new Size(121, 29);
|
||||
comboBoxDomainSort.TabIndex = 11;
|
||||
comboBoxDomainSort.DropDownClosed += comboBoxDomainSort_DropDownClosed;
|
||||
//
|
||||
// buttonExportDomains
|
||||
//
|
||||
buttonExportDomains.FlatStyle = FlatStyle.Flat;
|
||||
@@ -792,7 +911,7 @@ namespace FireWallet
|
||||
panelSettings.Controls.Add(buttonSettingsSave);
|
||||
panelSettings.Controls.Add(groupBoxSettingsExplorer);
|
||||
panelSettings.Font = new Font("Segoe UI", 12F, FontStyle.Regular, GraphicsUnit.Point);
|
||||
panelSettings.Location = new Point(1065, 211);
|
||||
panelSettings.Location = new Point(1065, 51);
|
||||
panelSettings.Name = "panelSettings";
|
||||
panelSettings.Size = new Size(930, 550);
|
||||
panelSettings.TabIndex = 19;
|
||||
@@ -1002,25 +1121,35 @@ namespace FireWallet
|
||||
textBoxExTX.Size = new Size(307, 29);
|
||||
textBoxExTX.TabIndex = 1;
|
||||
//
|
||||
// panelBids
|
||||
//
|
||||
panelBids.Location = new Point(143, 44);
|
||||
panelBids.Name = "panelBids";
|
||||
panelBids.Size = new Size(868, 484);
|
||||
panelBids.TabIndex = 20;
|
||||
panelBids.Visible = false;
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1152, 575);
|
||||
Controls.Add(panelBids);
|
||||
Controls.Add(panelDomains);
|
||||
Controls.Add(panelSend);
|
||||
Controls.Add(panelSettings);
|
||||
Controls.Add(panelaccount);
|
||||
Controls.Add(panelPortfolio);
|
||||
Controls.Add(panelRecieve);
|
||||
Controls.Add(panelDomains);
|
||||
Controls.Add(panelSend);
|
||||
Controls.Add(panelNav);
|
||||
Controls.Add(statusStripmain);
|
||||
Controls.Add(panelSettings);
|
||||
Icon = (Icon)resources.GetObject("$this.Icon");
|
||||
Name = "MainForm";
|
||||
Opacity = 0D;
|
||||
Text = "FireWallet";
|
||||
FormClosing += MainForm_Closing;
|
||||
Load += MainForm_Load;
|
||||
ResizeEnd += MainForm_ResizeEnd;
|
||||
Resize += Form1_Resize;
|
||||
statusStripmain.ResumeLayout(false);
|
||||
statusStripmain.PerformLayout();
|
||||
@@ -1137,5 +1266,17 @@ namespace FireWallet
|
||||
private Button buttonRevealAll;
|
||||
private Button buttonExportDomains;
|
||||
private Button buttonRenewAll;
|
||||
private ToolStripDropDownButton toolStripDropDownButtonHelp;
|
||||
private ToolStripMenuItem githubToolStripMenuItem;
|
||||
private ToolStripMenuItem websiteToolStripMenuItem;
|
||||
private ToolStripMenuItem supportDiscordServerToolStripMenuItem;
|
||||
private Label labelHIPArrow;
|
||||
private Label labelSendingHIPAddress;
|
||||
private ComboBox comboBoxDomainSort;
|
||||
private Label labelDomainSort;
|
||||
private ToolStripSeparator toolStripSeparator1;
|
||||
private ToolStripMenuItem otherProjectsToolStripMenuItem;
|
||||
private Button buttonNavBids;
|
||||
private Panel panelBids;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -120,10 +120,19 @@
|
||||
<metadata name="statusStripmain.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>133, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="toolStripDropDownButtonHelp.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
|
||||
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
|
||||
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
|
||||
AAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="timerNodeStatus.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>269, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAABAAEAAAAAAAEAIAB2pAAAFgAAAIlQTkcNChoKAAAADUlIRFIAAAOEAAADAAgGAAAAfG+p9QAAIABJ
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace FireWallet
|
||||
private void NewAccountForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
page = 0;
|
||||
Dictionary<string, string> theme = mainForm.theme;
|
||||
Dictionary<string, string> theme = mainForm.Theme;
|
||||
this.BackColor = ColorTranslator.FromHtml(theme["background"]);
|
||||
this.ForeColor = ColorTranslator.FromHtml(theme["foreground"]);
|
||||
foreach (Control c in Controls)
|
||||
@@ -208,7 +208,7 @@ namespace FireWallet
|
||||
proc.StartInfo.UseShellExecute = false;
|
||||
proc.StartInfo.RedirectStandardError = true;
|
||||
proc.StartInfo.FileName = "node.exe";
|
||||
proc.StartInfo.Arguments = mainForm.dir + "hsd-ledger/bin/hsd-ledger createwallet " + textBoxNewPass1.Text + " --api-key " + mainForm.nodeSettings["Key"];
|
||||
proc.StartInfo.Arguments = mainForm.dir + "hsd-ledger/bin/hsd-ledger createwallet " + textBoxNewPass1.Text + " --api-key " + mainForm.NodeSettings["Key"];
|
||||
var outputBuilder = new StringBuilder();
|
||||
|
||||
// Event handler for capturing output data
|
||||
@@ -243,10 +243,10 @@ namespace FireWallet
|
||||
HttpClient httpClient = new HttpClient();
|
||||
private async Task<string> APIPut(string path, bool wallet, string content)
|
||||
{
|
||||
string key = mainForm.nodeSettings["Key"];
|
||||
string ip = mainForm.nodeSettings["IP"];
|
||||
string key = mainForm.NodeSettings["Key"];
|
||||
string ip = mainForm.NodeSettings["IP"];
|
||||
string port = "1203";
|
||||
if (mainForm.network == 1)
|
||||
if (mainForm.HSDNetwork == 1)
|
||||
{
|
||||
port = "1303";
|
||||
}
|
||||
|
||||
11
FireWallet/SplashScreen.Designer.cs
generated
11
FireWallet/SplashScreen.Designer.cs
generated
@@ -28,21 +28,13 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen));
|
||||
timerSplashDelay = new System.Windows.Forms.Timer(components);
|
||||
label1 = new Label();
|
||||
pictureBox1 = new PictureBox();
|
||||
label2 = new Label();
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// timerSplashDelay
|
||||
//
|
||||
timerSplashDelay.Enabled = true;
|
||||
timerSplashDelay.Interval = 3000;
|
||||
timerSplashDelay.Tick += timerSplashDelay_Tick;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
label1.AutoSize = true;
|
||||
@@ -91,7 +83,6 @@
|
||||
ShowInTaskbar = false;
|
||||
StartPosition = FormStartPosition.CenterScreen;
|
||||
Text = "FireWallet";
|
||||
TopMost = true;
|
||||
FormClosing += SplashScreen_FormClosing;
|
||||
((System.ComponentModel.ISupportInitialize)pictureBox1).EndInit();
|
||||
ResumeLayout(false);
|
||||
@@ -99,8 +90,6 @@
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Timer timerSplashDelay;
|
||||
private Label label1;
|
||||
private PictureBox pictureBox1;
|
||||
private Label label2;
|
||||
|
||||
@@ -13,23 +13,25 @@ namespace FireWallet
|
||||
{
|
||||
public partial class SplashScreen : Form
|
||||
{
|
||||
public SplashScreen()
|
||||
public SplashScreen(bool timer)
|
||||
{
|
||||
InitializeComponent();
|
||||
close = false;
|
||||
}
|
||||
bool close;
|
||||
private void timerSplashDelay_Tick(object sender, EventArgs e)
|
||||
private void SplashScreen_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
if (!close)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
public void CloseSplash()
|
||||
{
|
||||
close = true;
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void SplashScreen_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void label2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ProcessStartInfo psi = new ProcessStartInfo
|
||||
|
||||
@@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="timerSplashDelay.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
@@ -22,8 +22,8 @@ namespace FireWallet
|
||||
{
|
||||
InitializeComponent();
|
||||
// Theme
|
||||
this.BackColor = ColorTranslator.FromHtml(mainForm.theme["background"]);
|
||||
this.ForeColor = ColorTranslator.FromHtml(mainForm.theme["foreground"]);
|
||||
this.BackColor = ColorTranslator.FromHtml(mainForm.Theme["background"]);
|
||||
this.ForeColor = ColorTranslator.FromHtml(mainForm.Theme["foreground"]);
|
||||
foreach (Control c in Controls)
|
||||
{
|
||||
mainForm.ThemeControl(c);
|
||||
@@ -35,7 +35,7 @@ namespace FireWallet
|
||||
|
||||
private async void TXForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
tx = JObject.Parse(await mainForm.APIGet("wallet/"+mainForm.account+"/tx/" + txid,true));
|
||||
tx = JObject.Parse(await mainForm.APIGet("wallet/"+mainForm.Account+"/tx/" + txid,true));
|
||||
|
||||
this.Text = "TX: " + tx["hash"].ToString();
|
||||
labelHash.Text = "Hash: " + tx["hash"].ToString();
|
||||
@@ -79,7 +79,7 @@ namespace FireWallet
|
||||
|
||||
panelInputs.Controls.Add(PanelInput);
|
||||
}
|
||||
|
||||
panelInputs.Visible = true;
|
||||
// For each output
|
||||
JArray outputs = (JArray)tx["outputs"];
|
||||
foreach (JObject output in outputs)
|
||||
@@ -136,15 +136,13 @@ namespace FireWallet
|
||||
|
||||
panelOutputs.Controls.Add(PanelOutput);
|
||||
}
|
||||
|
||||
panelInputs.Visible = true;
|
||||
panelOutputs.Visible = true;
|
||||
}
|
||||
|
||||
private void Explorer_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Open the transaction in a browser
|
||||
string url = mainForm.userSettings["explorer-tx"] + tx["hash"].ToString();
|
||||
string url = mainForm.UserSettings["explorer-tx"] + tx["hash"].ToString();
|
||||
ProcessStartInfo psi = new ProcessStartInfo
|
||||
{
|
||||
FileName = url,
|
||||
|
||||
29
FireWallet/TransferForm.Designer.cs
generated
29
FireWallet/TransferForm.Designer.cs
generated
@@ -36,6 +36,8 @@
|
||||
label2 = new Label();
|
||||
textBoxAddress = new TextBox();
|
||||
labelError = new Label();
|
||||
labelSendingHIPAddress = new Label();
|
||||
labelHIPArrow = new Label();
|
||||
SuspendLayout();
|
||||
//
|
||||
// buttonTransfer
|
||||
@@ -105,18 +107,41 @@
|
||||
// labelError
|
||||
//
|
||||
labelError.AutoSize = true;
|
||||
labelError.Location = new Point(46, 139);
|
||||
labelError.Location = new Point(492, 139);
|
||||
labelError.Name = "labelError";
|
||||
labelError.Size = new Size(98, 15);
|
||||
labelError.TabIndex = 6;
|
||||
labelError.Text = "Address not valid";
|
||||
labelError.Visible = false;
|
||||
//
|
||||
// labelSendingHIPAddress
|
||||
//
|
||||
labelSendingHIPAddress.AutoSize = true;
|
||||
labelSendingHIPAddress.Location = new Point(75, 150);
|
||||
labelSendingHIPAddress.Name = "labelSendingHIPAddress";
|
||||
labelSendingHIPAddress.Size = new Size(64, 15);
|
||||
labelSendingHIPAddress.TabIndex = 19;
|
||||
labelSendingHIPAddress.Text = "To Address";
|
||||
labelSendingHIPAddress.Visible = false;
|
||||
//
|
||||
// labelHIPArrow
|
||||
//
|
||||
labelHIPArrow.AutoSize = true;
|
||||
labelHIPArrow.Font = new Font("Segoe UI", 18F, FontStyle.Bold, GraphicsUnit.Point);
|
||||
labelHIPArrow.Location = new Point(46, 139);
|
||||
labelHIPArrow.Name = "labelHIPArrow";
|
||||
labelHIPArrow.Size = new Size(32, 32);
|
||||
labelHIPArrow.TabIndex = 20;
|
||||
labelHIPArrow.Text = "⮡ ";
|
||||
labelHIPArrow.Visible = false;
|
||||
//
|
||||
// TransferForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(602, 340);
|
||||
Controls.Add(labelSendingHIPAddress);
|
||||
Controls.Add(labelHIPArrow);
|
||||
Controls.Add(labelError);
|
||||
Controls.Add(textBoxAddress);
|
||||
Controls.Add(label2);
|
||||
@@ -143,5 +168,7 @@
|
||||
private Label label2;
|
||||
private TextBox textBoxAddress;
|
||||
private Label labelError;
|
||||
private Label labelSendingHIPAddress;
|
||||
private Label labelHIPArrow;
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,8 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using DnsClient.Protocol;
|
||||
using DnsClient;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace FireWallet
|
||||
@@ -23,18 +25,18 @@ namespace FireWallet
|
||||
Domain = domain;
|
||||
this.Text = "Transfer " + Domain + " | FireWallet";
|
||||
label1.Text = "Transfer " + Domain;
|
||||
if (MainForm.theme.ContainsKey("error"))
|
||||
if (MainForm.Theme.ContainsKey("error"))
|
||||
{
|
||||
labelError.ForeColor = ColorTranslator.FromHtml(MainForm.theme["error"]);
|
||||
labelError.ForeColor = ColorTranslator.FromHtml(MainForm.Theme["error"]);
|
||||
}
|
||||
if (MainForm.watchOnly)
|
||||
if (MainForm.WatchOnly)
|
||||
{
|
||||
buttonTransfer.Enabled = false; // watch only wallet only batch
|
||||
}
|
||||
|
||||
// Theme
|
||||
this.BackColor = ColorTranslator.FromHtml(MainForm.theme["background"]);
|
||||
this.ForeColor = ColorTranslator.FromHtml(MainForm.theme["foreground"]);
|
||||
this.BackColor = ColorTranslator.FromHtml(MainForm.Theme["background"]);
|
||||
this.ForeColor = ColorTranslator.FromHtml(MainForm.Theme["foreground"]);
|
||||
foreach (Control c in Controls)
|
||||
{
|
||||
MainForm.ThemeControl(c);
|
||||
@@ -46,16 +48,19 @@ namespace FireWallet
|
||||
this.Close();
|
||||
}
|
||||
|
||||
string address = "";
|
||||
private async void buttonTransfer_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!await MainForm.ValidAddress(textBoxAddress.Text))
|
||||
updateAddress();
|
||||
|
||||
if (!await MainForm.ValidAddress(address))
|
||||
{
|
||||
labelError.Show();
|
||||
return;
|
||||
}
|
||||
|
||||
string content = "{\"method\": \"sendtransfer\",\"params\": [ \"" + Domain + "\", \"" +
|
||||
textBoxAddress.Text + "\"]}";
|
||||
address + "\"]}";
|
||||
string output = await MainForm.APIPost("", true, content);
|
||||
JObject APIresp = JObject.Parse(output);
|
||||
if (APIresp["error"].ToString() != "")
|
||||
@@ -68,7 +73,7 @@ namespace FireWallet
|
||||
}
|
||||
JObject result = JObject.Parse(APIresp["result"].ToString());
|
||||
string hash = result["hash"].ToString();
|
||||
string link = MainForm.userSettings["explorer-tx"] + hash;
|
||||
string link = MainForm.UserSettings["explorer-tx"] + hash;
|
||||
NotifyForm notifySuccess = new NotifyForm("Transaction Sent\nThis transaction could take up to 20 minutes to mine",
|
||||
"Explorer", link);
|
||||
notifySuccess.ShowDialog();
|
||||
@@ -78,14 +83,113 @@ namespace FireWallet
|
||||
|
||||
private async void buttonBatch_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!await MainForm.ValidAddress(textBoxAddress.Text))
|
||||
updateAddress();
|
||||
|
||||
if (!await MainForm.ValidAddress(address))
|
||||
{
|
||||
labelError.Show();
|
||||
return;
|
||||
}
|
||||
|
||||
MainForm.AddBatch(Domain, "TRANSFER", textBoxAddress.Text);
|
||||
MainForm.AddBatch(Domain, "TRANSFER", address);
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void updateAddress()
|
||||
{
|
||||
labelError.Hide();
|
||||
|
||||
if (textBoxAddress.Text.Length < 1)
|
||||
{
|
||||
address = "";
|
||||
return;
|
||||
}
|
||||
if (textBoxAddress.Text.Substring(0, 1) == "@")
|
||||
{
|
||||
string domain = textBoxAddress.Text.Substring(1);
|
||||
|
||||
try
|
||||
{
|
||||
IPAddress iPAddress = null;
|
||||
|
||||
|
||||
// Create an instance of LookupClient using the custom options
|
||||
NameServer nameServer = new NameServer(IPAddress.Parse("127.0.0.1"), 5350);
|
||||
var options = new LookupClientOptions(nameServer);
|
||||
options.EnableAuditTrail = true;
|
||||
options.UseTcpOnly = true;
|
||||
options.Recursion = true;
|
||||
options.UseCache = false;
|
||||
options.RequestDnsSecRecords = true;
|
||||
options.Timeout = TimeSpan.FromSeconds(5);
|
||||
|
||||
|
||||
var client = new LookupClient(options);
|
||||
|
||||
|
||||
// Perform the DNS lookup for the specified domain using DNSSec
|
||||
|
||||
var result = client.Query(domain, QueryType.A);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Display the DNS lookup results
|
||||
foreach (var record in result.Answers.OfType<ARecord>())
|
||||
{
|
||||
iPAddress = record.Address;
|
||||
}
|
||||
|
||||
if (iPAddress == null)
|
||||
{
|
||||
labelError.Show();
|
||||
labelError.Text = "HIP-02 lookup failed";
|
||||
return;
|
||||
}
|
||||
|
||||
// Get TLSA record
|
||||
var resultTLSA = client.Query("_443._tcp." + domain, QueryType.TLSA);
|
||||
foreach (var record in resultTLSA.Answers.OfType<TlsaRecord>())
|
||||
{
|
||||
MainForm.TLSA = record.CertificateAssociationDataAsString;
|
||||
}
|
||||
|
||||
|
||||
|
||||
string url = "https://" + iPAddress.ToString() + "/.well-known/wallets/HNS";
|
||||
var handler = new HttpClientHandler();
|
||||
|
||||
handler.ServerCertificateCustomValidationCallback = MainForm.ValidateServerCertificate;
|
||||
|
||||
// Create an instance of HttpClient with the custom handler
|
||||
using (var httpclient = new HttpClient(handler))
|
||||
{
|
||||
httpclient.DefaultRequestHeaders.Add("Host", domain);
|
||||
// Send a GET request to the specified URL
|
||||
HttpResponseMessage response = httpclient.GetAsync(url).Result;
|
||||
|
||||
// Response
|
||||
string address = response.Content.ReadAsStringAsync().Result;
|
||||
|
||||
labelSendingHIPAddress.Text = address;
|
||||
this.address = address;
|
||||
labelSendingHIPAddress.Show();
|
||||
labelHIPArrow.Show();
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MainForm.AddLog(ex.Message);
|
||||
labelError.Show();
|
||||
labelError.Text = "HIP-02 lookup failed";
|
||||
}
|
||||
} else
|
||||
{
|
||||
address = textBoxAddress.Text;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,15 +224,15 @@
|
||||
{
|
||||
"Name" = "8:Microsoft Visual Studio"
|
||||
"ProductName" = "8:FireWallet"
|
||||
"ProductCode" = "8:{CA9B8BF8-C03C-4C1F-BF5E-768B5897DB34}"
|
||||
"PackageCode" = "8:{A830408F-C770-4E8D-BEE3-22D4736728B5}"
|
||||
"ProductCode" = "8:{C118B90C-B5A0-4015-B03A-FB226DC02F54}"
|
||||
"PackageCode" = "8:{FF49B317-BBC1-40D9-9AFF-315E3AEED79C}"
|
||||
"UpgradeCode" = "8:{0C86F725-6B01-4173-AA05-3F0EDF481362}"
|
||||
"AspNetVersion" = "8:"
|
||||
"RestartWWWService" = "11:FALSE"
|
||||
"RemovePreviousVersions" = "11:TRUE"
|
||||
"DetectNewerInstalledVersion" = "11:TRUE"
|
||||
"InstallAllUsers" = "11:FALSE"
|
||||
"ProductVersion" = "8:2.6"
|
||||
"ProductVersion" = "8:3.3"
|
||||
"Manufacturer" = "8:Nathan.Woodburn/"
|
||||
"ARPHELPTELEPHONE" = "8:"
|
||||
"ARPHELPLINK" = "8:https://l.woodburn.au/discord"
|
||||
|
||||
38
README.md
38
README.md
@@ -2,6 +2,14 @@
|
||||
Experimental wallet for Handshake chain
|
||||
|
||||
## Installation
|
||||
### Dependencies
|
||||
You will need .net desktop installed. You can download it from [here](https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.18-windows-x64-installer).
|
||||
|
||||
You will also need Node, NPM, and git installed if you want to use the internal HSD or Ledger wallets.
|
||||
[Git](https://git-scm.com/downloads)
|
||||
[Node](https://nodejs.org/en/download/)
|
||||
[NPM](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
|
||||
|
||||
### From Releases
|
||||
You can install the latest release from [here](https://github.com/Nathanwoodburn/FireWallet/releases/).
|
||||
|
||||
@@ -60,6 +68,9 @@ You can change the number of transactions shown in the `portfolio-tx:` settings.
|
||||
<br><br>
|
||||
## Sending HNS
|
||||

|
||||
This page lets you send HNS to Handshake addresses or domains using [HIP-02](https://github.com/handshake-org/HIPs/blob/master/HIP-0002.md).
|
||||
To use HIP-02 you need to have HSD resolver (or any HNS compatible DNS resolver) listening on port 5350 (default HSD port).
|
||||
To enter a domain to use HIP-02 you need to prefix the domain with `@` (eg. `@nathan.woodburn`).
|
||||
|
||||
## Receiving HNS or Domains
|
||||
The receive page shows your current HNS address.
|
||||
@@ -102,8 +113,7 @@ You can add transactions to the batch from the domain window or the DNS editor.
|
||||
You can also import a list of domains to the batch window.
|
||||
The "CANCEL" transaction type is used to cancel an transfer.
|
||||
|
||||
At the momemt "UPDATE" or coin only transactions are not supported.
|
||||
|
||||
Please not that the import syntax for BIDs is BID,LOCKUP where LOCKUP is (BID+BLIND)
|
||||

|
||||
|
||||
## Exporting
|
||||
@@ -128,12 +138,27 @@ They are stored in `%appdata%\FireWallet\` (`C:\Users\{username}\AppData\Roaming
|
||||
|
||||
## settings.txt
|
||||
This file stores the user settings for the application.
|
||||
If you want to change the default HIP-02 resolver you can add these settings
|
||||
```yaml
|
||||
hip-02-ip: 127.0.0.1
|
||||
hip-02-port: 5350
|
||||
```
|
||||
|
||||
|
||||
## node.txt
|
||||
This file stores the node (HSD/Bob connection) settings.
|
||||
The Network is the network you want to connect to (default is `0` for Mainnet).
|
||||
If you delete this file, FireWallet will show the node setup screen on next startup.
|
||||
|
||||
You can set a custom HSD launch command by setting the `hsd-command` key.
|
||||
The default launch is the same as this
|
||||
```yaml
|
||||
HSD-command: {default-dir} --agent=FireWallet --index-tx --index-address --api-key {key} --prefix {Bob}
|
||||
```
|
||||
The `{default-dir}` will be replaced with the HSD directory `%appdata%\FireWallet\hsd\`.
|
||||
The `{key}` will be replaced with the API key from the node.txt file.
|
||||
The `{Bob}` will be replaced with the Bob wallet HSD data directory `%appdata%\Bob\hsd_data\` this is used to sync FireWallet with Bob's accounts and also stops you needing to sync the chain twice.
|
||||
|
||||
## theme.txt
|
||||
This file stores the theme settings.
|
||||
The theme is the color scheme of the application.
|
||||
@@ -142,4 +167,11 @@ There are 4 modes: `off` is disabled, `mica` is windows app style, `key` is to m
|
||||
|
||||
## log.txt
|
||||
This file stores the logs for the application.
|
||||
You should check this file if you have any issues with the application.
|
||||
You should check this file if you have any issues with the application.
|
||||
|
||||
|
||||
# Support
|
||||
If you have any issues with the application you can open an issue on GitHub or contact me on Discord (NathanWoodburn on most Handshake servers).
|
||||
|
||||
If you would like to support this project you can find out how at https://nathan.woodburn.au/#donate or you can help by contributing to the project on GitHub.
|
||||
Also you can send HNS directly to `@firewallet`
|
||||
@@ -6,4 +6,4 @@ woodburn4,BID,1,3
|
||||
woodburn5,BID,1,3
|
||||
woodburn6,BID,1,4
|
||||
woodburn8,TRANSFER,hs1qlmlgnx0g3ynk4ylxkkdh9c9nernclnfq4lw6s9
|
||||
exampledomainnathan118,UPDATE,[{"type": "DS","keyTag": 20167,"algorithm": 13,"digestType": 2,"digest":"4a2ab3224727a4754a6c3d77621a5b04241a3d9c7ae7e5fa17f73121b9ff0e06"}, {"type": "NS","ns": "ns1.woodburn."}, {"type": "NS","ns": "ns2.woodburn."}, {"type": "TXT","txt": ["TEST"]}]
|
||||
exampledomainnathan90,UPDATE,[{"type": "NS","ns": "ns1.woodburn."};{"type": "NS","ns": "ns2.woodburn."};{"type": "DS","keyTag": 30273,"algorithm": 13,"digestType": 2,"digest":"9a3a8fb3d625d2a2073d740f10da6056ebed0e97f550aa7f3891ed450c7e60c9"};{"type": "GLUE4","ns": "ns1.exampledomainnathan90.","address": "1.2.3.4"};{"type": "TXT","txt": ["Test TXT record"]}]
|
||||
@@ -1,3 +1,5 @@
|
||||
IP: 127.0.0.1
|
||||
Network: 0
|
||||
Key: my-super-secret-api-key
|
||||
HSD: False
|
||||
HSD-command: {default-dir} --agent=FireWallet --index-tx --index-address --api-key {key} --prefix {Bob}
|
||||
15
hsd-ledger
15
hsd-ledger
@@ -136,20 +136,14 @@ async function sendRaw(wclient, nclient, config, ledger, args) { // Create a fun
|
||||
const network = Network.get(config.str('network')); // Get the network
|
||||
const id = config.str('wallet-id'); // Get the wallet id
|
||||
const acct = config.str('account-name'); // Get the account name
|
||||
const batch = args[0]; // Get the batch file location
|
||||
const nameslocation = args[1]; // Get the names file location
|
||||
// Log the arguments to the console (for debugging)
|
||||
|
||||
const batch = JSON.parse(args[0]); // Get the batch
|
||||
const names = JSON.parse(args[1]); // Get the names
|
||||
await wclient.execute('selectwallet', [id]); // Select the wallet
|
||||
|
||||
|
||||
const fs = require('fs'); // Import fs (used to read files)
|
||||
try {
|
||||
const data = fs.readFileSync(batch, 'utf8'); // Read the batch file
|
||||
const json = JSON.parse(data); // Parse the batch file as JSON
|
||||
const mtx = MTX.fromJSON(json.result); // Create a new MTX from the JSON
|
||||
|
||||
const namefile = fs.readFileSync(nameslocation, 'utf8'); // Read the names file
|
||||
const names = namefile.split(','); // Split the names file into an array
|
||||
const mtx = MTX.fromJSON(batch.result); // Create a new MTX from the JSON
|
||||
const hashes = {}; // Create an empty object to store the hashes
|
||||
for (const name of names) { // Loop through the names
|
||||
const hash = hashName(name); // Hash the name
|
||||
@@ -428,6 +422,7 @@ function usage(err) {
|
||||
console.log(' $ hsd-ledger createaccount <account-name> <account-index>');
|
||||
console.log(' $ hsd-ledger createaddress');
|
||||
console.log(' $ hsd-ledger sendtoaddress <address> <amount>');
|
||||
console.log(' $ hsd-ledger sendraw <batch> <names>');
|
||||
console.log(' $ hsd-ledger getwallets');
|
||||
console.log(' $ hsd-ledger getaccounts');
|
||||
console.log(' $ hsd-ledger getaccount <account-name>');
|
||||
|
||||
Reference in New Issue
Block a user