File size: 1,166 Bytes
35b8b9c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# The Protocol of Computation: API Contract

## Overview

This document defines the exchange format between the Sovereign Scholastic Academy (Hub) and contributing Virtual Nodes.

## Security Constraints

- All transport MUST use TLS 1.3.
- All tasks MUST be delivered encrypted; keys are derived per-session using ephemeral Diffie-Hellman exchanges.
- Final outputs MUST be signed by the node's private identity key.

## Endpoints

### 1. Node Registration

`POST /api/nodes/register`
Allows a node to authenticate and join the compute pool.

- _Request:_ `{ "nodeId": string, "publicKey": string, "capabilities": object }`
- _Response:_ `{ "nodeToken": string, "expiresAt": string }`

### 2. Task Acquisition

`GET /api/nodes/tasks`
Fetches an encrypted vulnerability enrichment task.

- _Headers:_ `Authorization: Bearer <nodeToken>`
- _Response:_ `{ "taskId": string, "payload": encrypted_blob, "checksum": string }`

### 3. Result Submission

`POST /api/nodes/tasks/:taskId/result`
Submits the encrypted, signed result of a computation.

- _Request:_ `{ "result": encrypted_blob, "signature": string }`
- _Response:_ `{ "status": "acknowledged" | "verified" }`