]> git.codecow.com Git - nano-pow.git/commitdiff
Fix server GET response instructions.
authorChris Duncan <chris@codecow.com>
Fri, 10 Apr 2026 22:03:45 +0000 (15:03 -0700)
committerChris Duncan <chris@codecow.com>
Fri, 10 Apr 2026 22:03:45 +0000 (15:03 -0700)
src/bin/server.ts

index bf381bd50910e88c8f8880e272fdd68b9d81beb1..a6aea39a3f48bfc7665f5a75edbfd0f56ab555e3 100755 (executable)
@@ -216,15 +216,17 @@ function get (res: http.ServerResponse): void {
                .end(`Usage: Send POST request to server URL to generate or validate Nano proof-of-work
 
 Generate work for a HASH with an optional DIFFICULTY:
-  curl -d '{ action: "work_generate", hash: HASH, difficulty?: DIFFICULTY }'
+  curl -d '{ "action": "work_generate", "hash": HASH, "difficulty": DIFFICULTY }' nanopow.example.com
 
 Validate WORK previously calculated for a HASH with an optional DIFFICULTY:
-  curl -d '{ action: "work_validate", work: WORK, hash: HASH, difficulty?: DIFFICULTY }'
+  curl -d '{ "action": "work_validate", "work": WORK, "hash": HASH, "difficulty": DIFFICULTY }' nanopow.example.com
 
 HASH is a big-endian 64-character hexadecimal string.
 WORK is little-endian 16-character hexadecimal string.
 DIFFICULTY is an optional 16-character hexadecimal string (default: FFFFFFF800000000)
 
+String variables must be enclosed in double-quotes to be valid JSON.
+
 Report bugs: <bug-nano-pow@codecow.com>
 Full documentation: <https://www.npmjs.com/package/nano-pow>
 `)