nano-pow 3.1.1 → 3.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +7 -10
- package/dist/nano-pow.1 +19 -17
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -9,21 +9,18 @@ const args = process.argv.slice(2)
|
|
|
9
9
|
if (args.length === 0 || args.some(v => v === '--help' || v === '-h')) {
|
|
10
10
|
console.log(`Usage: nano-pow [OPTION]... BLOCKHASH...
|
|
11
11
|
Generate work for BLOCKHASH, or multiple work values for BLOCKHASH(es)
|
|
12
|
-
BLOCKHASH is a 64-character hexadecimal string.
|
|
13
|
-
|
|
14
|
-
Prints a 16-character hexadecimal work value to standard output.
|
|
15
|
-
If using --validate, prints 'true' or 'false' to standard output instead.
|
|
16
|
-
All command options are optional.
|
|
12
|
+
BLOCKHASH is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks.
|
|
13
|
+
Prints a 16-character hexadecimal work value to standard output. If using --validate, prints 'true' or 'false' to standard output instead.
|
|
17
14
|
|
|
18
15
|
-h, --help show this dialog
|
|
19
16
|
-d, --debug enable additional logging output
|
|
20
|
-
-e, --effort
|
|
21
|
-
-t, --threshold
|
|
22
|
-
-v, --validate
|
|
17
|
+
-e, --effort=<value> increase demand on GPU processing
|
|
18
|
+
-t, --threshold=<value> override the minimum threshold value
|
|
19
|
+
-v, --validate=<value> check an existing work value instead of searching for one
|
|
23
20
|
|
|
24
21
|
If validating a nonce, it must be a 16-character hexadecimal value.
|
|
25
|
-
Effort must be a decimal number between 1
|
|
26
|
-
Threshold must be a hexadecimal
|
|
22
|
+
Effort must be a decimal number between 1-32.
|
|
23
|
+
Threshold must be a hexadecimal string between 0-FFFFFFFF.
|
|
27
24
|
|
|
28
25
|
Report bugs: <bug-nano-pow@zoso.dev>
|
|
29
26
|
Full documentation: <https://www.npmjs.com/package/nano-pow>
|
package/dist/nano-pow.1
CHANGED
|
@@ -11,15 +11,10 @@ nano-pow \- proof-of-work generation and validation for Nano cryptocurrency
|
|
|
11
11
|
|
|
12
12
|
.SH DESCRIPTION
|
|
13
13
|
Generate work for \fIBLOCKHASH\fR, or multiple work values for \fIBLOCKHASH\fR(es).
|
|
14
|
-
Nano PoW documentation: <https://docs.nano.org/integration-guides/work-generation/\#work-calculation-details>
|
|
15
14
|
.PP
|
|
16
|
-
\fIBLOCKHASH\fR is a 64-character hexadecimal string.
|
|
15
|
+
\fIBLOCKHASH\fR is a 64-character hexadecimal string. Multiple blockhashes must be separated by whitespace or line breaks.
|
|
17
16
|
.PP
|
|
18
|
-
|
|
19
|
-
.PP
|
|
20
|
-
Prints a 16-character hexadecimal work value to standard output.
|
|
21
|
-
.PP
|
|
22
|
-
If \fB--validate\fR is used, prints 'true' or 'false' to standard output.
|
|
17
|
+
Prints a 16-character hexadecimal work value to standard output. If \fB--validate\fR is used, prints 'true' or 'false' to standard output.
|
|
23
18
|
|
|
24
19
|
.SH OPTIONS
|
|
25
20
|
.TP
|
|
@@ -29,43 +24,50 @@ Show this help dialog and exit.
|
|
|
29
24
|
\fB\-d\fR, \fB\-\-debug\fR
|
|
30
25
|
Enable additional logging output.
|
|
31
26
|
.TP
|
|
32
|
-
\fB\-e\fR, \fB\-\-effort\fR
|
|
27
|
+
\fB\-e\fR, \fB\-\-effort\fR=\fIEFFORT\fR
|
|
33
28
|
Increase demand on GPU processing. Must be between 1 and 32 inclusive.
|
|
34
29
|
.TP
|
|
35
|
-
\fB\-t\fR, \fB\-\-threshold\fR
|
|
36
|
-
Override the minimum threshold value. Higher values increase difficulty. Must be
|
|
30
|
+
\fB\-t\fR, \fB\-\-threshold\fR=\fITHRESHOLD\fR
|
|
31
|
+
Override the minimum threshold value. Higher values increase difficulty. Must be a hexadecimal string between 0 and FFFFFFFF inclusive.
|
|
37
32
|
.TP
|
|
38
|
-
\fB\-v\fR, \fB\-\-validate\fR
|
|
33
|
+
\fB\-v\fR, \fB\-\-validate\fR=\fIWORK\fR
|
|
39
34
|
Check an existing work value instead of searching for one.
|
|
40
35
|
|
|
41
36
|
.SH EXAMPLES
|
|
37
|
+
.PP
|
|
42
38
|
Search for a work nonce for a blockhash using the default threshold 0xFFFFFFF8:
|
|
43
39
|
.EX
|
|
44
|
-
nano-pow
|
|
40
|
+
$ nano-pow \fB0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
|
|
45
41
|
.EE
|
|
46
42
|
|
|
43
|
+
.PP
|
|
47
44
|
Search for a work nonce using a custom threshold and increased effort:
|
|
48
45
|
.EX
|
|
49
|
-
nano-pow \-t fffffe00 \-e 32 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
46
|
+
$ nano-pow \fB\-t fffffe00 \-e 32 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
|
|
50
47
|
.EE
|
|
51
48
|
|
|
49
|
+
.PP
|
|
52
50
|
Search for multiple nonces from a file:
|
|
53
51
|
.EX
|
|
54
|
-
nano-pow $(cat /path/to/file.txt)
|
|
52
|
+
$ nano-pow \fB$(cat /path/to/file.txt)\fR
|
|
55
53
|
.EE
|
|
56
54
|
|
|
55
|
+
.PP
|
|
57
56
|
Validate an existing work nonce against a blockhash and show debugging output:
|
|
58
57
|
.EX
|
|
59
|
-
nano-pow \-d \-v fedcba9876543210 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef
|
|
58
|
+
$ nano-pow \fB\-d \-v fedcba9876543210 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef\fR
|
|
60
59
|
.EE
|
|
61
60
|
|
|
62
61
|
.SH AUTHOR
|
|
63
62
|
Written by Chris Duncan.
|
|
64
63
|
|
|
65
64
|
.SH BUGS
|
|
66
|
-
Email
|
|
65
|
+
Email <bug-nano-pow@zoso.dev>.
|
|
67
66
|
|
|
68
67
|
.SH COPYRIGHT
|
|
69
|
-
Copyright \(co 2025 Chris Duncan <chris@zoso.dev>
|
|
70
68
|
.PP
|
|
69
|
+
.EX
|
|
70
|
+
Copyright \(co 2025 Chris Duncan <chris@zoso.dev>
|
|
71
|
+
Nano PoW documentation: <https://docs.nano.org/integration-guides/work-generation/#work-calculation-details>
|
|
71
72
|
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
|
|
73
|
+
.EE
|