feat: implement hashcash proof-of-work for session creation #63

Merged
sneak merged 11 commits from feat/hashcash-pow into main 2026-03-13 00:38:41 +01:00
Showing only changes of commit 6fece9a78c - Show all commits

View File

@@ -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`.