Skip to content

Commit 03ccfa9

Browse files
authored
Merge pull request #16 from dulovics/add-usage-to-readme
Update README.md with build and run instructions
2 parents 3aa6c17 + 53b6a51 commit 03ccfa9

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

README.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,61 @@ your own risk.**
1010

1111
An application that uses AshMaize PoW algorithm to scavenge for night.
1212

13+
# Building from source with 'cargo', if you don't have nix
14+
15+
16+
```bash
17+
cargo build --release
18+
```
19+
20+
If you encounter issue with the build try to run `cargo fix --bin "shadow-harvester"`
21+
22+
Run
23+
24+
```bash
25+
cargo run --release -- <args>
26+
```
27+
OR
28+
29+
30+
```bash
31+
./target/release/shadow-harvester <args>
32+
```
33+
34+
# Usage
35+
The below commands will use `nix` for running the command, if you don't use nix you can use `cargo` or just build `./target/release/shadow-harvester <args>`
36+
37+
38+
## Running with a Mnemonic File
39+
40+
To run Shadow Harvester with a mnemonic file:
41+
42+
```bash
43+
nix run .\#shadow-harvester -- --api-url https://scavenger.prod.gd.midnighttge.io --accept-tos --mnemonic-file wallet.mnemonic
44+
```
45+
46+
## Creating a Wallet
47+
48+
If you haven't created a wallet yet, you can generate a recovery phrase using `cardano-address`:
49+
50+
```bash
51+
cardano-address recovery-phrase generate > wallet.mnemonic
52+
```
53+
54+
**Security Note:** There is always a security risk when using plain text mnemonics. For Midnight, it is recommended that you transfer your NIGHT tokens to your preferred secure wallets after the glacier drop period concludes.
55+
56+
## Running with a Single Payment Key
57+
58+
If you just want to mine with a single key:
59+
60+
```bash
61+
nix run .\#shadow-harvester -- --api-url https://scavenger.prod.gd.midnighttge.io --accept-tos --payment-key "YOURED25519PRIVATEKEY"
62+
```
63+
64+
**Note on Ephemeral Keys**
65+
66+
Ephemeral keys are not recommended for use. Currently, the donate-to endpoint is not active, which means any keys generated ephemerally are discarded and never persisted to disk. While this approach was initially considered, the implementation was switched to mnemonic-based keys due to the non-functional donate-to endpoint. Use mnemonic files or payment keys instead until the donate-to functionality becomes available.
67+
1368
# License
1469

1570
This project is licensed under either of the following licenses:

0 commit comments

Comments
 (0)