@openvtc/trust-tasks 0.23.8 → 0.24.0
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/CHANGELOG.md +54 -0
- package/dist/_shared/components.d.ts +2451 -4
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/oob/_shared/0.1/oob.d.ts +16 -0
- package/dist/auth/oob/_shared/0.1/oob.d.ts.map +1 -0
- package/dist/auth/oob/_shared/0.1/oob.js +6 -0
- package/dist/auth/oob/_shared/0.1/oob.js.map +1 -0
- package/dist/auth/oob/cancel/0.1/payload.d.ts +262 -0
- package/dist/auth/oob/cancel/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/cancel/0.1/payload.js +153 -0
- package/dist/auth/oob/cancel/0.1/payload.js.map +1 -0
- package/dist/auth/oob/claim/0.1/payload.d.ts +463 -0
- package/dist/auth/oob/claim/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/claim/0.1/payload.js +264 -0
- package/dist/auth/oob/claim/0.1/payload.js.map +1 -0
- package/dist/auth/oob/grant/0.1/payload.d.ts +212 -0
- package/dist/auth/oob/grant/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/grant/0.1/payload.js +117 -0
- package/dist/auth/oob/grant/0.1/payload.js.map +1 -0
- package/dist/auth/oob/identify/0.1/payload.d.ts +145 -0
- package/dist/auth/oob/identify/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/identify/0.1/payload.js +81 -0
- package/dist/auth/oob/identify/0.1/payload.js.map +1 -0
- package/dist/auth/oob/prove/0.1/payload.d.ts +740 -0
- package/dist/auth/oob/prove/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/prove/0.1/payload.js +422 -0
- package/dist/auth/oob/prove/0.1/payload.js.map +1 -0
- package/dist/auth/oob/redeem/0.1/payload.d.ts +364 -0
- package/dist/auth/oob/redeem/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/redeem/0.1/payload.js +199 -0
- package/dist/auth/oob/redeem/0.1/payload.js.map +1 -0
- package/dist/auth/oob/request/0.1/payload.d.ts +330 -0
- package/dist/auth/oob/request/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/request/0.1/payload.js +193 -0
- package/dist/auth/oob/request/0.1/payload.js.map +1 -0
- package/dist/auth/oob/respond/0.1/payload.d.ts +235 -0
- package/dist/auth/oob/respond/0.1/payload.d.ts.map +1 -0
- package/dist/auth/oob/respond/0.1/payload.js +140 -0
- package/dist/auth/oob/respond/0.1/payload.js.map +1 -0
- package/dist/device/list/0.1/payload.d.ts +4 -4
- package/dist/device/list/0.1/payload.d.ts.map +1 -1
- package/dist/device/list/0.1/payload.js +6 -2
- package/dist/device/list/0.1/payload.js.map +1 -1
- package/dist/device/list/0.2/payload.d.ts +4 -4
- package/dist/device/list/0.2/payload.d.ts.map +1 -1
- package/dist/device/list/0.2/payload.js +6 -2
- package/dist/device/list/0.2/payload.js.map +1 -1
- package/dist/device/register/0.1/payload.d.ts +4 -4
- package/dist/device/register/0.1/payload.d.ts.map +1 -1
- package/dist/device/register/0.1/payload.js +6 -2
- package/dist/device/register/0.1/payload.js.map +1 -1
- package/dist/device/register/0.2/payload.d.ts +4 -4
- package/dist/device/register/0.2/payload.d.ts.map +1 -1
- package/dist/device/register/0.2/payload.js +6 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/external/_shared/0.1/accounts.d.ts +18 -0
- package/dist/external/_shared/0.1/accounts.d.ts.map +1 -0
- package/dist/external/_shared/0.1/accounts.js +6 -0
- package/dist/external/_shared/0.1/accounts.js.map +1 -0
- package/dist/external/accounts/archive/0.1/payload.d.ts +2945 -0
- package/dist/external/accounts/archive/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/archive/0.1/payload.js +1736 -0
- package/dist/external/accounts/archive/0.1/payload.js.map +1 -0
- package/dist/external/accounts/bindings/grant/0.1/payload.d.ts +2938 -0
- package/dist/external/accounts/bindings/grant/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/bindings/grant/0.1/payload.js +1735 -0
- package/dist/external/accounts/bindings/grant/0.1/payload.js.map +1 -0
- package/dist/external/accounts/bindings/revoke/0.1/payload.d.ts +2958 -0
- package/dist/external/accounts/bindings/revoke/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/bindings/revoke/0.1/payload.js +1743 -0
- package/dist/external/accounts/bindings/revoke/0.1/payload.js.map +1 -0
- package/dist/external/accounts/create/0.1/payload.d.ts +2954 -0
- package/dist/external/accounts/create/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/create/0.1/payload.js +1742 -0
- package/dist/external/accounts/create/0.1/payload.js.map +1 -0
- package/dist/external/accounts/delete/0.1/payload.d.ts +310 -0
- package/dist/external/accounts/delete/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/delete/0.1/payload.js +176 -0
- package/dist/external/accounts/delete/0.1/payload.js.map +1 -0
- package/dist/external/accounts/get/0.1/payload.d.ts +2931 -0
- package/dist/external/accounts/get/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/get/0.1/payload.js +1731 -0
- package/dist/external/accounts/get/0.1/payload.js.map +1 -0
- package/dist/external/accounts/keys/rotate/0.1/payload.d.ts +3216 -0
- package/dist/external/accounts/keys/rotate/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/keys/rotate/0.1/payload.js +1912 -0
- package/dist/external/accounts/keys/rotate/0.1/payload.js.map +1 -0
- package/dist/external/accounts/list/0.1/payload.d.ts +3034 -0
- package/dist/external/accounts/list/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/list/0.1/payload.js +1791 -0
- package/dist/external/accounts/list/0.1/payload.js.map +1 -0
- package/dist/external/accounts/probe/0.1/payload.d.ts +511 -0
- package/dist/external/accounts/probe/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/probe/0.1/payload.js +307 -0
- package/dist/external/accounts/probe/0.1/payload.js.map +1 -0
- package/dist/external/accounts/restore/0.1/payload.d.ts +2945 -0
- package/dist/external/accounts/restore/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/restore/0.1/payload.js +1736 -0
- package/dist/external/accounts/restore/0.1/payload.js.map +1 -0
- package/dist/external/accounts/resume/0.1/payload.d.ts +2945 -0
- package/dist/external/accounts/resume/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/resume/0.1/payload.js +1736 -0
- package/dist/external/accounts/resume/0.1/payload.js.map +1 -0
- package/dist/external/accounts/secret/set/0.1/payload.d.ts +379 -0
- package/dist/external/accounts/secret/set/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/secret/set/0.1/payload.js +212 -0
- package/dist/external/accounts/secret/set/0.1/payload.js.map +1 -0
- package/dist/external/accounts/setup/0.1/payload.d.ts +535 -0
- package/dist/external/accounts/setup/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/setup/0.1/payload.js +325 -0
- package/dist/external/accounts/setup/0.1/payload.js.map +1 -0
- package/dist/external/accounts/suspend/0.1/payload.d.ts +2945 -0
- package/dist/external/accounts/suspend/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/suspend/0.1/payload.js +1736 -0
- package/dist/external/accounts/suspend/0.1/payload.js.map +1 -0
- package/dist/external/accounts/update/0.1/payload.d.ts +2949 -0
- package/dist/external/accounts/update/0.1/payload.d.ts.map +1 -0
- package/dist/external/accounts/update/0.1/payload.js +1739 -0
- package/dist/external/accounts/update/0.1/payload.js.map +1 -0
- package/dist/external/credentials/issue/0.1/payload.d.ts +586 -0
- package/dist/external/credentials/issue/0.1/payload.d.ts.map +1 -0
- package/dist/external/credentials/issue/0.1/payload.js +322 -0
- package/dist/external/credentials/issue/0.1/payload.js.map +1 -0
- package/dist/external/sign/0.1/payload.d.ts +348 -0
- package/dist/external/sign/0.1/payload.d.ts.map +1 -0
- package/dist/external/sign/0.1/payload.js +193 -0
- package/dist/external/sign/0.1/payload.js.map +1 -0
- package/dist/index.d.ts +53 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +53 -0
- package/dist/index.js.map +1 -1
- package/dist/rooms/_shared/0.1/blobs.d.ts +16 -0
- package/dist/rooms/_shared/0.1/blobs.d.ts.map +1 -0
- package/dist/rooms/_shared/0.1/blobs.js +6 -0
- package/dist/rooms/_shared/0.1/blobs.js.map +1 -0
- package/dist/rooms/_shared/0.1/room.d.ts +1 -1
- package/dist/rooms/_shared/0.1/room.d.ts.map +1 -1
- package/dist/rooms/blobs/chunk/0.1/payload.d.ts +375 -0
- package/dist/rooms/blobs/chunk/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/chunk/0.1/payload.js +213 -0
- package/dist/rooms/blobs/chunk/0.1/payload.js.map +1 -0
- package/dist/rooms/blobs/get/0.1/payload.d.ts +743 -0
- package/dist/rooms/blobs/get/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/get/0.1/payload.js +415 -0
- package/dist/rooms/blobs/get/0.1/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/abort/0.1/payload.d.ts +263 -0
- package/dist/rooms/blobs/upload/abort/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/abort/0.1/payload.js +151 -0
- package/dist/rooms/blobs/upload/abort/0.1/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts +793 -0
- package/dist/rooms/blobs/upload/begin/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/begin/0.1/payload.js +437 -0
- package/dist/rooms/blobs/upload/begin/0.1/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/chunk/0.1/payload.d.ts +459 -0
- package/dist/rooms/blobs/upload/chunk/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/chunk/0.1/payload.js +256 -0
- package/dist/rooms/blobs/upload/chunk/0.1/payload.js.map +1 -0
- package/dist/rooms/blobs/upload/commit/0.1/payload.d.ts +326 -0
- package/dist/rooms/blobs/upload/commit/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/blobs/upload/commit/0.1/payload.js +185 -0
- package/dist/rooms/blobs/upload/commit/0.1/payload.js.map +1 -0
- package/dist/rooms/info/0.1/payload.d.ts +897 -0
- package/dist/rooms/info/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/info/0.1/payload.js +498 -0
- package/dist/rooms/info/0.1/payload.js.map +1 -0
- package/dist/rooms/keys/file-key/0.1/payload.d.ts +306 -0
- package/dist/rooms/keys/file-key/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/keys/file-key/0.1/payload.js +167 -0
- package/dist/rooms/keys/file-key/0.1/payload.js.map +1 -0
- package/dist/rooms/records/get/0.2/payload.d.ts +954 -0
- package/dist/rooms/records/get/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/records/get/0.2/payload.js +515 -0
- package/dist/rooms/records/get/0.2/payload.js.map +1 -0
- package/dist/rooms/records/list/0.2/payload.d.ts +854 -0
- package/dist/rooms/records/list/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/records/list/0.2/payload.js +462 -0
- package/dist/rooms/records/list/0.2/payload.js.map +1 -0
- package/dist/rooms/records/put/0.2/payload.d.ts +679 -0
- package/dist/rooms/records/put/0.2/payload.d.ts.map +1 -0
- package/dist/rooms/records/put/0.2/payload.js +357 -0
- package/dist/rooms/records/put/0.2/payload.js.map +1 -0
- package/dist/rooms/usage/0.1/payload.d.ts +795 -0
- package/dist/rooms/usage/0.1/payload.d.ts.map +1 -0
- package/dist/rooms/usage/0.1/payload.js +417 -0
- package/dist/rooms/usage/0.1/payload.js.map +1 -0
- package/dist/vtc/_shared/0.1/room-storage.d.ts +16 -0
- package/dist/vtc/_shared/0.1/room-storage.d.ts.map +1 -0
- package/dist/vtc/_shared/0.1/room-storage.js +6 -0
- package/dist/vtc/_shared/0.1/room-storage.js.map +1 -0
- package/dist/vtc/rooms/get/0.1/payload.d.ts +1813 -0
- package/dist/vtc/rooms/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/get/0.1/payload.js +892 -0
- package/dist/vtc/rooms/get/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/limits/set/0.1/payload.d.ts +873 -0
- package/dist/vtc/rooms/limits/set/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/limits/set/0.1/payload.js +489 -0
- package/dist/vtc/rooms/limits/set/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/storage/assign/0.1/payload.d.ts +341 -0
- package/dist/vtc/rooms/storage/assign/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/storage/assign/0.1/payload.js +191 -0
- package/dist/vtc/rooms/storage/assign/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/storage/migrate/0.1/payload.d.ts +452 -0
- package/dist/vtc/rooms/storage/migrate/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/storage/migrate/0.1/payload.js +260 -0
- package/dist/vtc/rooms/storage/migrate/0.1/payload.js.map +1 -0
- package/dist/vtc/rooms/usage/0.1/payload.d.ts +880 -0
- package/dist/vtc/rooms/usage/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/rooms/usage/0.1/payload.js +457 -0
- package/dist/vtc/rooms/usage/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts +1272 -0
- package/dist/vtc/storage/configs/create/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/create/0.1/payload.js +737 -0
- package/dist/vtc/storage/configs/create/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts +1750 -0
- package/dist/vtc/storage/configs/get/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/get/0.1/payload.js +1019 -0
- package/dist/vtc/storage/configs/get/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts +1851 -0
- package/dist/vtc/storage/configs/list/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/list/0.1/payload.js +1069 -0
- package/dist/vtc/storage/configs/list/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/probe/0.1/payload.d.ts +459 -0
- package/dist/vtc/storage/configs/probe/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/probe/0.1/payload.js +267 -0
- package/dist/vtc/storage/configs/probe/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/retire/0.1/payload.d.ts +294 -0
- package/dist/vtc/storage/configs/retire/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/retire/0.1/payload.js +176 -0
- package/dist/vtc/storage/configs/retire/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts +1274 -0
- package/dist/vtc/storage/configs/update/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/configs/update/0.1/payload.js +736 -0
- package/dist/vtc/storage/configs/update/0.1/payload.js.map +1 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts +511 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.js +293 -0
- package/dist/vtc/storage/credentials/set/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/_shared/components.ts +2539 -4
- package/src/auth/oob/_shared/0.1/oob.ts +17 -0
- package/src/auth/oob/cancel/0.1/payload.ts +188 -0
- package/src/auth/oob/claim/0.1/payload.ts +306 -0
- package/src/auth/oob/grant/0.1/payload.ts +159 -0
- package/src/auth/oob/identify/0.1/payload.ts +110 -0
- package/src/auth/oob/prove/0.1/payload.ts +473 -0
- package/src/auth/oob/redeem/0.1/payload.ts +248 -0
- package/src/auth/oob/request/0.1/payload.ts +230 -0
- package/src/auth/oob/respond/0.1/payload.ts +178 -0
- package/src/device/list/0.1/payload.ts +6 -2
- package/src/device/list/0.2/payload.ts +6 -2
- package/src/device/register/0.1/payload.ts +6 -2
- package/src/device/register/0.2/payload.ts +6 -2
- package/src/external/_shared/0.1/accounts.ts +19 -0
- package/src/external/accounts/archive/0.1/payload.ts +1770 -0
- package/src/external/accounts/bindings/grant/0.1/payload.ts +1766 -0
- package/src/external/accounts/bindings/revoke/0.1/payload.ts +1778 -0
- package/src/external/accounts/create/0.1/payload.ts +1777 -0
- package/src/external/accounts/delete/0.1/payload.ts +211 -0
- package/src/external/accounts/get/0.1/payload.ts +1761 -0
- package/src/external/accounts/keys/rotate/0.1/payload.ts +1947 -0
- package/src/external/accounts/list/0.1/payload.ts +1834 -0
- package/src/external/accounts/probe/0.1/payload.ts +337 -0
- package/src/external/accounts/restore/0.1/payload.ts +1770 -0
- package/src/external/accounts/resume/0.1/payload.ts +1770 -0
- package/src/external/accounts/secret/set/0.1/payload.ts +248 -0
- package/src/external/accounts/setup/0.1/payload.ts +355 -0
- package/src/external/accounts/suspend/0.1/payload.ts +1770 -0
- package/src/external/accounts/update/0.1/payload.ts +1771 -0
- package/src/external/credentials/issue/0.1/payload.ts +365 -0
- package/src/external/sign/0.1/payload.ts +234 -0
- package/src/index.ts +53 -0
- package/src/rooms/_shared/0.1/blobs.ts +17 -0
- package/src/rooms/_shared/0.1/room.ts +1 -1
- package/src/rooms/blobs/chunk/0.1/payload.ts +251 -0
- package/src/rooms/blobs/get/0.1/payload.ts +463 -0
- package/src/rooms/blobs/upload/abort/0.1/payload.ts +187 -0
- package/src/rooms/blobs/upload/begin/0.1/payload.ts +491 -0
- package/src/rooms/blobs/upload/chunk/0.1/payload.ts +304 -0
- package/src/rooms/blobs/upload/commit/0.1/payload.ts +224 -0
- package/src/rooms/info/0.1/payload.ts +572 -0
- package/src/rooms/keys/file-key/0.1/payload.ts +224 -0
- package/src/rooms/records/get/0.2/payload.ts +614 -0
- package/src/rooms/records/list/0.2/payload.ts +533 -0
- package/src/rooms/records/put/0.2/payload.ts +441 -0
- package/src/rooms/usage/0.1/payload.ts +499 -0
- package/src/vtc/_shared/0.1/room-storage.ts +17 -0
- package/src/vtc/rooms/get/0.1/payload.ts +1275 -0
- package/src/vtc/rooms/limits/set/0.1/payload.ts +555 -0
- package/src/vtc/rooms/storage/assign/0.1/payload.ts +237 -0
- package/src/vtc/rooms/storage/migrate/0.1/payload.ts +317 -0
- package/src/vtc/rooms/usage/0.1/payload.ts +568 -0
- package/src/vtc/storage/configs/create/0.1/payload.ts +784 -0
- package/src/vtc/storage/configs/get/0.1/payload.ts +1054 -0
- package/src/vtc/storage/configs/list/0.1/payload.ts +1121 -0
- package/src/vtc/storage/configs/probe/0.1/payload.ts +329 -0
- package/src/vtc/storage/configs/retire/0.1/payload.ts +211 -0
- package/src/vtc/storage/configs/update/0.1/payload.ts +783 -0
- package/src/vtc/storage/credentials/set/0.1/payload.ts +339 -0
|
@@ -0,0 +1,1851 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/storage/configs/list/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { ConfigState, CredentialState, DigestMultibase, Ext, ExternalAccountId, GcsSettings, LocalSettings, ObjectPrefix, S3Settings, StorageAuth, StorageConfig, StorageConfigFacts, StorageConfigId, StorageHealth, StorageKind, StorageSettings, WalrusSettings } from "../../../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Page through the community's storage configs. The outer document members are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface VTCStorageConfigsListPayload {
|
|
10
|
+
state?: ConfigState;
|
|
11
|
+
kind?: StorageKind;
|
|
12
|
+
/**
|
|
13
|
+
* Opaque continuation token from a previous page's `nextCursor`.
|
|
14
|
+
*/
|
|
15
|
+
cursor?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Page size. The community chooses when absent (50 in the reference implementation).
|
|
18
|
+
*/
|
|
19
|
+
limit?: number;
|
|
20
|
+
ext?: Ext;
|
|
21
|
+
}
|
|
22
|
+
export interface VTCStorageConfigsListResponsePayload {
|
|
23
|
+
/**
|
|
24
|
+
* @maxItems 100
|
|
25
|
+
*/
|
|
26
|
+
items: ConfigItem[];
|
|
27
|
+
/**
|
|
28
|
+
* Present when more remain; pass it as `cursor`.
|
|
29
|
+
*/
|
|
30
|
+
nextCursor?: string;
|
|
31
|
+
ext?: Ext;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* One config and what it holds.
|
|
35
|
+
*/
|
|
36
|
+
export interface ConfigItem {
|
|
37
|
+
config: StorageConfig;
|
|
38
|
+
facts: StorageConfigFacts;
|
|
39
|
+
}
|
|
40
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
41
|
+
export type { ConfigState, CredentialState, DigestMultibase, Ext, ExternalAccountId, GcsSettings, LocalSettings, ObjectPrefix, S3Settings, StorageAuth, StorageConfig, StorageConfigFacts, StorageConfigId, StorageHealth, StorageKind, StorageSettings, WalrusSettings };
|
|
42
|
+
/** Trust Task type URI. */
|
|
43
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1";
|
|
44
|
+
/** Stable alias for this specification's request payload shape. */
|
|
45
|
+
export type Payload = VTCStorageConfigsListPayload;
|
|
46
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
47
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1#response";
|
|
48
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
49
|
+
export type Response = VTCStorageConfigsListResponsePayload;
|
|
50
|
+
/**
|
|
51
|
+
* This specification's payload schema, as a value.
|
|
52
|
+
*
|
|
53
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
54
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
55
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
56
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
57
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
58
|
+
*/
|
|
59
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
60
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
61
|
+
readonly $id: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1";
|
|
62
|
+
readonly title: "VTC Storage — Configs — List — payload";
|
|
63
|
+
readonly description: "Page through the community's storage configs. The outer document members are owned by the framework — SPEC §6.3.";
|
|
64
|
+
readonly type: "object";
|
|
65
|
+
readonly additionalProperties: false;
|
|
66
|
+
readonly properties: {
|
|
67
|
+
readonly state: {
|
|
68
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
69
|
+
};
|
|
70
|
+
readonly kind: {
|
|
71
|
+
readonly $ref: "#/$defs/StorageKind";
|
|
72
|
+
};
|
|
73
|
+
readonly cursor: {
|
|
74
|
+
readonly type: "string";
|
|
75
|
+
readonly minLength: 1;
|
|
76
|
+
readonly maxLength: 1024;
|
|
77
|
+
readonly description: "Opaque continuation token from a previous page's `nextCursor`.";
|
|
78
|
+
};
|
|
79
|
+
readonly limit: {
|
|
80
|
+
readonly type: "integer";
|
|
81
|
+
readonly minimum: 1;
|
|
82
|
+
readonly maximum: 100;
|
|
83
|
+
readonly description: "Page size. The community chooses when absent (50 in the reference implementation).";
|
|
84
|
+
};
|
|
85
|
+
readonly ext: {
|
|
86
|
+
readonly $ref: "#/$defs/Ext";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly $defs: {
|
|
90
|
+
readonly ConfigItem: {
|
|
91
|
+
readonly type: "object";
|
|
92
|
+
readonly additionalProperties: false;
|
|
93
|
+
readonly description: "One config and what it holds.";
|
|
94
|
+
readonly required: readonly ["config", "facts"];
|
|
95
|
+
readonly properties: {
|
|
96
|
+
readonly config: {
|
|
97
|
+
readonly $ref: "#/$defs/StorageConfig";
|
|
98
|
+
};
|
|
99
|
+
readonly facts: {
|
|
100
|
+
readonly $ref: "#/$defs/StorageConfigFacts";
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
readonly Response: {
|
|
105
|
+
readonly $anchor: "response";
|
|
106
|
+
readonly title: "VTC Storage — Configs — List — response payload";
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly additionalProperties: false;
|
|
109
|
+
readonly required: readonly ["items"];
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly type: "array";
|
|
113
|
+
readonly maxItems: 100;
|
|
114
|
+
readonly items: {
|
|
115
|
+
readonly $ref: "#/$defs/ConfigItem";
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
readonly nextCursor: {
|
|
119
|
+
readonly type: "string";
|
|
120
|
+
readonly minLength: 1;
|
|
121
|
+
readonly maxLength: 1024;
|
|
122
|
+
readonly description: "Present when more remain; pass it as `cursor`.";
|
|
123
|
+
};
|
|
124
|
+
readonly ext: {
|
|
125
|
+
readonly $ref: "#/$defs/Ext";
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
readonly Ext: {
|
|
130
|
+
readonly title: "Ext";
|
|
131
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
132
|
+
readonly type: "object";
|
|
133
|
+
readonly minProperties: 1;
|
|
134
|
+
readonly additionalProperties: true;
|
|
135
|
+
readonly propertyNames: {
|
|
136
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
readonly StorageConfigFacts: {
|
|
140
|
+
readonly title: "StorageConfigFacts";
|
|
141
|
+
readonly type: "object";
|
|
142
|
+
readonly additionalProperties: false;
|
|
143
|
+
readonly required: readonly ["rooms", "files", "bytes", "pendingDeleteBytes", "credential", "health"];
|
|
144
|
+
readonly description: "What a config holds and whether it works, computed at the time of the read. Ciphertext bytes throughout.";
|
|
145
|
+
readonly properties: {
|
|
146
|
+
readonly rooms: {
|
|
147
|
+
readonly type: "integer";
|
|
148
|
+
readonly minimum: 0;
|
|
149
|
+
readonly description: "Rooms assigned to this config.";
|
|
150
|
+
};
|
|
151
|
+
readonly files: {
|
|
152
|
+
readonly type: "integer";
|
|
153
|
+
readonly minimum: 0;
|
|
154
|
+
readonly description: "Blobs stored on this config that are not yet deleted, wherever their rooms are now assigned.";
|
|
155
|
+
};
|
|
156
|
+
readonly bytes: {
|
|
157
|
+
readonly type: "integer";
|
|
158
|
+
readonly minimum: 0;
|
|
159
|
+
readonly description: "Their total size. Counts against `capacityBytes` until the backend deletion has actually happened, unlike room and member usage, which stop counting an orphaned blob at once.";
|
|
160
|
+
};
|
|
161
|
+
readonly pendingDeleteBytes: {
|
|
162
|
+
readonly type: "integer";
|
|
163
|
+
readonly minimum: 0;
|
|
164
|
+
readonly description: "Bytes of orphaned blobs awaiting deletion after their grace window.";
|
|
165
|
+
};
|
|
166
|
+
readonly credential: {
|
|
167
|
+
readonly $ref: "#/$defs/CredentialState";
|
|
168
|
+
};
|
|
169
|
+
readonly health: {
|
|
170
|
+
readonly $ref: "#/$defs/StorageHealth";
|
|
171
|
+
};
|
|
172
|
+
readonly walrus: {
|
|
173
|
+
readonly type: "object";
|
|
174
|
+
readonly additionalProperties: false;
|
|
175
|
+
readonly description: "Present on a `walrus` config.";
|
|
176
|
+
readonly properties: {
|
|
177
|
+
readonly signerAddress: {
|
|
178
|
+
readonly type: "string";
|
|
179
|
+
readonly pattern: "^0x[0-9a-f]{64}$";
|
|
180
|
+
readonly description: "The Sui address that pays for storage, derived from the VTA account's key.";
|
|
181
|
+
};
|
|
182
|
+
readonly nextExtensionDueAt: {
|
|
183
|
+
readonly type: "string";
|
|
184
|
+
readonly format: "date-time";
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
};
|
|
189
|
+
};
|
|
190
|
+
readonly StorageHealth: {
|
|
191
|
+
readonly title: "StorageHealth";
|
|
192
|
+
readonly type: "object";
|
|
193
|
+
readonly additionalProperties: false;
|
|
194
|
+
readonly description: "The last evidence the community has that a config works. Every member is optional: a config never probed and never used has none.";
|
|
195
|
+
readonly properties: {
|
|
196
|
+
readonly lastProbeAt: {
|
|
197
|
+
readonly type: "string";
|
|
198
|
+
readonly format: "date-time";
|
|
199
|
+
};
|
|
200
|
+
readonly lastProbeOk: {
|
|
201
|
+
readonly type: "boolean";
|
|
202
|
+
};
|
|
203
|
+
readonly lastPutAt: {
|
|
204
|
+
readonly type: "string";
|
|
205
|
+
readonly format: "date-time";
|
|
206
|
+
readonly description: "The last successful blob write.";
|
|
207
|
+
};
|
|
208
|
+
readonly lastGetAt: {
|
|
209
|
+
readonly type: "string";
|
|
210
|
+
readonly format: "date-time";
|
|
211
|
+
readonly description: "The last successful chunk read.";
|
|
212
|
+
};
|
|
213
|
+
readonly lastDeleteAt: {
|
|
214
|
+
readonly type: "string";
|
|
215
|
+
readonly format: "date-time";
|
|
216
|
+
readonly description: "The last successful deletion (on `walrus`, the last lapse the community observed).";
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
readonly CredentialState: {
|
|
221
|
+
readonly title: "CredentialState";
|
|
222
|
+
readonly type: "object";
|
|
223
|
+
readonly additionalProperties: false;
|
|
224
|
+
readonly required: readonly ["status"];
|
|
225
|
+
readonly description: "Whether a config can authenticate now, and how — never the credential. `status`: `vta-account`, `ambient` and `sealed` are usable; `required` means the config cannot store until a credential is provided (a `sealed` config never set, or set before a restore, which carries no credential); `none` is a `local` config.";
|
|
226
|
+
readonly properties: {
|
|
227
|
+
readonly status: {
|
|
228
|
+
readonly type: "string";
|
|
229
|
+
readonly enum: readonly ["vta-account", "ambient", "sealed", "required", "none"];
|
|
230
|
+
};
|
|
231
|
+
readonly account: {
|
|
232
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
233
|
+
readonly description: "Present with `vta-account`.";
|
|
234
|
+
};
|
|
235
|
+
readonly fingerprint: {
|
|
236
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
237
|
+
readonly description: "Present with `sealed`: a digest identifying the stored credential, so an administrator can tell which one is set without anyone being able to read it. Computed over the credential with a community-held key, never a bare hash of a low-entropy secret.";
|
|
238
|
+
};
|
|
239
|
+
readonly setAt: {
|
|
240
|
+
readonly type: "string";
|
|
241
|
+
readonly format: "date-time";
|
|
242
|
+
readonly description: "Present with `sealed`: when the stored credential was last set.";
|
|
243
|
+
};
|
|
244
|
+
readonly roomsHoldingCredentials: {
|
|
245
|
+
readonly type: "integer";
|
|
246
|
+
readonly minimum: 0;
|
|
247
|
+
readonly description: "Present with `vta-account`: how many rooms the community currently holds a live room-scoped credential for.";
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
readonly ExternalAccountId: {
|
|
252
|
+
readonly title: "ExternalAccountId";
|
|
253
|
+
readonly type: "string";
|
|
254
|
+
readonly minLength: 1;
|
|
255
|
+
readonly maxLength: 64;
|
|
256
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
257
|
+
readonly description: "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself.";
|
|
258
|
+
};
|
|
259
|
+
readonly DigestMultibase: {
|
|
260
|
+
readonly title: "DigestMultibase";
|
|
261
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
262
|
+
readonly type: "string";
|
|
263
|
+
readonly minLength: 16;
|
|
264
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
265
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
266
|
+
};
|
|
267
|
+
readonly StorageConfig: {
|
|
268
|
+
readonly title: "StorageConfig";
|
|
269
|
+
readonly type: "object";
|
|
270
|
+
readonly additionalProperties: false;
|
|
271
|
+
readonly required: readonly ["id", "label", "settings", "state", "createdBy", "createdAt"];
|
|
272
|
+
readonly description: "One storage config as the community holds it. Carries no secret.";
|
|
273
|
+
readonly properties: {
|
|
274
|
+
readonly id: {
|
|
275
|
+
readonly $ref: "#/$defs/StorageConfigId";
|
|
276
|
+
};
|
|
277
|
+
readonly label: {
|
|
278
|
+
readonly type: "string";
|
|
279
|
+
readonly minLength: 1;
|
|
280
|
+
readonly maxLength: 128;
|
|
281
|
+
readonly description: "A display name for administrators (`EU — S3 (main account)`). Shown to a room's creator with the config's kind when the community lets them choose.";
|
|
282
|
+
};
|
|
283
|
+
readonly settings: {
|
|
284
|
+
readonly $ref: "#/$defs/StorageSettings";
|
|
285
|
+
};
|
|
286
|
+
readonly auth: {
|
|
287
|
+
readonly $ref: "#/$defs/StorageAuth";
|
|
288
|
+
};
|
|
289
|
+
readonly capacityBytes: {
|
|
290
|
+
readonly type: "integer";
|
|
291
|
+
readonly minimum: 0;
|
|
292
|
+
readonly description: "Total ciphertext bytes the community will store on this config, across every room assigned to it. A capacity, not a policy: an upload that would cross it is refused with scope `storage`. Absent means no capacity set.";
|
|
293
|
+
};
|
|
294
|
+
readonly state: {
|
|
295
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
296
|
+
};
|
|
297
|
+
readonly isDefault: {
|
|
298
|
+
readonly type: "boolean";
|
|
299
|
+
readonly description: "True for the config a room is assigned to when neither the community's policy nor its creator names one.";
|
|
300
|
+
};
|
|
301
|
+
readonly createdBy: {
|
|
302
|
+
readonly type: "string";
|
|
303
|
+
readonly pattern: "^did:";
|
|
304
|
+
readonly maxLength: 2048;
|
|
305
|
+
};
|
|
306
|
+
readonly createdAt: {
|
|
307
|
+
readonly type: "string";
|
|
308
|
+
readonly format: "date-time";
|
|
309
|
+
};
|
|
310
|
+
readonly updatedBy: {
|
|
311
|
+
readonly type: "string";
|
|
312
|
+
readonly pattern: "^did:";
|
|
313
|
+
readonly maxLength: 2048;
|
|
314
|
+
};
|
|
315
|
+
readonly updatedAt: {
|
|
316
|
+
readonly type: "string";
|
|
317
|
+
readonly format: "date-time";
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
readonly ConfigState: {
|
|
322
|
+
readonly title: "ConfigState";
|
|
323
|
+
readonly type: "string";
|
|
324
|
+
readonly enum: readonly ["active", "draining", "retired"];
|
|
325
|
+
readonly description: "`active`: accepts new rooms and new uploads. `draining`: retired by an administrator while blobs still name it — refuses new rooms and new uploads, keeps serving reads, and becomes `retired` when a migration has emptied it. `retired`: refuses new rooms and new uploads and holds no blob. A config is never deleted while a blob names it.";
|
|
326
|
+
};
|
|
327
|
+
readonly StorageAuth: {
|
|
328
|
+
readonly title: "StorageAuth";
|
|
329
|
+
readonly description: "How the community authenticates to a config's backend. Absent on a `local` config, which needs none.\n\n`vta-account` (RECOMMENDED): an external account in the community's VTA. The VTA holds the long-lived authority; the community holds nothing that outlives a credential lifetime, and asks for credentials scoped to one room's prefix for at most 15 minutes, every issuance audited at the VTA. Required for a `walrus` config other than a `sealed` one, since the VTA's `sui-signer` account signs its storage transactions.\n\n`ambient`: the cloud identity of the machine the community runs on (an instance role, workload identity), downscoped to one room's prefix by the community itself. Not audited or rate-limited by the VTA, and usable by anything on that machine that reaches the metadata endpoint. Not valid for `walrus`.\n\n`sealed` (discouraged): a long-lived credential stored by the community, set with vtc/storage/credentials/set. Protects against every administrator through every surface the community offers; does not protect against whoever operates the machine.";
|
|
330
|
+
readonly oneOf: readonly [{
|
|
331
|
+
readonly type: "object";
|
|
332
|
+
readonly additionalProperties: false;
|
|
333
|
+
readonly required: readonly ["mode", "account"];
|
|
334
|
+
readonly properties: {
|
|
335
|
+
readonly mode: {
|
|
336
|
+
readonly const: "vta-account";
|
|
337
|
+
};
|
|
338
|
+
readonly account: {
|
|
339
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
}, {
|
|
343
|
+
readonly type: "object";
|
|
344
|
+
readonly additionalProperties: false;
|
|
345
|
+
readonly required: readonly ["mode"];
|
|
346
|
+
readonly properties: {
|
|
347
|
+
readonly mode: {
|
|
348
|
+
readonly const: "ambient";
|
|
349
|
+
};
|
|
350
|
+
};
|
|
351
|
+
}, {
|
|
352
|
+
readonly type: "object";
|
|
353
|
+
readonly additionalProperties: false;
|
|
354
|
+
readonly required: readonly ["mode"];
|
|
355
|
+
readonly properties: {
|
|
356
|
+
readonly mode: {
|
|
357
|
+
readonly const: "sealed";
|
|
358
|
+
};
|
|
359
|
+
};
|
|
360
|
+
}];
|
|
361
|
+
};
|
|
362
|
+
readonly StorageSettings: {
|
|
363
|
+
readonly title: "StorageSettings";
|
|
364
|
+
readonly description: "A config's backend settings, discriminated by `kind`. Never a secret: a credential is a StorageAuth, held elsewhere.";
|
|
365
|
+
readonly oneOf: readonly [{
|
|
366
|
+
readonly $ref: "#/$defs/LocalSettings";
|
|
367
|
+
}, {
|
|
368
|
+
readonly $ref: "#/$defs/S3Settings";
|
|
369
|
+
}, {
|
|
370
|
+
readonly $ref: "#/$defs/GcsSettings";
|
|
371
|
+
}, {
|
|
372
|
+
readonly $ref: "#/$defs/WalrusSettings";
|
|
373
|
+
}];
|
|
374
|
+
};
|
|
375
|
+
readonly WalrusSettings: {
|
|
376
|
+
readonly title: "WalrusSettings";
|
|
377
|
+
readonly type: "object";
|
|
378
|
+
readonly additionalProperties: false;
|
|
379
|
+
readonly required: readonly ["kind", "relayUrl", "aggregatorUrl", "epochs", "extendBeforeEpochs"];
|
|
380
|
+
readonly properties: {
|
|
381
|
+
readonly kind: {
|
|
382
|
+
readonly const: "walrus";
|
|
383
|
+
};
|
|
384
|
+
readonly relayUrl: {
|
|
385
|
+
readonly type: "string";
|
|
386
|
+
readonly format: "uri";
|
|
387
|
+
readonly maxLength: 2048;
|
|
388
|
+
readonly pattern: "^https://";
|
|
389
|
+
readonly description: "The Walrus upload relay the community writes through. The community never runs a publisher: a publisher holds a hot wallet in its own configuration, which is the long-lived secret these tasks exist to avoid.";
|
|
390
|
+
};
|
|
391
|
+
readonly aggregatorUrl: {
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
readonly format: "uri";
|
|
394
|
+
readonly maxLength: 2048;
|
|
395
|
+
readonly pattern: "^https://";
|
|
396
|
+
readonly description: "The Walrus aggregator the community reads through.";
|
|
397
|
+
};
|
|
398
|
+
readonly epochs: {
|
|
399
|
+
readonly type: "integer";
|
|
400
|
+
readonly minimum: 1;
|
|
401
|
+
readonly maximum: 53;
|
|
402
|
+
readonly description: "Storage epochs to buy when a blob is registered. Walrus sells storage in epochs (two weeks on mainnet) and caps one purchase at 53.";
|
|
403
|
+
};
|
|
404
|
+
readonly extendBeforeEpochs: {
|
|
405
|
+
readonly type: "integer";
|
|
406
|
+
readonly minimum: 1;
|
|
407
|
+
readonly maximum: 52;
|
|
408
|
+
readonly description: "How many epochs before a live blob's end epoch the community extends it. A blob that has become an orphan is not extended, and lapses: the Walrus form of deletion.";
|
|
409
|
+
};
|
|
410
|
+
};
|
|
411
|
+
};
|
|
412
|
+
readonly GcsSettings: {
|
|
413
|
+
readonly title: "GcsSettings";
|
|
414
|
+
readonly type: "object";
|
|
415
|
+
readonly additionalProperties: false;
|
|
416
|
+
readonly required: readonly ["kind", "bucket"];
|
|
417
|
+
readonly properties: {
|
|
418
|
+
readonly kind: {
|
|
419
|
+
readonly const: "gcs";
|
|
420
|
+
};
|
|
421
|
+
readonly bucket: {
|
|
422
|
+
readonly type: "string";
|
|
423
|
+
readonly minLength: 3;
|
|
424
|
+
readonly maxLength: 222;
|
|
425
|
+
readonly pattern: "^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$";
|
|
426
|
+
readonly description: "The bucket name. Validated against GCS naming rules here, because it is placed in a Credential Access Boundary condition and must never carry anything but a name.";
|
|
427
|
+
};
|
|
428
|
+
readonly prefix: {
|
|
429
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
};
|
|
433
|
+
readonly ObjectPrefix: {
|
|
434
|
+
readonly title: "ObjectPrefix";
|
|
435
|
+
readonly type: "string";
|
|
436
|
+
readonly minLength: 1;
|
|
437
|
+
readonly maxLength: 256;
|
|
438
|
+
readonly pattern: "^[A-Za-z0-9!_.*'()/-]+/$";
|
|
439
|
+
readonly description: "A key prefix inside the bucket, ending in `/`, under which the config's `rooms/` tree is placed. Restricted to the S3 safe-character set so that it can be placed in a downscoped policy without escaping.";
|
|
440
|
+
};
|
|
441
|
+
readonly S3Settings: {
|
|
442
|
+
readonly title: "S3Settings";
|
|
443
|
+
readonly type: "object";
|
|
444
|
+
readonly additionalProperties: false;
|
|
445
|
+
readonly required: readonly ["kind", "region", "bucket"];
|
|
446
|
+
readonly properties: {
|
|
447
|
+
readonly kind: {
|
|
448
|
+
readonly const: "s3";
|
|
449
|
+
};
|
|
450
|
+
readonly endpoint: {
|
|
451
|
+
readonly type: "string";
|
|
452
|
+
readonly format: "uri";
|
|
453
|
+
readonly maxLength: 2048;
|
|
454
|
+
readonly pattern: "^https://";
|
|
455
|
+
readonly description: "The S3 API endpoint, for a store other than AWS (R2, B2, MinIO). Absent means AWS S3 in `region`. HTTPS only.";
|
|
456
|
+
};
|
|
457
|
+
readonly region: {
|
|
458
|
+
readonly type: "string";
|
|
459
|
+
readonly minLength: 1;
|
|
460
|
+
readonly maxLength: 64;
|
|
461
|
+
readonly pattern: "^[a-z0-9-]+$";
|
|
462
|
+
readonly description: "The bucket's region, as the store names it (`eu-west-1`; `auto` for R2).";
|
|
463
|
+
};
|
|
464
|
+
readonly bucket: {
|
|
465
|
+
readonly type: "string";
|
|
466
|
+
readonly minLength: 3;
|
|
467
|
+
readonly maxLength: 63;
|
|
468
|
+
readonly pattern: "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$";
|
|
469
|
+
readonly description: "The bucket name. Validated against S3 naming rules here, because it is placed in downscoped session policies and must never carry anything but a name.";
|
|
470
|
+
};
|
|
471
|
+
readonly prefix: {
|
|
472
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
473
|
+
};
|
|
474
|
+
readonly pathStyle: {
|
|
475
|
+
readonly type: "boolean";
|
|
476
|
+
readonly description: "Address the bucket in the path rather than the host name, as MinIO usually needs. Absent means virtual-hosted style.";
|
|
477
|
+
};
|
|
478
|
+
};
|
|
479
|
+
};
|
|
480
|
+
readonly LocalSettings: {
|
|
481
|
+
readonly title: "LocalSettings";
|
|
482
|
+
readonly type: "object";
|
|
483
|
+
readonly additionalProperties: false;
|
|
484
|
+
readonly required: readonly ["kind", "root"];
|
|
485
|
+
readonly properties: {
|
|
486
|
+
readonly kind: {
|
|
487
|
+
readonly const: "local";
|
|
488
|
+
};
|
|
489
|
+
readonly root: {
|
|
490
|
+
readonly type: "string";
|
|
491
|
+
readonly minLength: 1;
|
|
492
|
+
readonly maxLength: 1024;
|
|
493
|
+
readonly pattern: "^/";
|
|
494
|
+
readonly description: "Absolute path of the directory the community writes blobs under, on its own host. Created owner-only. Not carried by the community's backup: back it up beside it.";
|
|
495
|
+
};
|
|
496
|
+
};
|
|
497
|
+
};
|
|
498
|
+
readonly StorageConfigId: {
|
|
499
|
+
readonly title: "StorageConfigId";
|
|
500
|
+
readonly type: "string";
|
|
501
|
+
readonly minLength: 1;
|
|
502
|
+
readonly maxLength: 64;
|
|
503
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
504
|
+
readonly description: "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value.";
|
|
505
|
+
};
|
|
506
|
+
readonly StorageKind: {
|
|
507
|
+
readonly title: "StorageKind";
|
|
508
|
+
readonly type: "string";
|
|
509
|
+
readonly enum: readonly ["local", "s3", "gcs", "walrus"];
|
|
510
|
+
readonly description: "Which backend a config stores to. `local`: plain files in a directory on the community's own host. `s3`: an S3-compatible object store (AWS S3, Cloudflare R2, Backblaze B2, MinIO). `gcs`: native Google Cloud Storage. `walrus`: the Walrus decentralised store, where every blob is public ciphertext and deletion is a lapse, not an erasure.";
|
|
511
|
+
};
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
515
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
516
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
517
|
+
readonly $ref: "#/$defs/Response";
|
|
518
|
+
readonly $defs: {
|
|
519
|
+
readonly ConfigItem: {
|
|
520
|
+
readonly type: "object";
|
|
521
|
+
readonly additionalProperties: false;
|
|
522
|
+
readonly description: "One config and what it holds.";
|
|
523
|
+
readonly required: readonly ["config", "facts"];
|
|
524
|
+
readonly properties: {
|
|
525
|
+
readonly config: {
|
|
526
|
+
readonly $ref: "#/$defs/StorageConfig";
|
|
527
|
+
};
|
|
528
|
+
readonly facts: {
|
|
529
|
+
readonly $ref: "#/$defs/StorageConfigFacts";
|
|
530
|
+
};
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
readonly Response: {
|
|
534
|
+
readonly $anchor: "response";
|
|
535
|
+
readonly title: "VTC Storage — Configs — List — response payload";
|
|
536
|
+
readonly type: "object";
|
|
537
|
+
readonly additionalProperties: false;
|
|
538
|
+
readonly required: readonly ["items"];
|
|
539
|
+
readonly properties: {
|
|
540
|
+
readonly items: {
|
|
541
|
+
readonly type: "array";
|
|
542
|
+
readonly maxItems: 100;
|
|
543
|
+
readonly items: {
|
|
544
|
+
readonly $ref: "#/$defs/ConfigItem";
|
|
545
|
+
};
|
|
546
|
+
};
|
|
547
|
+
readonly nextCursor: {
|
|
548
|
+
readonly type: "string";
|
|
549
|
+
readonly minLength: 1;
|
|
550
|
+
readonly maxLength: 1024;
|
|
551
|
+
readonly description: "Present when more remain; pass it as `cursor`.";
|
|
552
|
+
};
|
|
553
|
+
readonly ext: {
|
|
554
|
+
readonly $ref: "#/$defs/Ext";
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
readonly Ext: {
|
|
559
|
+
readonly title: "Ext";
|
|
560
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
561
|
+
readonly type: "object";
|
|
562
|
+
readonly minProperties: 1;
|
|
563
|
+
readonly additionalProperties: true;
|
|
564
|
+
readonly propertyNames: {
|
|
565
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
566
|
+
};
|
|
567
|
+
};
|
|
568
|
+
readonly StorageConfigFacts: {
|
|
569
|
+
readonly title: "StorageConfigFacts";
|
|
570
|
+
readonly type: "object";
|
|
571
|
+
readonly additionalProperties: false;
|
|
572
|
+
readonly required: readonly ["rooms", "files", "bytes", "pendingDeleteBytes", "credential", "health"];
|
|
573
|
+
readonly description: "What a config holds and whether it works, computed at the time of the read. Ciphertext bytes throughout.";
|
|
574
|
+
readonly properties: {
|
|
575
|
+
readonly rooms: {
|
|
576
|
+
readonly type: "integer";
|
|
577
|
+
readonly minimum: 0;
|
|
578
|
+
readonly description: "Rooms assigned to this config.";
|
|
579
|
+
};
|
|
580
|
+
readonly files: {
|
|
581
|
+
readonly type: "integer";
|
|
582
|
+
readonly minimum: 0;
|
|
583
|
+
readonly description: "Blobs stored on this config that are not yet deleted, wherever their rooms are now assigned.";
|
|
584
|
+
};
|
|
585
|
+
readonly bytes: {
|
|
586
|
+
readonly type: "integer";
|
|
587
|
+
readonly minimum: 0;
|
|
588
|
+
readonly description: "Their total size. Counts against `capacityBytes` until the backend deletion has actually happened, unlike room and member usage, which stop counting an orphaned blob at once.";
|
|
589
|
+
};
|
|
590
|
+
readonly pendingDeleteBytes: {
|
|
591
|
+
readonly type: "integer";
|
|
592
|
+
readonly minimum: 0;
|
|
593
|
+
readonly description: "Bytes of orphaned blobs awaiting deletion after their grace window.";
|
|
594
|
+
};
|
|
595
|
+
readonly credential: {
|
|
596
|
+
readonly $ref: "#/$defs/CredentialState";
|
|
597
|
+
};
|
|
598
|
+
readonly health: {
|
|
599
|
+
readonly $ref: "#/$defs/StorageHealth";
|
|
600
|
+
};
|
|
601
|
+
readonly walrus: {
|
|
602
|
+
readonly type: "object";
|
|
603
|
+
readonly additionalProperties: false;
|
|
604
|
+
readonly description: "Present on a `walrus` config.";
|
|
605
|
+
readonly properties: {
|
|
606
|
+
readonly signerAddress: {
|
|
607
|
+
readonly type: "string";
|
|
608
|
+
readonly pattern: "^0x[0-9a-f]{64}$";
|
|
609
|
+
readonly description: "The Sui address that pays for storage, derived from the VTA account's key.";
|
|
610
|
+
};
|
|
611
|
+
readonly nextExtensionDueAt: {
|
|
612
|
+
readonly type: "string";
|
|
613
|
+
readonly format: "date-time";
|
|
614
|
+
};
|
|
615
|
+
};
|
|
616
|
+
};
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
readonly StorageHealth: {
|
|
620
|
+
readonly title: "StorageHealth";
|
|
621
|
+
readonly type: "object";
|
|
622
|
+
readonly additionalProperties: false;
|
|
623
|
+
readonly description: "The last evidence the community has that a config works. Every member is optional: a config never probed and never used has none.";
|
|
624
|
+
readonly properties: {
|
|
625
|
+
readonly lastProbeAt: {
|
|
626
|
+
readonly type: "string";
|
|
627
|
+
readonly format: "date-time";
|
|
628
|
+
};
|
|
629
|
+
readonly lastProbeOk: {
|
|
630
|
+
readonly type: "boolean";
|
|
631
|
+
};
|
|
632
|
+
readonly lastPutAt: {
|
|
633
|
+
readonly type: "string";
|
|
634
|
+
readonly format: "date-time";
|
|
635
|
+
readonly description: "The last successful blob write.";
|
|
636
|
+
};
|
|
637
|
+
readonly lastGetAt: {
|
|
638
|
+
readonly type: "string";
|
|
639
|
+
readonly format: "date-time";
|
|
640
|
+
readonly description: "The last successful chunk read.";
|
|
641
|
+
};
|
|
642
|
+
readonly lastDeleteAt: {
|
|
643
|
+
readonly type: "string";
|
|
644
|
+
readonly format: "date-time";
|
|
645
|
+
readonly description: "The last successful deletion (on `walrus`, the last lapse the community observed).";
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
};
|
|
649
|
+
readonly CredentialState: {
|
|
650
|
+
readonly title: "CredentialState";
|
|
651
|
+
readonly type: "object";
|
|
652
|
+
readonly additionalProperties: false;
|
|
653
|
+
readonly required: readonly ["status"];
|
|
654
|
+
readonly description: "Whether a config can authenticate now, and how — never the credential. `status`: `vta-account`, `ambient` and `sealed` are usable; `required` means the config cannot store until a credential is provided (a `sealed` config never set, or set before a restore, which carries no credential); `none` is a `local` config.";
|
|
655
|
+
readonly properties: {
|
|
656
|
+
readonly status: {
|
|
657
|
+
readonly type: "string";
|
|
658
|
+
readonly enum: readonly ["vta-account", "ambient", "sealed", "required", "none"];
|
|
659
|
+
};
|
|
660
|
+
readonly account: {
|
|
661
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
662
|
+
readonly description: "Present with `vta-account`.";
|
|
663
|
+
};
|
|
664
|
+
readonly fingerprint: {
|
|
665
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
666
|
+
readonly description: "Present with `sealed`: a digest identifying the stored credential, so an administrator can tell which one is set without anyone being able to read it. Computed over the credential with a community-held key, never a bare hash of a low-entropy secret.";
|
|
667
|
+
};
|
|
668
|
+
readonly setAt: {
|
|
669
|
+
readonly type: "string";
|
|
670
|
+
readonly format: "date-time";
|
|
671
|
+
readonly description: "Present with `sealed`: when the stored credential was last set.";
|
|
672
|
+
};
|
|
673
|
+
readonly roomsHoldingCredentials: {
|
|
674
|
+
readonly type: "integer";
|
|
675
|
+
readonly minimum: 0;
|
|
676
|
+
readonly description: "Present with `vta-account`: how many rooms the community currently holds a live room-scoped credential for.";
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
};
|
|
680
|
+
readonly ExternalAccountId: {
|
|
681
|
+
readonly title: "ExternalAccountId";
|
|
682
|
+
readonly type: "string";
|
|
683
|
+
readonly minLength: 1;
|
|
684
|
+
readonly maxLength: 64;
|
|
685
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
686
|
+
readonly description: "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself.";
|
|
687
|
+
};
|
|
688
|
+
readonly DigestMultibase: {
|
|
689
|
+
readonly title: "DigestMultibase";
|
|
690
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
691
|
+
readonly type: "string";
|
|
692
|
+
readonly minLength: 16;
|
|
693
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
694
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
695
|
+
};
|
|
696
|
+
readonly StorageConfig: {
|
|
697
|
+
readonly title: "StorageConfig";
|
|
698
|
+
readonly type: "object";
|
|
699
|
+
readonly additionalProperties: false;
|
|
700
|
+
readonly required: readonly ["id", "label", "settings", "state", "createdBy", "createdAt"];
|
|
701
|
+
readonly description: "One storage config as the community holds it. Carries no secret.";
|
|
702
|
+
readonly properties: {
|
|
703
|
+
readonly id: {
|
|
704
|
+
readonly $ref: "#/$defs/StorageConfigId";
|
|
705
|
+
};
|
|
706
|
+
readonly label: {
|
|
707
|
+
readonly type: "string";
|
|
708
|
+
readonly minLength: 1;
|
|
709
|
+
readonly maxLength: 128;
|
|
710
|
+
readonly description: "A display name for administrators (`EU — S3 (main account)`). Shown to a room's creator with the config's kind when the community lets them choose.";
|
|
711
|
+
};
|
|
712
|
+
readonly settings: {
|
|
713
|
+
readonly $ref: "#/$defs/StorageSettings";
|
|
714
|
+
};
|
|
715
|
+
readonly auth: {
|
|
716
|
+
readonly $ref: "#/$defs/StorageAuth";
|
|
717
|
+
};
|
|
718
|
+
readonly capacityBytes: {
|
|
719
|
+
readonly type: "integer";
|
|
720
|
+
readonly minimum: 0;
|
|
721
|
+
readonly description: "Total ciphertext bytes the community will store on this config, across every room assigned to it. A capacity, not a policy: an upload that would cross it is refused with scope `storage`. Absent means no capacity set.";
|
|
722
|
+
};
|
|
723
|
+
readonly state: {
|
|
724
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
725
|
+
};
|
|
726
|
+
readonly isDefault: {
|
|
727
|
+
readonly type: "boolean";
|
|
728
|
+
readonly description: "True for the config a room is assigned to when neither the community's policy nor its creator names one.";
|
|
729
|
+
};
|
|
730
|
+
readonly createdBy: {
|
|
731
|
+
readonly type: "string";
|
|
732
|
+
readonly pattern: "^did:";
|
|
733
|
+
readonly maxLength: 2048;
|
|
734
|
+
};
|
|
735
|
+
readonly createdAt: {
|
|
736
|
+
readonly type: "string";
|
|
737
|
+
readonly format: "date-time";
|
|
738
|
+
};
|
|
739
|
+
readonly updatedBy: {
|
|
740
|
+
readonly type: "string";
|
|
741
|
+
readonly pattern: "^did:";
|
|
742
|
+
readonly maxLength: 2048;
|
|
743
|
+
};
|
|
744
|
+
readonly updatedAt: {
|
|
745
|
+
readonly type: "string";
|
|
746
|
+
readonly format: "date-time";
|
|
747
|
+
};
|
|
748
|
+
};
|
|
749
|
+
};
|
|
750
|
+
readonly ConfigState: {
|
|
751
|
+
readonly title: "ConfigState";
|
|
752
|
+
readonly type: "string";
|
|
753
|
+
readonly enum: readonly ["active", "draining", "retired"];
|
|
754
|
+
readonly description: "`active`: accepts new rooms and new uploads. `draining`: retired by an administrator while blobs still name it — refuses new rooms and new uploads, keeps serving reads, and becomes `retired` when a migration has emptied it. `retired`: refuses new rooms and new uploads and holds no blob. A config is never deleted while a blob names it.";
|
|
755
|
+
};
|
|
756
|
+
readonly StorageAuth: {
|
|
757
|
+
readonly title: "StorageAuth";
|
|
758
|
+
readonly description: "How the community authenticates to a config's backend. Absent on a `local` config, which needs none.\n\n`vta-account` (RECOMMENDED): an external account in the community's VTA. The VTA holds the long-lived authority; the community holds nothing that outlives a credential lifetime, and asks for credentials scoped to one room's prefix for at most 15 minutes, every issuance audited at the VTA. Required for a `walrus` config other than a `sealed` one, since the VTA's `sui-signer` account signs its storage transactions.\n\n`ambient`: the cloud identity of the machine the community runs on (an instance role, workload identity), downscoped to one room's prefix by the community itself. Not audited or rate-limited by the VTA, and usable by anything on that machine that reaches the metadata endpoint. Not valid for `walrus`.\n\n`sealed` (discouraged): a long-lived credential stored by the community, set with vtc/storage/credentials/set. Protects against every administrator through every surface the community offers; does not protect against whoever operates the machine.";
|
|
759
|
+
readonly oneOf: readonly [{
|
|
760
|
+
readonly type: "object";
|
|
761
|
+
readonly additionalProperties: false;
|
|
762
|
+
readonly required: readonly ["mode", "account"];
|
|
763
|
+
readonly properties: {
|
|
764
|
+
readonly mode: {
|
|
765
|
+
readonly const: "vta-account";
|
|
766
|
+
};
|
|
767
|
+
readonly account: {
|
|
768
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
769
|
+
};
|
|
770
|
+
};
|
|
771
|
+
}, {
|
|
772
|
+
readonly type: "object";
|
|
773
|
+
readonly additionalProperties: false;
|
|
774
|
+
readonly required: readonly ["mode"];
|
|
775
|
+
readonly properties: {
|
|
776
|
+
readonly mode: {
|
|
777
|
+
readonly const: "ambient";
|
|
778
|
+
};
|
|
779
|
+
};
|
|
780
|
+
}, {
|
|
781
|
+
readonly type: "object";
|
|
782
|
+
readonly additionalProperties: false;
|
|
783
|
+
readonly required: readonly ["mode"];
|
|
784
|
+
readonly properties: {
|
|
785
|
+
readonly mode: {
|
|
786
|
+
readonly const: "sealed";
|
|
787
|
+
};
|
|
788
|
+
};
|
|
789
|
+
}];
|
|
790
|
+
};
|
|
791
|
+
readonly StorageSettings: {
|
|
792
|
+
readonly title: "StorageSettings";
|
|
793
|
+
readonly description: "A config's backend settings, discriminated by `kind`. Never a secret: a credential is a StorageAuth, held elsewhere.";
|
|
794
|
+
readonly oneOf: readonly [{
|
|
795
|
+
readonly $ref: "#/$defs/LocalSettings";
|
|
796
|
+
}, {
|
|
797
|
+
readonly $ref: "#/$defs/S3Settings";
|
|
798
|
+
}, {
|
|
799
|
+
readonly $ref: "#/$defs/GcsSettings";
|
|
800
|
+
}, {
|
|
801
|
+
readonly $ref: "#/$defs/WalrusSettings";
|
|
802
|
+
}];
|
|
803
|
+
};
|
|
804
|
+
readonly WalrusSettings: {
|
|
805
|
+
readonly title: "WalrusSettings";
|
|
806
|
+
readonly type: "object";
|
|
807
|
+
readonly additionalProperties: false;
|
|
808
|
+
readonly required: readonly ["kind", "relayUrl", "aggregatorUrl", "epochs", "extendBeforeEpochs"];
|
|
809
|
+
readonly properties: {
|
|
810
|
+
readonly kind: {
|
|
811
|
+
readonly const: "walrus";
|
|
812
|
+
};
|
|
813
|
+
readonly relayUrl: {
|
|
814
|
+
readonly type: "string";
|
|
815
|
+
readonly format: "uri";
|
|
816
|
+
readonly maxLength: 2048;
|
|
817
|
+
readonly pattern: "^https://";
|
|
818
|
+
readonly description: "The Walrus upload relay the community writes through. The community never runs a publisher: a publisher holds a hot wallet in its own configuration, which is the long-lived secret these tasks exist to avoid.";
|
|
819
|
+
};
|
|
820
|
+
readonly aggregatorUrl: {
|
|
821
|
+
readonly type: "string";
|
|
822
|
+
readonly format: "uri";
|
|
823
|
+
readonly maxLength: 2048;
|
|
824
|
+
readonly pattern: "^https://";
|
|
825
|
+
readonly description: "The Walrus aggregator the community reads through.";
|
|
826
|
+
};
|
|
827
|
+
readonly epochs: {
|
|
828
|
+
readonly type: "integer";
|
|
829
|
+
readonly minimum: 1;
|
|
830
|
+
readonly maximum: 53;
|
|
831
|
+
readonly description: "Storage epochs to buy when a blob is registered. Walrus sells storage in epochs (two weeks on mainnet) and caps one purchase at 53.";
|
|
832
|
+
};
|
|
833
|
+
readonly extendBeforeEpochs: {
|
|
834
|
+
readonly type: "integer";
|
|
835
|
+
readonly minimum: 1;
|
|
836
|
+
readonly maximum: 52;
|
|
837
|
+
readonly description: "How many epochs before a live blob's end epoch the community extends it. A blob that has become an orphan is not extended, and lapses: the Walrus form of deletion.";
|
|
838
|
+
};
|
|
839
|
+
};
|
|
840
|
+
};
|
|
841
|
+
readonly GcsSettings: {
|
|
842
|
+
readonly title: "GcsSettings";
|
|
843
|
+
readonly type: "object";
|
|
844
|
+
readonly additionalProperties: false;
|
|
845
|
+
readonly required: readonly ["kind", "bucket"];
|
|
846
|
+
readonly properties: {
|
|
847
|
+
readonly kind: {
|
|
848
|
+
readonly const: "gcs";
|
|
849
|
+
};
|
|
850
|
+
readonly bucket: {
|
|
851
|
+
readonly type: "string";
|
|
852
|
+
readonly minLength: 3;
|
|
853
|
+
readonly maxLength: 222;
|
|
854
|
+
readonly pattern: "^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$";
|
|
855
|
+
readonly description: "The bucket name. Validated against GCS naming rules here, because it is placed in a Credential Access Boundary condition and must never carry anything but a name.";
|
|
856
|
+
};
|
|
857
|
+
readonly prefix: {
|
|
858
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
};
|
|
862
|
+
readonly ObjectPrefix: {
|
|
863
|
+
readonly title: "ObjectPrefix";
|
|
864
|
+
readonly type: "string";
|
|
865
|
+
readonly minLength: 1;
|
|
866
|
+
readonly maxLength: 256;
|
|
867
|
+
readonly pattern: "^[A-Za-z0-9!_.*'()/-]+/$";
|
|
868
|
+
readonly description: "A key prefix inside the bucket, ending in `/`, under which the config's `rooms/` tree is placed. Restricted to the S3 safe-character set so that it can be placed in a downscoped policy without escaping.";
|
|
869
|
+
};
|
|
870
|
+
readonly S3Settings: {
|
|
871
|
+
readonly title: "S3Settings";
|
|
872
|
+
readonly type: "object";
|
|
873
|
+
readonly additionalProperties: false;
|
|
874
|
+
readonly required: readonly ["kind", "region", "bucket"];
|
|
875
|
+
readonly properties: {
|
|
876
|
+
readonly kind: {
|
|
877
|
+
readonly const: "s3";
|
|
878
|
+
};
|
|
879
|
+
readonly endpoint: {
|
|
880
|
+
readonly type: "string";
|
|
881
|
+
readonly format: "uri";
|
|
882
|
+
readonly maxLength: 2048;
|
|
883
|
+
readonly pattern: "^https://";
|
|
884
|
+
readonly description: "The S3 API endpoint, for a store other than AWS (R2, B2, MinIO). Absent means AWS S3 in `region`. HTTPS only.";
|
|
885
|
+
};
|
|
886
|
+
readonly region: {
|
|
887
|
+
readonly type: "string";
|
|
888
|
+
readonly minLength: 1;
|
|
889
|
+
readonly maxLength: 64;
|
|
890
|
+
readonly pattern: "^[a-z0-9-]+$";
|
|
891
|
+
readonly description: "The bucket's region, as the store names it (`eu-west-1`; `auto` for R2).";
|
|
892
|
+
};
|
|
893
|
+
readonly bucket: {
|
|
894
|
+
readonly type: "string";
|
|
895
|
+
readonly minLength: 3;
|
|
896
|
+
readonly maxLength: 63;
|
|
897
|
+
readonly pattern: "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$";
|
|
898
|
+
readonly description: "The bucket name. Validated against S3 naming rules here, because it is placed in downscoped session policies and must never carry anything but a name.";
|
|
899
|
+
};
|
|
900
|
+
readonly prefix: {
|
|
901
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
902
|
+
};
|
|
903
|
+
readonly pathStyle: {
|
|
904
|
+
readonly type: "boolean";
|
|
905
|
+
readonly description: "Address the bucket in the path rather than the host name, as MinIO usually needs. Absent means virtual-hosted style.";
|
|
906
|
+
};
|
|
907
|
+
};
|
|
908
|
+
};
|
|
909
|
+
readonly LocalSettings: {
|
|
910
|
+
readonly title: "LocalSettings";
|
|
911
|
+
readonly type: "object";
|
|
912
|
+
readonly additionalProperties: false;
|
|
913
|
+
readonly required: readonly ["kind", "root"];
|
|
914
|
+
readonly properties: {
|
|
915
|
+
readonly kind: {
|
|
916
|
+
readonly const: "local";
|
|
917
|
+
};
|
|
918
|
+
readonly root: {
|
|
919
|
+
readonly type: "string";
|
|
920
|
+
readonly minLength: 1;
|
|
921
|
+
readonly maxLength: 1024;
|
|
922
|
+
readonly pattern: "^/";
|
|
923
|
+
readonly description: "Absolute path of the directory the community writes blobs under, on its own host. Created owner-only. Not carried by the community's backup: back it up beside it.";
|
|
924
|
+
};
|
|
925
|
+
};
|
|
926
|
+
};
|
|
927
|
+
readonly StorageConfigId: {
|
|
928
|
+
readonly title: "StorageConfigId";
|
|
929
|
+
readonly type: "string";
|
|
930
|
+
readonly minLength: 1;
|
|
931
|
+
readonly maxLength: 64;
|
|
932
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
933
|
+
readonly description: "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value.";
|
|
934
|
+
};
|
|
935
|
+
readonly StorageKind: {
|
|
936
|
+
readonly title: "StorageKind";
|
|
937
|
+
readonly type: "string";
|
|
938
|
+
readonly enum: readonly ["local", "s3", "gcs", "walrus"];
|
|
939
|
+
readonly description: "Which backend a config stores to. `local`: plain files in a directory on the community's own host. `s3`: an S3-compatible object store (AWS S3, Cloudflare R2, Backblaze B2, MinIO). `gcs`: native Google Cloud Storage. `walrus`: the Walrus decentralised store, where every blob is public ciphertext and deletion is a lapse, not an erasure.";
|
|
940
|
+
};
|
|
941
|
+
};
|
|
942
|
+
};
|
|
943
|
+
/**
|
|
944
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
945
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
946
|
+
* per-specification and cannot be derived from the document alone, and
|
|
947
|
+
* item 2 needs the schema this carries.
|
|
948
|
+
*/
|
|
949
|
+
export declare const SPEC: {
|
|
950
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1";
|
|
951
|
+
readonly isBearer: false;
|
|
952
|
+
readonly isProofRequired: false;
|
|
953
|
+
readonly isRecipientRequired: true;
|
|
954
|
+
readonly isIssuedAtRequired: false;
|
|
955
|
+
readonly payloadSchema: {
|
|
956
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
957
|
+
readonly $id: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1";
|
|
958
|
+
readonly title: "VTC Storage — Configs — List — payload";
|
|
959
|
+
readonly description: "Page through the community's storage configs. The outer document members are owned by the framework — SPEC §6.3.";
|
|
960
|
+
readonly type: "object";
|
|
961
|
+
readonly additionalProperties: false;
|
|
962
|
+
readonly properties: {
|
|
963
|
+
readonly state: {
|
|
964
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
965
|
+
};
|
|
966
|
+
readonly kind: {
|
|
967
|
+
readonly $ref: "#/$defs/StorageKind";
|
|
968
|
+
};
|
|
969
|
+
readonly cursor: {
|
|
970
|
+
readonly type: "string";
|
|
971
|
+
readonly minLength: 1;
|
|
972
|
+
readonly maxLength: 1024;
|
|
973
|
+
readonly description: "Opaque continuation token from a previous page's `nextCursor`.";
|
|
974
|
+
};
|
|
975
|
+
readonly limit: {
|
|
976
|
+
readonly type: "integer";
|
|
977
|
+
readonly minimum: 1;
|
|
978
|
+
readonly maximum: 100;
|
|
979
|
+
readonly description: "Page size. The community chooses when absent (50 in the reference implementation).";
|
|
980
|
+
};
|
|
981
|
+
readonly ext: {
|
|
982
|
+
readonly $ref: "#/$defs/Ext";
|
|
983
|
+
};
|
|
984
|
+
};
|
|
985
|
+
readonly $defs: {
|
|
986
|
+
readonly ConfigItem: {
|
|
987
|
+
readonly type: "object";
|
|
988
|
+
readonly additionalProperties: false;
|
|
989
|
+
readonly description: "One config and what it holds.";
|
|
990
|
+
readonly required: readonly ["config", "facts"];
|
|
991
|
+
readonly properties: {
|
|
992
|
+
readonly config: {
|
|
993
|
+
readonly $ref: "#/$defs/StorageConfig";
|
|
994
|
+
};
|
|
995
|
+
readonly facts: {
|
|
996
|
+
readonly $ref: "#/$defs/StorageConfigFacts";
|
|
997
|
+
};
|
|
998
|
+
};
|
|
999
|
+
};
|
|
1000
|
+
readonly Response: {
|
|
1001
|
+
readonly $anchor: "response";
|
|
1002
|
+
readonly title: "VTC Storage — Configs — List — response payload";
|
|
1003
|
+
readonly type: "object";
|
|
1004
|
+
readonly additionalProperties: false;
|
|
1005
|
+
readonly required: readonly ["items"];
|
|
1006
|
+
readonly properties: {
|
|
1007
|
+
readonly items: {
|
|
1008
|
+
readonly type: "array";
|
|
1009
|
+
readonly maxItems: 100;
|
|
1010
|
+
readonly items: {
|
|
1011
|
+
readonly $ref: "#/$defs/ConfigItem";
|
|
1012
|
+
};
|
|
1013
|
+
};
|
|
1014
|
+
readonly nextCursor: {
|
|
1015
|
+
readonly type: "string";
|
|
1016
|
+
readonly minLength: 1;
|
|
1017
|
+
readonly maxLength: 1024;
|
|
1018
|
+
readonly description: "Present when more remain; pass it as `cursor`.";
|
|
1019
|
+
};
|
|
1020
|
+
readonly ext: {
|
|
1021
|
+
readonly $ref: "#/$defs/Ext";
|
|
1022
|
+
};
|
|
1023
|
+
};
|
|
1024
|
+
};
|
|
1025
|
+
readonly Ext: {
|
|
1026
|
+
readonly title: "Ext";
|
|
1027
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
1028
|
+
readonly type: "object";
|
|
1029
|
+
readonly minProperties: 1;
|
|
1030
|
+
readonly additionalProperties: true;
|
|
1031
|
+
readonly propertyNames: {
|
|
1032
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
readonly StorageConfigFacts: {
|
|
1036
|
+
readonly title: "StorageConfigFacts";
|
|
1037
|
+
readonly type: "object";
|
|
1038
|
+
readonly additionalProperties: false;
|
|
1039
|
+
readonly required: readonly ["rooms", "files", "bytes", "pendingDeleteBytes", "credential", "health"];
|
|
1040
|
+
readonly description: "What a config holds and whether it works, computed at the time of the read. Ciphertext bytes throughout.";
|
|
1041
|
+
readonly properties: {
|
|
1042
|
+
readonly rooms: {
|
|
1043
|
+
readonly type: "integer";
|
|
1044
|
+
readonly minimum: 0;
|
|
1045
|
+
readonly description: "Rooms assigned to this config.";
|
|
1046
|
+
};
|
|
1047
|
+
readonly files: {
|
|
1048
|
+
readonly type: "integer";
|
|
1049
|
+
readonly minimum: 0;
|
|
1050
|
+
readonly description: "Blobs stored on this config that are not yet deleted, wherever their rooms are now assigned.";
|
|
1051
|
+
};
|
|
1052
|
+
readonly bytes: {
|
|
1053
|
+
readonly type: "integer";
|
|
1054
|
+
readonly minimum: 0;
|
|
1055
|
+
readonly description: "Their total size. Counts against `capacityBytes` until the backend deletion has actually happened, unlike room and member usage, which stop counting an orphaned blob at once.";
|
|
1056
|
+
};
|
|
1057
|
+
readonly pendingDeleteBytes: {
|
|
1058
|
+
readonly type: "integer";
|
|
1059
|
+
readonly minimum: 0;
|
|
1060
|
+
readonly description: "Bytes of orphaned blobs awaiting deletion after their grace window.";
|
|
1061
|
+
};
|
|
1062
|
+
readonly credential: {
|
|
1063
|
+
readonly $ref: "#/$defs/CredentialState";
|
|
1064
|
+
};
|
|
1065
|
+
readonly health: {
|
|
1066
|
+
readonly $ref: "#/$defs/StorageHealth";
|
|
1067
|
+
};
|
|
1068
|
+
readonly walrus: {
|
|
1069
|
+
readonly type: "object";
|
|
1070
|
+
readonly additionalProperties: false;
|
|
1071
|
+
readonly description: "Present on a `walrus` config.";
|
|
1072
|
+
readonly properties: {
|
|
1073
|
+
readonly signerAddress: {
|
|
1074
|
+
readonly type: "string";
|
|
1075
|
+
readonly pattern: "^0x[0-9a-f]{64}$";
|
|
1076
|
+
readonly description: "The Sui address that pays for storage, derived from the VTA account's key.";
|
|
1077
|
+
};
|
|
1078
|
+
readonly nextExtensionDueAt: {
|
|
1079
|
+
readonly type: "string";
|
|
1080
|
+
readonly format: "date-time";
|
|
1081
|
+
};
|
|
1082
|
+
};
|
|
1083
|
+
};
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
readonly StorageHealth: {
|
|
1087
|
+
readonly title: "StorageHealth";
|
|
1088
|
+
readonly type: "object";
|
|
1089
|
+
readonly additionalProperties: false;
|
|
1090
|
+
readonly description: "The last evidence the community has that a config works. Every member is optional: a config never probed and never used has none.";
|
|
1091
|
+
readonly properties: {
|
|
1092
|
+
readonly lastProbeAt: {
|
|
1093
|
+
readonly type: "string";
|
|
1094
|
+
readonly format: "date-time";
|
|
1095
|
+
};
|
|
1096
|
+
readonly lastProbeOk: {
|
|
1097
|
+
readonly type: "boolean";
|
|
1098
|
+
};
|
|
1099
|
+
readonly lastPutAt: {
|
|
1100
|
+
readonly type: "string";
|
|
1101
|
+
readonly format: "date-time";
|
|
1102
|
+
readonly description: "The last successful blob write.";
|
|
1103
|
+
};
|
|
1104
|
+
readonly lastGetAt: {
|
|
1105
|
+
readonly type: "string";
|
|
1106
|
+
readonly format: "date-time";
|
|
1107
|
+
readonly description: "The last successful chunk read.";
|
|
1108
|
+
};
|
|
1109
|
+
readonly lastDeleteAt: {
|
|
1110
|
+
readonly type: "string";
|
|
1111
|
+
readonly format: "date-time";
|
|
1112
|
+
readonly description: "The last successful deletion (on `walrus`, the last lapse the community observed).";
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
readonly CredentialState: {
|
|
1117
|
+
readonly title: "CredentialState";
|
|
1118
|
+
readonly type: "object";
|
|
1119
|
+
readonly additionalProperties: false;
|
|
1120
|
+
readonly required: readonly ["status"];
|
|
1121
|
+
readonly description: "Whether a config can authenticate now, and how — never the credential. `status`: `vta-account`, `ambient` and `sealed` are usable; `required` means the config cannot store until a credential is provided (a `sealed` config never set, or set before a restore, which carries no credential); `none` is a `local` config.";
|
|
1122
|
+
readonly properties: {
|
|
1123
|
+
readonly status: {
|
|
1124
|
+
readonly type: "string";
|
|
1125
|
+
readonly enum: readonly ["vta-account", "ambient", "sealed", "required", "none"];
|
|
1126
|
+
};
|
|
1127
|
+
readonly account: {
|
|
1128
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
1129
|
+
readonly description: "Present with `vta-account`.";
|
|
1130
|
+
};
|
|
1131
|
+
readonly fingerprint: {
|
|
1132
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1133
|
+
readonly description: "Present with `sealed`: a digest identifying the stored credential, so an administrator can tell which one is set without anyone being able to read it. Computed over the credential with a community-held key, never a bare hash of a low-entropy secret.";
|
|
1134
|
+
};
|
|
1135
|
+
readonly setAt: {
|
|
1136
|
+
readonly type: "string";
|
|
1137
|
+
readonly format: "date-time";
|
|
1138
|
+
readonly description: "Present with `sealed`: when the stored credential was last set.";
|
|
1139
|
+
};
|
|
1140
|
+
readonly roomsHoldingCredentials: {
|
|
1141
|
+
readonly type: "integer";
|
|
1142
|
+
readonly minimum: 0;
|
|
1143
|
+
readonly description: "Present with `vta-account`: how many rooms the community currently holds a live room-scoped credential for.";
|
|
1144
|
+
};
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
readonly ExternalAccountId: {
|
|
1148
|
+
readonly title: "ExternalAccountId";
|
|
1149
|
+
readonly type: "string";
|
|
1150
|
+
readonly minLength: 1;
|
|
1151
|
+
readonly maxLength: 64;
|
|
1152
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
1153
|
+
readonly description: "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself.";
|
|
1154
|
+
};
|
|
1155
|
+
readonly DigestMultibase: {
|
|
1156
|
+
readonly title: "DigestMultibase";
|
|
1157
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
1158
|
+
readonly type: "string";
|
|
1159
|
+
readonly minLength: 16;
|
|
1160
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1161
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1162
|
+
};
|
|
1163
|
+
readonly StorageConfig: {
|
|
1164
|
+
readonly title: "StorageConfig";
|
|
1165
|
+
readonly type: "object";
|
|
1166
|
+
readonly additionalProperties: false;
|
|
1167
|
+
readonly required: readonly ["id", "label", "settings", "state", "createdBy", "createdAt"];
|
|
1168
|
+
readonly description: "One storage config as the community holds it. Carries no secret.";
|
|
1169
|
+
readonly properties: {
|
|
1170
|
+
readonly id: {
|
|
1171
|
+
readonly $ref: "#/$defs/StorageConfigId";
|
|
1172
|
+
};
|
|
1173
|
+
readonly label: {
|
|
1174
|
+
readonly type: "string";
|
|
1175
|
+
readonly minLength: 1;
|
|
1176
|
+
readonly maxLength: 128;
|
|
1177
|
+
readonly description: "A display name for administrators (`EU — S3 (main account)`). Shown to a room's creator with the config's kind when the community lets them choose.";
|
|
1178
|
+
};
|
|
1179
|
+
readonly settings: {
|
|
1180
|
+
readonly $ref: "#/$defs/StorageSettings";
|
|
1181
|
+
};
|
|
1182
|
+
readonly auth: {
|
|
1183
|
+
readonly $ref: "#/$defs/StorageAuth";
|
|
1184
|
+
};
|
|
1185
|
+
readonly capacityBytes: {
|
|
1186
|
+
readonly type: "integer";
|
|
1187
|
+
readonly minimum: 0;
|
|
1188
|
+
readonly description: "Total ciphertext bytes the community will store on this config, across every room assigned to it. A capacity, not a policy: an upload that would cross it is refused with scope `storage`. Absent means no capacity set.";
|
|
1189
|
+
};
|
|
1190
|
+
readonly state: {
|
|
1191
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
1192
|
+
};
|
|
1193
|
+
readonly isDefault: {
|
|
1194
|
+
readonly type: "boolean";
|
|
1195
|
+
readonly description: "True for the config a room is assigned to when neither the community's policy nor its creator names one.";
|
|
1196
|
+
};
|
|
1197
|
+
readonly createdBy: {
|
|
1198
|
+
readonly type: "string";
|
|
1199
|
+
readonly pattern: "^did:";
|
|
1200
|
+
readonly maxLength: 2048;
|
|
1201
|
+
};
|
|
1202
|
+
readonly createdAt: {
|
|
1203
|
+
readonly type: "string";
|
|
1204
|
+
readonly format: "date-time";
|
|
1205
|
+
};
|
|
1206
|
+
readonly updatedBy: {
|
|
1207
|
+
readonly type: "string";
|
|
1208
|
+
readonly pattern: "^did:";
|
|
1209
|
+
readonly maxLength: 2048;
|
|
1210
|
+
};
|
|
1211
|
+
readonly updatedAt: {
|
|
1212
|
+
readonly type: "string";
|
|
1213
|
+
readonly format: "date-time";
|
|
1214
|
+
};
|
|
1215
|
+
};
|
|
1216
|
+
};
|
|
1217
|
+
readonly ConfigState: {
|
|
1218
|
+
readonly title: "ConfigState";
|
|
1219
|
+
readonly type: "string";
|
|
1220
|
+
readonly enum: readonly ["active", "draining", "retired"];
|
|
1221
|
+
readonly description: "`active`: accepts new rooms and new uploads. `draining`: retired by an administrator while blobs still name it — refuses new rooms and new uploads, keeps serving reads, and becomes `retired` when a migration has emptied it. `retired`: refuses new rooms and new uploads and holds no blob. A config is never deleted while a blob names it.";
|
|
1222
|
+
};
|
|
1223
|
+
readonly StorageAuth: {
|
|
1224
|
+
readonly title: "StorageAuth";
|
|
1225
|
+
readonly description: "How the community authenticates to a config's backend. Absent on a `local` config, which needs none.\n\n`vta-account` (RECOMMENDED): an external account in the community's VTA. The VTA holds the long-lived authority; the community holds nothing that outlives a credential lifetime, and asks for credentials scoped to one room's prefix for at most 15 minutes, every issuance audited at the VTA. Required for a `walrus` config other than a `sealed` one, since the VTA's `sui-signer` account signs its storage transactions.\n\n`ambient`: the cloud identity of the machine the community runs on (an instance role, workload identity), downscoped to one room's prefix by the community itself. Not audited or rate-limited by the VTA, and usable by anything on that machine that reaches the metadata endpoint. Not valid for `walrus`.\n\n`sealed` (discouraged): a long-lived credential stored by the community, set with vtc/storage/credentials/set. Protects against every administrator through every surface the community offers; does not protect against whoever operates the machine.";
|
|
1226
|
+
readonly oneOf: readonly [{
|
|
1227
|
+
readonly type: "object";
|
|
1228
|
+
readonly additionalProperties: false;
|
|
1229
|
+
readonly required: readonly ["mode", "account"];
|
|
1230
|
+
readonly properties: {
|
|
1231
|
+
readonly mode: {
|
|
1232
|
+
readonly const: "vta-account";
|
|
1233
|
+
};
|
|
1234
|
+
readonly account: {
|
|
1235
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
}, {
|
|
1239
|
+
readonly type: "object";
|
|
1240
|
+
readonly additionalProperties: false;
|
|
1241
|
+
readonly required: readonly ["mode"];
|
|
1242
|
+
readonly properties: {
|
|
1243
|
+
readonly mode: {
|
|
1244
|
+
readonly const: "ambient";
|
|
1245
|
+
};
|
|
1246
|
+
};
|
|
1247
|
+
}, {
|
|
1248
|
+
readonly type: "object";
|
|
1249
|
+
readonly additionalProperties: false;
|
|
1250
|
+
readonly required: readonly ["mode"];
|
|
1251
|
+
readonly properties: {
|
|
1252
|
+
readonly mode: {
|
|
1253
|
+
readonly const: "sealed";
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
}];
|
|
1257
|
+
};
|
|
1258
|
+
readonly StorageSettings: {
|
|
1259
|
+
readonly title: "StorageSettings";
|
|
1260
|
+
readonly description: "A config's backend settings, discriminated by `kind`. Never a secret: a credential is a StorageAuth, held elsewhere.";
|
|
1261
|
+
readonly oneOf: readonly [{
|
|
1262
|
+
readonly $ref: "#/$defs/LocalSettings";
|
|
1263
|
+
}, {
|
|
1264
|
+
readonly $ref: "#/$defs/S3Settings";
|
|
1265
|
+
}, {
|
|
1266
|
+
readonly $ref: "#/$defs/GcsSettings";
|
|
1267
|
+
}, {
|
|
1268
|
+
readonly $ref: "#/$defs/WalrusSettings";
|
|
1269
|
+
}];
|
|
1270
|
+
};
|
|
1271
|
+
readonly WalrusSettings: {
|
|
1272
|
+
readonly title: "WalrusSettings";
|
|
1273
|
+
readonly type: "object";
|
|
1274
|
+
readonly additionalProperties: false;
|
|
1275
|
+
readonly required: readonly ["kind", "relayUrl", "aggregatorUrl", "epochs", "extendBeforeEpochs"];
|
|
1276
|
+
readonly properties: {
|
|
1277
|
+
readonly kind: {
|
|
1278
|
+
readonly const: "walrus";
|
|
1279
|
+
};
|
|
1280
|
+
readonly relayUrl: {
|
|
1281
|
+
readonly type: "string";
|
|
1282
|
+
readonly format: "uri";
|
|
1283
|
+
readonly maxLength: 2048;
|
|
1284
|
+
readonly pattern: "^https://";
|
|
1285
|
+
readonly description: "The Walrus upload relay the community writes through. The community never runs a publisher: a publisher holds a hot wallet in its own configuration, which is the long-lived secret these tasks exist to avoid.";
|
|
1286
|
+
};
|
|
1287
|
+
readonly aggregatorUrl: {
|
|
1288
|
+
readonly type: "string";
|
|
1289
|
+
readonly format: "uri";
|
|
1290
|
+
readonly maxLength: 2048;
|
|
1291
|
+
readonly pattern: "^https://";
|
|
1292
|
+
readonly description: "The Walrus aggregator the community reads through.";
|
|
1293
|
+
};
|
|
1294
|
+
readonly epochs: {
|
|
1295
|
+
readonly type: "integer";
|
|
1296
|
+
readonly minimum: 1;
|
|
1297
|
+
readonly maximum: 53;
|
|
1298
|
+
readonly description: "Storage epochs to buy when a blob is registered. Walrus sells storage in epochs (two weeks on mainnet) and caps one purchase at 53.";
|
|
1299
|
+
};
|
|
1300
|
+
readonly extendBeforeEpochs: {
|
|
1301
|
+
readonly type: "integer";
|
|
1302
|
+
readonly minimum: 1;
|
|
1303
|
+
readonly maximum: 52;
|
|
1304
|
+
readonly description: "How many epochs before a live blob's end epoch the community extends it. A blob that has become an orphan is not extended, and lapses: the Walrus form of deletion.";
|
|
1305
|
+
};
|
|
1306
|
+
};
|
|
1307
|
+
};
|
|
1308
|
+
readonly GcsSettings: {
|
|
1309
|
+
readonly title: "GcsSettings";
|
|
1310
|
+
readonly type: "object";
|
|
1311
|
+
readonly additionalProperties: false;
|
|
1312
|
+
readonly required: readonly ["kind", "bucket"];
|
|
1313
|
+
readonly properties: {
|
|
1314
|
+
readonly kind: {
|
|
1315
|
+
readonly const: "gcs";
|
|
1316
|
+
};
|
|
1317
|
+
readonly bucket: {
|
|
1318
|
+
readonly type: "string";
|
|
1319
|
+
readonly minLength: 3;
|
|
1320
|
+
readonly maxLength: 222;
|
|
1321
|
+
readonly pattern: "^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$";
|
|
1322
|
+
readonly description: "The bucket name. Validated against GCS naming rules here, because it is placed in a Credential Access Boundary condition and must never carry anything but a name.";
|
|
1323
|
+
};
|
|
1324
|
+
readonly prefix: {
|
|
1325
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
};
|
|
1329
|
+
readonly ObjectPrefix: {
|
|
1330
|
+
readonly title: "ObjectPrefix";
|
|
1331
|
+
readonly type: "string";
|
|
1332
|
+
readonly minLength: 1;
|
|
1333
|
+
readonly maxLength: 256;
|
|
1334
|
+
readonly pattern: "^[A-Za-z0-9!_.*'()/-]+/$";
|
|
1335
|
+
readonly description: "A key prefix inside the bucket, ending in `/`, under which the config's `rooms/` tree is placed. Restricted to the S3 safe-character set so that it can be placed in a downscoped policy without escaping.";
|
|
1336
|
+
};
|
|
1337
|
+
readonly S3Settings: {
|
|
1338
|
+
readonly title: "S3Settings";
|
|
1339
|
+
readonly type: "object";
|
|
1340
|
+
readonly additionalProperties: false;
|
|
1341
|
+
readonly required: readonly ["kind", "region", "bucket"];
|
|
1342
|
+
readonly properties: {
|
|
1343
|
+
readonly kind: {
|
|
1344
|
+
readonly const: "s3";
|
|
1345
|
+
};
|
|
1346
|
+
readonly endpoint: {
|
|
1347
|
+
readonly type: "string";
|
|
1348
|
+
readonly format: "uri";
|
|
1349
|
+
readonly maxLength: 2048;
|
|
1350
|
+
readonly pattern: "^https://";
|
|
1351
|
+
readonly description: "The S3 API endpoint, for a store other than AWS (R2, B2, MinIO). Absent means AWS S3 in `region`. HTTPS only.";
|
|
1352
|
+
};
|
|
1353
|
+
readonly region: {
|
|
1354
|
+
readonly type: "string";
|
|
1355
|
+
readonly minLength: 1;
|
|
1356
|
+
readonly maxLength: 64;
|
|
1357
|
+
readonly pattern: "^[a-z0-9-]+$";
|
|
1358
|
+
readonly description: "The bucket's region, as the store names it (`eu-west-1`; `auto` for R2).";
|
|
1359
|
+
};
|
|
1360
|
+
readonly bucket: {
|
|
1361
|
+
readonly type: "string";
|
|
1362
|
+
readonly minLength: 3;
|
|
1363
|
+
readonly maxLength: 63;
|
|
1364
|
+
readonly pattern: "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$";
|
|
1365
|
+
readonly description: "The bucket name. Validated against S3 naming rules here, because it is placed in downscoped session policies and must never carry anything but a name.";
|
|
1366
|
+
};
|
|
1367
|
+
readonly prefix: {
|
|
1368
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
1369
|
+
};
|
|
1370
|
+
readonly pathStyle: {
|
|
1371
|
+
readonly type: "boolean";
|
|
1372
|
+
readonly description: "Address the bucket in the path rather than the host name, as MinIO usually needs. Absent means virtual-hosted style.";
|
|
1373
|
+
};
|
|
1374
|
+
};
|
|
1375
|
+
};
|
|
1376
|
+
readonly LocalSettings: {
|
|
1377
|
+
readonly title: "LocalSettings";
|
|
1378
|
+
readonly type: "object";
|
|
1379
|
+
readonly additionalProperties: false;
|
|
1380
|
+
readonly required: readonly ["kind", "root"];
|
|
1381
|
+
readonly properties: {
|
|
1382
|
+
readonly kind: {
|
|
1383
|
+
readonly const: "local";
|
|
1384
|
+
};
|
|
1385
|
+
readonly root: {
|
|
1386
|
+
readonly type: "string";
|
|
1387
|
+
readonly minLength: 1;
|
|
1388
|
+
readonly maxLength: 1024;
|
|
1389
|
+
readonly pattern: "^/";
|
|
1390
|
+
readonly description: "Absolute path of the directory the community writes blobs under, on its own host. Created owner-only. Not carried by the community's backup: back it up beside it.";
|
|
1391
|
+
};
|
|
1392
|
+
};
|
|
1393
|
+
};
|
|
1394
|
+
readonly StorageConfigId: {
|
|
1395
|
+
readonly title: "StorageConfigId";
|
|
1396
|
+
readonly type: "string";
|
|
1397
|
+
readonly minLength: 1;
|
|
1398
|
+
readonly maxLength: 64;
|
|
1399
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
1400
|
+
readonly description: "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value.";
|
|
1401
|
+
};
|
|
1402
|
+
readonly StorageKind: {
|
|
1403
|
+
readonly title: "StorageKind";
|
|
1404
|
+
readonly type: "string";
|
|
1405
|
+
readonly enum: readonly ["local", "s3", "gcs", "walrus"];
|
|
1406
|
+
readonly description: "Which backend a config stores to. `local`: plain files in a directory on the community's own host. `s3`: an S3-compatible object store (AWS S3, Cloudflare R2, Backblaze B2, MinIO). `gcs`: native Google Cloud Storage. `walrus`: the Walrus decentralised store, where every blob is public ciphertext and deletion is a lapse, not an erasure.";
|
|
1407
|
+
};
|
|
1408
|
+
};
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
/**
|
|
1412
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
1413
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
1414
|
+
* parties (§7.3 item 5).
|
|
1415
|
+
*/
|
|
1416
|
+
export declare const RESPONSE_SPEC: {
|
|
1417
|
+
readonly typeUri: "https://trusttasks.org/spec/vtc/storage/configs/list/0.1#response";
|
|
1418
|
+
readonly isBearer: false;
|
|
1419
|
+
readonly isProofRequired: false;
|
|
1420
|
+
readonly isRecipientRequired: true;
|
|
1421
|
+
readonly isIssuedAtRequired: false;
|
|
1422
|
+
readonly payloadSchema: {
|
|
1423
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
1424
|
+
readonly $ref: "#/$defs/Response";
|
|
1425
|
+
readonly $defs: {
|
|
1426
|
+
readonly ConfigItem: {
|
|
1427
|
+
readonly type: "object";
|
|
1428
|
+
readonly additionalProperties: false;
|
|
1429
|
+
readonly description: "One config and what it holds.";
|
|
1430
|
+
readonly required: readonly ["config", "facts"];
|
|
1431
|
+
readonly properties: {
|
|
1432
|
+
readonly config: {
|
|
1433
|
+
readonly $ref: "#/$defs/StorageConfig";
|
|
1434
|
+
};
|
|
1435
|
+
readonly facts: {
|
|
1436
|
+
readonly $ref: "#/$defs/StorageConfigFacts";
|
|
1437
|
+
};
|
|
1438
|
+
};
|
|
1439
|
+
};
|
|
1440
|
+
readonly Response: {
|
|
1441
|
+
readonly $anchor: "response";
|
|
1442
|
+
readonly title: "VTC Storage — Configs — List — response payload";
|
|
1443
|
+
readonly type: "object";
|
|
1444
|
+
readonly additionalProperties: false;
|
|
1445
|
+
readonly required: readonly ["items"];
|
|
1446
|
+
readonly properties: {
|
|
1447
|
+
readonly items: {
|
|
1448
|
+
readonly type: "array";
|
|
1449
|
+
readonly maxItems: 100;
|
|
1450
|
+
readonly items: {
|
|
1451
|
+
readonly $ref: "#/$defs/ConfigItem";
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
readonly nextCursor: {
|
|
1455
|
+
readonly type: "string";
|
|
1456
|
+
readonly minLength: 1;
|
|
1457
|
+
readonly maxLength: 1024;
|
|
1458
|
+
readonly description: "Present when more remain; pass it as `cursor`.";
|
|
1459
|
+
};
|
|
1460
|
+
readonly ext: {
|
|
1461
|
+
readonly $ref: "#/$defs/Ext";
|
|
1462
|
+
};
|
|
1463
|
+
};
|
|
1464
|
+
};
|
|
1465
|
+
readonly Ext: {
|
|
1466
|
+
readonly title: "Ext";
|
|
1467
|
+
readonly description: "Vendor-namespaced extension object per SPEC.md §4.5.1. Each immediate key MUST be a reverse-DNS namespace; structure under each namespace is opaque to the framework.";
|
|
1468
|
+
readonly type: "object";
|
|
1469
|
+
readonly minProperties: 1;
|
|
1470
|
+
readonly additionalProperties: true;
|
|
1471
|
+
readonly propertyNames: {
|
|
1472
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
1473
|
+
};
|
|
1474
|
+
};
|
|
1475
|
+
readonly StorageConfigFacts: {
|
|
1476
|
+
readonly title: "StorageConfigFacts";
|
|
1477
|
+
readonly type: "object";
|
|
1478
|
+
readonly additionalProperties: false;
|
|
1479
|
+
readonly required: readonly ["rooms", "files", "bytes", "pendingDeleteBytes", "credential", "health"];
|
|
1480
|
+
readonly description: "What a config holds and whether it works, computed at the time of the read. Ciphertext bytes throughout.";
|
|
1481
|
+
readonly properties: {
|
|
1482
|
+
readonly rooms: {
|
|
1483
|
+
readonly type: "integer";
|
|
1484
|
+
readonly minimum: 0;
|
|
1485
|
+
readonly description: "Rooms assigned to this config.";
|
|
1486
|
+
};
|
|
1487
|
+
readonly files: {
|
|
1488
|
+
readonly type: "integer";
|
|
1489
|
+
readonly minimum: 0;
|
|
1490
|
+
readonly description: "Blobs stored on this config that are not yet deleted, wherever their rooms are now assigned.";
|
|
1491
|
+
};
|
|
1492
|
+
readonly bytes: {
|
|
1493
|
+
readonly type: "integer";
|
|
1494
|
+
readonly minimum: 0;
|
|
1495
|
+
readonly description: "Their total size. Counts against `capacityBytes` until the backend deletion has actually happened, unlike room and member usage, which stop counting an orphaned blob at once.";
|
|
1496
|
+
};
|
|
1497
|
+
readonly pendingDeleteBytes: {
|
|
1498
|
+
readonly type: "integer";
|
|
1499
|
+
readonly minimum: 0;
|
|
1500
|
+
readonly description: "Bytes of orphaned blobs awaiting deletion after their grace window.";
|
|
1501
|
+
};
|
|
1502
|
+
readonly credential: {
|
|
1503
|
+
readonly $ref: "#/$defs/CredentialState";
|
|
1504
|
+
};
|
|
1505
|
+
readonly health: {
|
|
1506
|
+
readonly $ref: "#/$defs/StorageHealth";
|
|
1507
|
+
};
|
|
1508
|
+
readonly walrus: {
|
|
1509
|
+
readonly type: "object";
|
|
1510
|
+
readonly additionalProperties: false;
|
|
1511
|
+
readonly description: "Present on a `walrus` config.";
|
|
1512
|
+
readonly properties: {
|
|
1513
|
+
readonly signerAddress: {
|
|
1514
|
+
readonly type: "string";
|
|
1515
|
+
readonly pattern: "^0x[0-9a-f]{64}$";
|
|
1516
|
+
readonly description: "The Sui address that pays for storage, derived from the VTA account's key.";
|
|
1517
|
+
};
|
|
1518
|
+
readonly nextExtensionDueAt: {
|
|
1519
|
+
readonly type: "string";
|
|
1520
|
+
readonly format: "date-time";
|
|
1521
|
+
};
|
|
1522
|
+
};
|
|
1523
|
+
};
|
|
1524
|
+
};
|
|
1525
|
+
};
|
|
1526
|
+
readonly StorageHealth: {
|
|
1527
|
+
readonly title: "StorageHealth";
|
|
1528
|
+
readonly type: "object";
|
|
1529
|
+
readonly additionalProperties: false;
|
|
1530
|
+
readonly description: "The last evidence the community has that a config works. Every member is optional: a config never probed and never used has none.";
|
|
1531
|
+
readonly properties: {
|
|
1532
|
+
readonly lastProbeAt: {
|
|
1533
|
+
readonly type: "string";
|
|
1534
|
+
readonly format: "date-time";
|
|
1535
|
+
};
|
|
1536
|
+
readonly lastProbeOk: {
|
|
1537
|
+
readonly type: "boolean";
|
|
1538
|
+
};
|
|
1539
|
+
readonly lastPutAt: {
|
|
1540
|
+
readonly type: "string";
|
|
1541
|
+
readonly format: "date-time";
|
|
1542
|
+
readonly description: "The last successful blob write.";
|
|
1543
|
+
};
|
|
1544
|
+
readonly lastGetAt: {
|
|
1545
|
+
readonly type: "string";
|
|
1546
|
+
readonly format: "date-time";
|
|
1547
|
+
readonly description: "The last successful chunk read.";
|
|
1548
|
+
};
|
|
1549
|
+
readonly lastDeleteAt: {
|
|
1550
|
+
readonly type: "string";
|
|
1551
|
+
readonly format: "date-time";
|
|
1552
|
+
readonly description: "The last successful deletion (on `walrus`, the last lapse the community observed).";
|
|
1553
|
+
};
|
|
1554
|
+
};
|
|
1555
|
+
};
|
|
1556
|
+
readonly CredentialState: {
|
|
1557
|
+
readonly title: "CredentialState";
|
|
1558
|
+
readonly type: "object";
|
|
1559
|
+
readonly additionalProperties: false;
|
|
1560
|
+
readonly required: readonly ["status"];
|
|
1561
|
+
readonly description: "Whether a config can authenticate now, and how — never the credential. `status`: `vta-account`, `ambient` and `sealed` are usable; `required` means the config cannot store until a credential is provided (a `sealed` config never set, or set before a restore, which carries no credential); `none` is a `local` config.";
|
|
1562
|
+
readonly properties: {
|
|
1563
|
+
readonly status: {
|
|
1564
|
+
readonly type: "string";
|
|
1565
|
+
readonly enum: readonly ["vta-account", "ambient", "sealed", "required", "none"];
|
|
1566
|
+
};
|
|
1567
|
+
readonly account: {
|
|
1568
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
1569
|
+
readonly description: "Present with `vta-account`.";
|
|
1570
|
+
};
|
|
1571
|
+
readonly fingerprint: {
|
|
1572
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
1573
|
+
readonly description: "Present with `sealed`: a digest identifying the stored credential, so an administrator can tell which one is set without anyone being able to read it. Computed over the credential with a community-held key, never a bare hash of a low-entropy secret.";
|
|
1574
|
+
};
|
|
1575
|
+
readonly setAt: {
|
|
1576
|
+
readonly type: "string";
|
|
1577
|
+
readonly format: "date-time";
|
|
1578
|
+
readonly description: "Present with `sealed`: when the stored credential was last set.";
|
|
1579
|
+
};
|
|
1580
|
+
readonly roomsHoldingCredentials: {
|
|
1581
|
+
readonly type: "integer";
|
|
1582
|
+
readonly minimum: 0;
|
|
1583
|
+
readonly description: "Present with `vta-account`: how many rooms the community currently holds a live room-scoped credential for.";
|
|
1584
|
+
};
|
|
1585
|
+
};
|
|
1586
|
+
};
|
|
1587
|
+
readonly ExternalAccountId: {
|
|
1588
|
+
readonly title: "ExternalAccountId";
|
|
1589
|
+
readonly type: "string";
|
|
1590
|
+
readonly minLength: 1;
|
|
1591
|
+
readonly maxLength: 64;
|
|
1592
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
1593
|
+
readonly description: "The identifier of an external account held by the community's VTA (the external/accounts/* family), which issues the community short-lived, room-scoped credentials and holds the long-lived authority itself.";
|
|
1594
|
+
};
|
|
1595
|
+
readonly DigestMultibase: {
|
|
1596
|
+
readonly title: "DigestMultibase";
|
|
1597
|
+
readonly description: "A cryptographic digest as a multibase-encoded multihash — the encoding the W3C Verifiable Credentials Data Model 2.0 defines for `digestMultibase`, and the one `did:webvh` uses for its SCID and entry hashes.\n\nMultihash carries the hash algorithm in-band, so the value is self-describing and the wire format survives an algorithm change without a schema revision; multibase does the same for the base encoding, so a verifier never infers base58 from base64url by context. A bare hex string or a `sha-256:`-style prefix hard-codes one algorithm into the wire contract and is non-conforming here.\n\nThis definition constrains the *encoding only*. What the digest is computed over is stated by each referencing field, because it differs legitimately: a digest over a JSON document is taken over its RFC 8785 (JCS) canonicalization, while a digest over an opaque artifact is taken over its bytes. A field whose input is a JSON document and which does not name a canonicalization is not reproducible.\n\nRestricted to the two multibase headers W3C Controlled Identifiers 1.0 §2.4 normatively requires — `z` (base58btc) and `u` (base64url-no-pad). CID permits others but states that \"interoperability is not guaranteed between implementations using such values\", and a registry whose purpose is interoperability should not mint digests a conforming verifier may be unable to read. The alphabets are enforced rather than assumed: base58btc excludes 0, O, I and l, and an earlier permissive pattern let three published examples carry digests that were not valid base58 at all. base58btc is RECOMMENDED, for consistency with `did:key` and `did:webvh`.";
|
|
1598
|
+
readonly type: "string";
|
|
1599
|
+
readonly minLength: 16;
|
|
1600
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
1601
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
1602
|
+
};
|
|
1603
|
+
readonly StorageConfig: {
|
|
1604
|
+
readonly title: "StorageConfig";
|
|
1605
|
+
readonly type: "object";
|
|
1606
|
+
readonly additionalProperties: false;
|
|
1607
|
+
readonly required: readonly ["id", "label", "settings", "state", "createdBy", "createdAt"];
|
|
1608
|
+
readonly description: "One storage config as the community holds it. Carries no secret.";
|
|
1609
|
+
readonly properties: {
|
|
1610
|
+
readonly id: {
|
|
1611
|
+
readonly $ref: "#/$defs/StorageConfigId";
|
|
1612
|
+
};
|
|
1613
|
+
readonly label: {
|
|
1614
|
+
readonly type: "string";
|
|
1615
|
+
readonly minLength: 1;
|
|
1616
|
+
readonly maxLength: 128;
|
|
1617
|
+
readonly description: "A display name for administrators (`EU — S3 (main account)`). Shown to a room's creator with the config's kind when the community lets them choose.";
|
|
1618
|
+
};
|
|
1619
|
+
readonly settings: {
|
|
1620
|
+
readonly $ref: "#/$defs/StorageSettings";
|
|
1621
|
+
};
|
|
1622
|
+
readonly auth: {
|
|
1623
|
+
readonly $ref: "#/$defs/StorageAuth";
|
|
1624
|
+
};
|
|
1625
|
+
readonly capacityBytes: {
|
|
1626
|
+
readonly type: "integer";
|
|
1627
|
+
readonly minimum: 0;
|
|
1628
|
+
readonly description: "Total ciphertext bytes the community will store on this config, across every room assigned to it. A capacity, not a policy: an upload that would cross it is refused with scope `storage`. Absent means no capacity set.";
|
|
1629
|
+
};
|
|
1630
|
+
readonly state: {
|
|
1631
|
+
readonly $ref: "#/$defs/ConfigState";
|
|
1632
|
+
};
|
|
1633
|
+
readonly isDefault: {
|
|
1634
|
+
readonly type: "boolean";
|
|
1635
|
+
readonly description: "True for the config a room is assigned to when neither the community's policy nor its creator names one.";
|
|
1636
|
+
};
|
|
1637
|
+
readonly createdBy: {
|
|
1638
|
+
readonly type: "string";
|
|
1639
|
+
readonly pattern: "^did:";
|
|
1640
|
+
readonly maxLength: 2048;
|
|
1641
|
+
};
|
|
1642
|
+
readonly createdAt: {
|
|
1643
|
+
readonly type: "string";
|
|
1644
|
+
readonly format: "date-time";
|
|
1645
|
+
};
|
|
1646
|
+
readonly updatedBy: {
|
|
1647
|
+
readonly type: "string";
|
|
1648
|
+
readonly pattern: "^did:";
|
|
1649
|
+
readonly maxLength: 2048;
|
|
1650
|
+
};
|
|
1651
|
+
readonly updatedAt: {
|
|
1652
|
+
readonly type: "string";
|
|
1653
|
+
readonly format: "date-time";
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1656
|
+
};
|
|
1657
|
+
readonly ConfigState: {
|
|
1658
|
+
readonly title: "ConfigState";
|
|
1659
|
+
readonly type: "string";
|
|
1660
|
+
readonly enum: readonly ["active", "draining", "retired"];
|
|
1661
|
+
readonly description: "`active`: accepts new rooms and new uploads. `draining`: retired by an administrator while blobs still name it — refuses new rooms and new uploads, keeps serving reads, and becomes `retired` when a migration has emptied it. `retired`: refuses new rooms and new uploads and holds no blob. A config is never deleted while a blob names it.";
|
|
1662
|
+
};
|
|
1663
|
+
readonly StorageAuth: {
|
|
1664
|
+
readonly title: "StorageAuth";
|
|
1665
|
+
readonly description: "How the community authenticates to a config's backend. Absent on a `local` config, which needs none.\n\n`vta-account` (RECOMMENDED): an external account in the community's VTA. The VTA holds the long-lived authority; the community holds nothing that outlives a credential lifetime, and asks for credentials scoped to one room's prefix for at most 15 minutes, every issuance audited at the VTA. Required for a `walrus` config other than a `sealed` one, since the VTA's `sui-signer` account signs its storage transactions.\n\n`ambient`: the cloud identity of the machine the community runs on (an instance role, workload identity), downscoped to one room's prefix by the community itself. Not audited or rate-limited by the VTA, and usable by anything on that machine that reaches the metadata endpoint. Not valid for `walrus`.\n\n`sealed` (discouraged): a long-lived credential stored by the community, set with vtc/storage/credentials/set. Protects against every administrator through every surface the community offers; does not protect against whoever operates the machine.";
|
|
1666
|
+
readonly oneOf: readonly [{
|
|
1667
|
+
readonly type: "object";
|
|
1668
|
+
readonly additionalProperties: false;
|
|
1669
|
+
readonly required: readonly ["mode", "account"];
|
|
1670
|
+
readonly properties: {
|
|
1671
|
+
readonly mode: {
|
|
1672
|
+
readonly const: "vta-account";
|
|
1673
|
+
};
|
|
1674
|
+
readonly account: {
|
|
1675
|
+
readonly $ref: "#/$defs/ExternalAccountId";
|
|
1676
|
+
};
|
|
1677
|
+
};
|
|
1678
|
+
}, {
|
|
1679
|
+
readonly type: "object";
|
|
1680
|
+
readonly additionalProperties: false;
|
|
1681
|
+
readonly required: readonly ["mode"];
|
|
1682
|
+
readonly properties: {
|
|
1683
|
+
readonly mode: {
|
|
1684
|
+
readonly const: "ambient";
|
|
1685
|
+
};
|
|
1686
|
+
};
|
|
1687
|
+
}, {
|
|
1688
|
+
readonly type: "object";
|
|
1689
|
+
readonly additionalProperties: false;
|
|
1690
|
+
readonly required: readonly ["mode"];
|
|
1691
|
+
readonly properties: {
|
|
1692
|
+
readonly mode: {
|
|
1693
|
+
readonly const: "sealed";
|
|
1694
|
+
};
|
|
1695
|
+
};
|
|
1696
|
+
}];
|
|
1697
|
+
};
|
|
1698
|
+
readonly StorageSettings: {
|
|
1699
|
+
readonly title: "StorageSettings";
|
|
1700
|
+
readonly description: "A config's backend settings, discriminated by `kind`. Never a secret: a credential is a StorageAuth, held elsewhere.";
|
|
1701
|
+
readonly oneOf: readonly [{
|
|
1702
|
+
readonly $ref: "#/$defs/LocalSettings";
|
|
1703
|
+
}, {
|
|
1704
|
+
readonly $ref: "#/$defs/S3Settings";
|
|
1705
|
+
}, {
|
|
1706
|
+
readonly $ref: "#/$defs/GcsSettings";
|
|
1707
|
+
}, {
|
|
1708
|
+
readonly $ref: "#/$defs/WalrusSettings";
|
|
1709
|
+
}];
|
|
1710
|
+
};
|
|
1711
|
+
readonly WalrusSettings: {
|
|
1712
|
+
readonly title: "WalrusSettings";
|
|
1713
|
+
readonly type: "object";
|
|
1714
|
+
readonly additionalProperties: false;
|
|
1715
|
+
readonly required: readonly ["kind", "relayUrl", "aggregatorUrl", "epochs", "extendBeforeEpochs"];
|
|
1716
|
+
readonly properties: {
|
|
1717
|
+
readonly kind: {
|
|
1718
|
+
readonly const: "walrus";
|
|
1719
|
+
};
|
|
1720
|
+
readonly relayUrl: {
|
|
1721
|
+
readonly type: "string";
|
|
1722
|
+
readonly format: "uri";
|
|
1723
|
+
readonly maxLength: 2048;
|
|
1724
|
+
readonly pattern: "^https://";
|
|
1725
|
+
readonly description: "The Walrus upload relay the community writes through. The community never runs a publisher: a publisher holds a hot wallet in its own configuration, which is the long-lived secret these tasks exist to avoid.";
|
|
1726
|
+
};
|
|
1727
|
+
readonly aggregatorUrl: {
|
|
1728
|
+
readonly type: "string";
|
|
1729
|
+
readonly format: "uri";
|
|
1730
|
+
readonly maxLength: 2048;
|
|
1731
|
+
readonly pattern: "^https://";
|
|
1732
|
+
readonly description: "The Walrus aggregator the community reads through.";
|
|
1733
|
+
};
|
|
1734
|
+
readonly epochs: {
|
|
1735
|
+
readonly type: "integer";
|
|
1736
|
+
readonly minimum: 1;
|
|
1737
|
+
readonly maximum: 53;
|
|
1738
|
+
readonly description: "Storage epochs to buy when a blob is registered. Walrus sells storage in epochs (two weeks on mainnet) and caps one purchase at 53.";
|
|
1739
|
+
};
|
|
1740
|
+
readonly extendBeforeEpochs: {
|
|
1741
|
+
readonly type: "integer";
|
|
1742
|
+
readonly minimum: 1;
|
|
1743
|
+
readonly maximum: 52;
|
|
1744
|
+
readonly description: "How many epochs before a live blob's end epoch the community extends it. A blob that has become an orphan is not extended, and lapses: the Walrus form of deletion.";
|
|
1745
|
+
};
|
|
1746
|
+
};
|
|
1747
|
+
};
|
|
1748
|
+
readonly GcsSettings: {
|
|
1749
|
+
readonly title: "GcsSettings";
|
|
1750
|
+
readonly type: "object";
|
|
1751
|
+
readonly additionalProperties: false;
|
|
1752
|
+
readonly required: readonly ["kind", "bucket"];
|
|
1753
|
+
readonly properties: {
|
|
1754
|
+
readonly kind: {
|
|
1755
|
+
readonly const: "gcs";
|
|
1756
|
+
};
|
|
1757
|
+
readonly bucket: {
|
|
1758
|
+
readonly type: "string";
|
|
1759
|
+
readonly minLength: 3;
|
|
1760
|
+
readonly maxLength: 222;
|
|
1761
|
+
readonly pattern: "^[a-z0-9][a-z0-9._-]{1,220}[a-z0-9]$";
|
|
1762
|
+
readonly description: "The bucket name. Validated against GCS naming rules here, because it is placed in a Credential Access Boundary condition and must never carry anything but a name.";
|
|
1763
|
+
};
|
|
1764
|
+
readonly prefix: {
|
|
1765
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
1766
|
+
};
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
readonly ObjectPrefix: {
|
|
1770
|
+
readonly title: "ObjectPrefix";
|
|
1771
|
+
readonly type: "string";
|
|
1772
|
+
readonly minLength: 1;
|
|
1773
|
+
readonly maxLength: 256;
|
|
1774
|
+
readonly pattern: "^[A-Za-z0-9!_.*'()/-]+/$";
|
|
1775
|
+
readonly description: "A key prefix inside the bucket, ending in `/`, under which the config's `rooms/` tree is placed. Restricted to the S3 safe-character set so that it can be placed in a downscoped policy without escaping.";
|
|
1776
|
+
};
|
|
1777
|
+
readonly S3Settings: {
|
|
1778
|
+
readonly title: "S3Settings";
|
|
1779
|
+
readonly type: "object";
|
|
1780
|
+
readonly additionalProperties: false;
|
|
1781
|
+
readonly required: readonly ["kind", "region", "bucket"];
|
|
1782
|
+
readonly properties: {
|
|
1783
|
+
readonly kind: {
|
|
1784
|
+
readonly const: "s3";
|
|
1785
|
+
};
|
|
1786
|
+
readonly endpoint: {
|
|
1787
|
+
readonly type: "string";
|
|
1788
|
+
readonly format: "uri";
|
|
1789
|
+
readonly maxLength: 2048;
|
|
1790
|
+
readonly pattern: "^https://";
|
|
1791
|
+
readonly description: "The S3 API endpoint, for a store other than AWS (R2, B2, MinIO). Absent means AWS S3 in `region`. HTTPS only.";
|
|
1792
|
+
};
|
|
1793
|
+
readonly region: {
|
|
1794
|
+
readonly type: "string";
|
|
1795
|
+
readonly minLength: 1;
|
|
1796
|
+
readonly maxLength: 64;
|
|
1797
|
+
readonly pattern: "^[a-z0-9-]+$";
|
|
1798
|
+
readonly description: "The bucket's region, as the store names it (`eu-west-1`; `auto` for R2).";
|
|
1799
|
+
};
|
|
1800
|
+
readonly bucket: {
|
|
1801
|
+
readonly type: "string";
|
|
1802
|
+
readonly minLength: 3;
|
|
1803
|
+
readonly maxLength: 63;
|
|
1804
|
+
readonly pattern: "^[a-z0-9][a-z0-9.-]{1,61}[a-z0-9]$";
|
|
1805
|
+
readonly description: "The bucket name. Validated against S3 naming rules here, because it is placed in downscoped session policies and must never carry anything but a name.";
|
|
1806
|
+
};
|
|
1807
|
+
readonly prefix: {
|
|
1808
|
+
readonly $ref: "#/$defs/ObjectPrefix";
|
|
1809
|
+
};
|
|
1810
|
+
readonly pathStyle: {
|
|
1811
|
+
readonly type: "boolean";
|
|
1812
|
+
readonly description: "Address the bucket in the path rather than the host name, as MinIO usually needs. Absent means virtual-hosted style.";
|
|
1813
|
+
};
|
|
1814
|
+
};
|
|
1815
|
+
};
|
|
1816
|
+
readonly LocalSettings: {
|
|
1817
|
+
readonly title: "LocalSettings";
|
|
1818
|
+
readonly type: "object";
|
|
1819
|
+
readonly additionalProperties: false;
|
|
1820
|
+
readonly required: readonly ["kind", "root"];
|
|
1821
|
+
readonly properties: {
|
|
1822
|
+
readonly kind: {
|
|
1823
|
+
readonly const: "local";
|
|
1824
|
+
};
|
|
1825
|
+
readonly root: {
|
|
1826
|
+
readonly type: "string";
|
|
1827
|
+
readonly minLength: 1;
|
|
1828
|
+
readonly maxLength: 1024;
|
|
1829
|
+
readonly pattern: "^/";
|
|
1830
|
+
readonly description: "Absolute path of the directory the community writes blobs under, on its own host. Created owner-only. Not carried by the community's backup: back it up beside it.";
|
|
1831
|
+
};
|
|
1832
|
+
};
|
|
1833
|
+
};
|
|
1834
|
+
readonly StorageConfigId: {
|
|
1835
|
+
readonly title: "StorageConfigId";
|
|
1836
|
+
readonly type: "string";
|
|
1837
|
+
readonly minLength: 1;
|
|
1838
|
+
readonly maxLength: 64;
|
|
1839
|
+
readonly pattern: "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$";
|
|
1840
|
+
readonly description: "A storage config's identifier, chosen by the administrator who creates it and immutable thereafter: lowercase letters, digits and inner hyphens, at most 64 characters (`eu-s3-primary`, `walrus-main`). Unique within the community. Never reused after a config is retired, because blobs name their config by this value.";
|
|
1841
|
+
};
|
|
1842
|
+
readonly StorageKind: {
|
|
1843
|
+
readonly title: "StorageKind";
|
|
1844
|
+
readonly type: "string";
|
|
1845
|
+
readonly enum: readonly ["local", "s3", "gcs", "walrus"];
|
|
1846
|
+
readonly description: "Which backend a config stores to. `local`: plain files in a directory on the community's own host. `s3`: an S3-compatible object store (AWS S3, Cloudflare R2, Backblaze B2, MinIO). `gcs`: native Google Cloud Storage. `walrus`: the Walrus decentralised store, where every blob is public ciphertext and deletion is a lapse, not an erasure.";
|
|
1847
|
+
};
|
|
1848
|
+
};
|
|
1849
|
+
};
|
|
1850
|
+
};
|
|
1851
|
+
//# sourceMappingURL=payload.d.ts.map
|