106 lines
2.3 KiB
Markdown
106 lines
2.3 KiB
Markdown
# Governance Installer API Examples
|
|
|
|
## Create Install Token
|
|
|
|
### Request
|
|
|
|
```http
|
|
POST /governance/install/token
|
|
Authorization: Bearer <wallet-session>
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"wallet": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
"device_id": "desktop-7f6f3a9b",
|
|
"launcher_version": "0.2.0",
|
|
"platform": "macos",
|
|
"current_runtime_version": "0.0.0"
|
|
}
|
|
```
|
|
|
|
### Response
|
|
|
|
```json
|
|
{
|
|
"install_token": "git_01J9B6A97WQG8GNYM4ZBX8E2NQ",
|
|
"install_token_expires_at": "2026-02-18T01:05:00Z",
|
|
"wallet": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
"entitlement_id": "ent_governance_001",
|
|
"package": {
|
|
"runtime_version": "1.0.0",
|
|
"package_url": "https://cdn.edut.ai/runtime/governance/1.0.0/macos-arm64.pkg",
|
|
"package_hash": "sha256:09f6d64f...",
|
|
"signature": "ed25519:8db9...",
|
|
"signer_key_id": "governance-signer-2026-01",
|
|
"policy_hash": "sha256:f10419ac...",
|
|
"rollout_channel": "stable"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Confirm Install
|
|
|
|
### Request
|
|
|
|
```http
|
|
POST /governance/install/confirm
|
|
Authorization: Bearer <wallet-session>
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"install_token": "git_01J9B6A97WQG8GNYM4ZBX8E2NQ",
|
|
"wallet": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
"device_id": "desktop-7f6f3a9b",
|
|
"entitlement_id": "ent_governance_001",
|
|
"package_hash": "sha256:09f6d64f...",
|
|
"runtime_version": "1.0.0",
|
|
"installed_at": "2026-02-18T01:01:48Z",
|
|
"launcher_receipt_hash": "sha256:8102d437..."
|
|
}
|
|
```
|
|
|
|
### Response
|
|
|
|
```json
|
|
{
|
|
"status": "governance_active",
|
|
"wallet": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
"device_id": "desktop-7f6f3a9b",
|
|
"entitlement_id": "ent_governance_001",
|
|
"runtime_version": "1.0.0",
|
|
"activated_at": "2026-02-18T01:01:50Z"
|
|
}
|
|
```
|
|
|
|
## Install Status
|
|
|
|
### Request
|
|
|
|
```http
|
|
GET /governance/install/status?wallet=0x742d35Cc6634C0532925a3b844Bc454e4438f44e&device_id=desktop-7f6f3a9b
|
|
Authorization: Bearer <wallet-session>
|
|
```
|
|
|
|
### Response
|
|
|
|
```json
|
|
{
|
|
"wallet": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
|
|
"membership_status": "active",
|
|
"entitlement_status": "active",
|
|
"activation_status": "active",
|
|
"latest_runtime_version": "1.0.0",
|
|
"policy_hash": "sha256:f10419ac..."
|
|
}
|
|
```
|
|
|
|
## Error: Entitlement Inactive
|
|
|
|
```json
|
|
{
|
|
"error": "entitlement_inactive",
|
|
"code": "entitlement_inactive",
|
|
"correlation_id": "req_01J9B6BJBVKY3N6WQ7TQM2R2P5"
|
|
}
|
|
```
|