The owner set 100 Dew = 1 XMR (from 5) and made Inbe's Tai Chi a paid practice whose price and discounts the node enforces. - Unlocks: GET/POST /api/v1/unlocks list and buy products at the node's price; the client names only the product. Tai Chi costs 1 Dew, 90% off before DAOCHI_UNLOCK_TRIAL_UNTIL. The signed debit and the unlock row commit together, and a repeat unlock charges nothing. - Grants: POST /api/v1/unlocks/grant signs a one-hour grant for an unlocked product with the Dew issuer key, prefixed so it can never match a receipt or checkpoint signature. - Gated packs: an artifact with a node-side <sha>.zib.product file is served only at <sha>.zib/<grant> with a valid grant for that product, as private, no-store; unreadable markers stay gated, and the v1 package route refuses gated artifacts. - Storage plans cost 20 and 200 Dew, keeping their XMR price at the new rate. - `daochi rescale-dew 20` adds signed credits to existing balances and scales uncredited invoices and deposits once, then signs a checkpoint.
150 lines
4.0 KiB
JSON
150 lines
4.0 KiB
JSON
{
|
|
"/api/v1/packages/{app_id}/{asset}": {
|
|
"get": {
|
|
"summary": "Read an app's desktop portable release",
|
|
"parameters": [
|
|
{
|
|
"name": "app_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "asset",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "latest or the release SHA-256 followed by .zib",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Signed release metadata or the portable bundle"
|
|
},
|
|
"403": {
|
|
"description": "The artifact is gated; v2 serves it with a grant"
|
|
},
|
|
"404": {
|
|
"description": "App or release is unavailable"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/packages/{app_id}/{asset}": {
|
|
"get": {
|
|
"summary": "Read an app's portable release for current hosts",
|
|
"parameters": [
|
|
{
|
|
"name": "app_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "asset",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "latest or the release SHA-256 followed by .zib",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "host_api",
|
|
"in": "query",
|
|
"description": "For latest: the newest host interface the app runs; an older archived release is served when the latest needs a newer one",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 65535
|
|
}
|
|
},
|
|
{
|
|
"name": "module_api",
|
|
"in": "query",
|
|
"description": "For latest: the module interface the app requires",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 1,
|
|
"maximum": 65535
|
|
}
|
|
},
|
|
{
|
|
"name": "bucket",
|
|
"in": "query",
|
|
"description": "For latest: the device's stable rollout bucket; a staged release reaches buckets below its share until it expires. Apps without a bucket count as 99",
|
|
"schema": {
|
|
"type": "integer",
|
|
"minimum": 0,
|
|
"maximum": 99
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Signed release metadata or the portable bundle"
|
|
},
|
|
"400": {
|
|
"description": "Invalid interface version or bucket"
|
|
},
|
|
"403": {
|
|
"description": "The artifact is gated; request it with a grant"
|
|
},
|
|
"404": {
|
|
"description": "App or release is unavailable, or no release fits the app"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/api/v2/packages/{app_id}/{asset}/{grant}": {
|
|
"get": {
|
|
"summary": "Read a gated portable artifact with a download grant",
|
|
"parameters": [
|
|
{
|
|
"name": "app_id",
|
|
"in": "path",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "asset",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "The artifact SHA-256 followed by .zib",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
{
|
|
"name": "grant",
|
|
"in": "path",
|
|
"required": true,
|
|
"description": "An unexpired grant from POST /api/v1/unlocks/grant for the artifact's product. Artifacts that are not gated ignore it",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "The portable bundle; private, no-store when gated"
|
|
},
|
|
"403": {
|
|
"description": "The artifact is gated and the grant is missing, expired, forged or for another product"
|
|
},
|
|
"404": {
|
|
"description": "App or artifact is unavailable"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|