2025-01-26 12:14:22 +11:00
|
|
|
# hns-address
|
|
|
|
|
2025-01-27 18:23:04 +11:00
|
|
|
## Setup
|
|
|
|
|
|
|
|
```bash
|
|
|
|
git clone https://git.woodburn.au/nathanwoodburn/hns-address.git
|
|
|
|
cd hns-address
|
2025-01-27 21:33:14 +11:00
|
|
|
npm install
|
2025-01-27 18:23:04 +11:00
|
|
|
```
|
|
|
|
|
|
|
|
## Find an address
|
2025-01-27 21:33:14 +11:00
|
|
|
- `xpub`: the account extended public key
|
|
|
|
- `address`: the address to search for
|
|
|
|
- `start`: the starting index (default: 0)
|
|
|
|
- `end`: the ending index (default: 0x7fffffff)
|
2025-01-27 18:23:04 +11:00
|
|
|
|
|
|
|
|
|
|
|
```bash
|
2025-01-27 21:33:14 +11:00
|
|
|
node find-address.js --xpub your-xpub-key --address address-to-search-for
|
2025-01-27 18:23:04 +11:00
|
|
|
```
|
|
|
|
|
|
|
|
## Generate addresses
|
2025-01-27 21:33:14 +11:00
|
|
|
- `xpub`: the account extended public key
|
|
|
|
- `number`: the number of addresses to generate (default: 1000)
|
|
|
|
- `start`: the starting index (default: 0)
|
|
|
|
- `change`: toggle to display change addresses (default: false)
|
2025-01-27 18:23:04 +11:00
|
|
|
|
|
|
|
|
2025-01-27 21:33:14 +11:00
|
|
|
Generate the first 1000 addresses.
|
|
|
|
```bash
|
|
|
|
node generate-address.js --xpub your-xpub-key --number 1000
|
|
|
|
```
|
2025-01-27 18:23:04 +11:00
|
|
|
|
2025-01-27 21:33:14 +11:00
|
|
|
Generate addresses from 1000 to 1010 and display change addresses.
|
2025-01-27 18:23:04 +11:00
|
|
|
```bash
|
2025-01-27 21:33:14 +11:00
|
|
|
node generate-address.js --xpub your-xpub-key --number 10 --start 1000 --change
|
2025-01-27 18:23:04 +11:00
|
|
|
```
|
2025-01-27 21:33:14 +11:00
|
|
|
|
2025-01-27 18:23:04 +11:00
|
|
|
Probably best to save the output to a file.
|
|
|
|
```bash
|
2025-01-27 21:33:14 +11:00
|
|
|
node generate-address.js --xpub your-xpub-key > addresses.txt
|
2025-01-27 18:23:04 +11:00
|
|
|
```
|