diff --git a/README.md b/README.md index 607b1f9..c442296 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,18 @@ Import this URL: ``` https://git.woodburn.au/nathanwoodburn/hns-address-plugin.git ``` + +## Usage +![Dashboard](assets/dash.png) + +### Generate +Enter the number of addresses you want to generate and click Generate +Note that you don't need to fill the fields as the default values will be used. This also creates a file in user_data with the result to allow easier copying + +![Generate](assets/generate.png) + +### Validate +Enter the address you want to validate and click Validate +Note that you don't need to fill the xPub field + +![Validate](assets/validate.png) \ No newline at end of file diff --git a/assets/dash.png b/assets/dash.png new file mode 100644 index 0000000..47b1bc3 Binary files /dev/null and b/assets/dash.png differ diff --git a/assets/generate.png b/assets/generate.png new file mode 100644 index 0000000..09186e0 Binary files /dev/null and b/assets/generate.png differ diff --git a/assets/validate.png b/assets/validate.png new file mode 100644 index 0000000..daa0d1d Binary files /dev/null and b/assets/validate.png differ diff --git a/hns-address.py b/hns-address.py index 0834893..68dcdc6 100644 --- a/hns-address.py +++ b/hns-address.py @@ -113,7 +113,7 @@ def generate(params, authentication): return {"result": "No xpub found"} result = subprocess.run(["node", "generate-address.js", "--xpub", xpub, "--number", str(count), "--startIndex", str(startIndex)], capture_output=True, text=True, cwd=hnsAddressPath) - with open(f"{xpub}-addresses.txt", "w") as f: + with open(f"user_data/{xpub}-addresses.txt", "w") as f: f.write(result.stdout) return {"result": result.stdout.split("\n")[2:-1]}