fix: complete pow_token rename in README documentation
All checks were successful
check / check (push) Successful in 4s
All checks were successful
check / check (push) Successful in 4s
Update 4 remaining references where the JSON field name was still 'hashcash' instead of 'pow_token' in README.md.
This commit is contained in:
@@ -989,7 +989,7 @@ Create a new user session. This is the entry point for all clients.
|
|||||||
|
|
||||||
If the server requires hashcash proof-of-work (see
|
If the server requires hashcash proof-of-work (see
|
||||||
[Hashcash Proof-of-Work](#hashcash-proof-of-work)), the client must include a
|
[Hashcash Proof-of-Work](#hashcash-proof-of-work)), the client must include a
|
||||||
valid stamp in the `hashcash` field of the JSON request body. The required
|
valid stamp in the `pow_token` field of the JSON request body. The required
|
||||||
difficulty is advertised via `GET /api/v1/server` in the `hashcash_bits` field.
|
difficulty is advertised via `GET /api/v1/server` in the `hashcash_bits` field.
|
||||||
|
|
||||||
**Request Body:**
|
**Request Body:**
|
||||||
@@ -1000,7 +1000,7 @@ difficulty is advertised via `GET /api/v1/server` in the `hashcash_bits` field.
|
|||||||
| Field | Type | Required | Constraints |
|
| Field | Type | Required | Constraints |
|
||||||
|------------|--------|-------------|-------------|
|
|------------|--------|-------------|-------------|
|
||||||
| `nick` | string | Yes | 1–32 characters, must be unique on the server |
|
| `nick` | string | Yes | 1–32 characters, must be unique on the server |
|
||||||
| `hashcash` | string | Conditional | Hashcash stamp (required when server has `hashcash_bits` > 0) |
|
| `pow_token` | string | Conditional | Hashcash stamp (required when server has `hashcash_bits` > 0) |
|
||||||
|
|
||||||
**Response:** `201 Created`
|
**Response:** `201 Created`
|
||||||
```json
|
```json
|
||||||
@@ -1022,7 +1022,7 @@ difficulty is advertised via `GET /api/v1/server` in the `hashcash_bits` field.
|
|||||||
| Status | Error | When |
|
| Status | Error | When |
|
||||||
|--------|-------|------|
|
|--------|-------|------|
|
||||||
| 400 | `nick must be 1-32 characters` | Empty or too-long nick |
|
| 400 | `nick must be 1-32 characters` | Empty or too-long nick |
|
||||||
| 402 | `hashcash proof-of-work required` | Missing `hashcash` field in request body when hashcash is enabled |
|
| 402 | `hashcash proof-of-work required` | Missing `pow_token` field in request body when hashcash is enabled |
|
||||||
| 402 | `invalid hashcash stamp: ...` | Stamp fails validation (wrong bits, expired, reused, etc.) |
|
| 402 | `invalid hashcash stamp: ...` | Stamp fails validation (wrong bits, expired, reused, etc.) |
|
||||||
| 409 | `nick already taken` | Another active session holds this nick |
|
| 409 | `nick already taken` | Another active session holds this nick |
|
||||||
|
|
||||||
@@ -2132,7 +2132,7 @@ account registration, no IP-based rate limits that punish shared networks.
|
|||||||
2. Client computes a hashcash stamp: find a counter value such that the
|
2. Client computes a hashcash stamp: find a counter value such that the
|
||||||
SHA-256 hash of the stamp string has the required number of leading zero
|
SHA-256 hash of the stamp string has the required number of leading zero
|
||||||
bits.
|
bits.
|
||||||
3. Client includes the stamp in the `hashcash` field of the JSON request body when creating
|
3. Client includes the stamp in the `pow_token` field of the JSON request body when creating
|
||||||
a session: `POST /api/v1/session`.
|
a session: `POST /api/v1/session`.
|
||||||
4. Server validates the stamp:
|
4. Server validates the stamp:
|
||||||
- Version is `1`
|
- Version is `1`
|
||||||
|
|||||||
Reference in New Issue
Block a user