feat: implement hashcash proof-of-work for session creation #63
@@ -2189,7 +2189,7 @@ Both the embedded web SPA and the CLI client automatically handle hashcash:
|
||||
|
||||
1. Fetch `GET /api/v1/server` to read `hashcash_bits`
|
||||
2. If `hashcash_bits > 0`, compute a valid stamp
|
||||
3. Include the stamp in the `hashcash` field of the JSON body on `POST /api/v1/session`
|
||||
3. Include the stamp in the `pow_token` field of the JSON body on `POST /api/v1/session`
|
||||
|
||||
The web SPA uses the Web Crypto API (`crypto.subtle.digest`) for SHA-256
|
||||
computation with batched parallelism. The CLI client uses Go's `crypto/sha256`.
|
||||
|
||||
Reference in New Issue
Block a user