organic-protocol 0.3.0 → 0.3.1
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/PROTOCOL.md +1 -1
- package/dist/api.d.ts +6 -0
- package/package.json +1 -1
package/PROTOCOL.md
CHANGED
|
@@ -133,7 +133,7 @@ Ecosystem creation is free and instant — no admin approval, see the notes colu
|
|
|
133
133
|
| `POST /ecosystems/:pk/distribute` | timestamp | `EcosystemDistributeBody` → 200 | caller must be `isAdmin`/`isPayer`; manual only, no scheduling |
|
|
134
134
|
| `GET /validations` | timestamp | → `ValidationListEntry[]` | caller must be a current admin of the server's core ecosystem |
|
|
135
135
|
| `GET /validations/:pk` | timestamp | → `ValidationDetailResponse` | same auth; the admin's device reconstructs the chain locally and calls `validateAccount()` itself |
|
|
136
|
-
| `GET /validations/status/:pk` | — | → `ValidationStatusResponse` | public — for the candidate to poll |
|
|
136
|
+
| `GET /validations/status/:pk` | — | → `ValidationStatusResponse` | public — for the candidate to poll; `blocks` lets it adopt the validated chain the moment `status` flips to `active`, in the same round trip |
|
|
137
137
|
| `POST /validations/:pk/approve` | block | `ValidationApproveBody` → 200 | `block` is the admin's own already-signed `InitializationBlock`; the server's real check is that its signer is *currently* a core admin (`403 NOT_CORE_ADMIN` otherwise), not just that the signature is valid |
|
|
138
138
|
| `POST /validations/:pk/reject` | timestamp | `ValidationRejectBody` → 200 | caller must be a core admin; the row is kept with `status: 'rejected'`, not deleted |
|
|
139
139
|
|
package/dist/api.d.ts
CHANGED
|
@@ -203,8 +203,14 @@ export interface ValidationDetailResponse {
|
|
|
203
203
|
name: string;
|
|
204
204
|
blocks: BlockWire[];
|
|
205
205
|
}
|
|
206
|
+
/**
|
|
207
|
+
* blocks lets a still-pending candidate keep polling this single endpoint
|
|
208
|
+
* and, the moment status flips to active, adopt the now-validated chain
|
|
209
|
+
* (with the admin's InitializationBlock) without a second round trip.
|
|
210
|
+
*/
|
|
206
211
|
export interface ValidationStatusResponse {
|
|
207
212
|
status: MembershipStatus;
|
|
213
|
+
blocks: BlockWire[];
|
|
208
214
|
}
|
|
209
215
|
/**
|
|
210
216
|
* block is the InitializationBlock the admin already signed locally with
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "organic-protocol",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "The shared protocol of the Organic Economy: wire formats, QR codes and API contracts, verified by the TypeScript compiler. Companion of organic-money.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"organic-economy",
|