@openvtc/trust-tasks 0.20.7 → 0.21.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 +320 -0
- package/dist/_shared/components.d.ts +299 -2
- package/dist/_shared/components.d.ts.map +1 -1
- package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts +456 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.js +248 -0
- package/dist/auth/passkey/enroll/invite/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts +728 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js +430 -0
- package/dist/auth/passkey/enroll/redeem/finish/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts +1043 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.d.ts.map +1 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js +628 -0
- package/dist/auth/passkey/enroll/redeem/start/0.1/payload.js.map +1 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts +533 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.js +315 -0
- package/dist/auth/passkey/revoke/finish/0.2/payload.js.map +1 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.d.ts +511 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.d.ts.map +1 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.js +297 -0
- package/dist/auth/passkey/revoke/start/0.2/payload.js.map +1 -0
- package/dist/auth/step-up/approve-request/0.3/payload.d.ts +613 -0
- package/dist/auth/step-up/approve-request/0.3/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-request/0.3/payload.js +345 -0
- package/dist/auth/step-up/approve-request/0.3/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts +887 -0
- package/dist/auth/step-up/approve-response/0.4/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.4/payload.js +504 -0
- package/dist/auth/step-up/approve-response/0.4/payload.js.map +1 -0
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts +887 -0
- package/dist/auth/step-up/approve-response/0.5/payload.d.ts.map +1 -0
- package/dist/auth/step-up/approve-response/0.5/payload.js +504 -0
- package/dist/auth/step-up/approve-response/0.5/payload.js.map +1 -0
- package/dist/backup/abort/0.1/payload.d.ts +262 -0
- package/dist/backup/abort/0.1/payload.d.ts.map +1 -0
- package/dist/backup/abort/0.1/payload.js +146 -0
- package/dist/backup/abort/0.1/payload.js.map +1 -0
- package/dist/backup/complete-export/0.1/payload.d.ts +262 -0
- package/dist/backup/complete-export/0.1/payload.d.ts.map +1 -0
- package/dist/backup/complete-export/0.1/payload.js +146 -0
- package/dist/backup/complete-export/0.1/payload.js.map +1 -0
- package/dist/backup/finalize-import/0.1/payload.d.ts +395 -0
- package/dist/backup/finalize-import/0.1/payload.d.ts.map +1 -0
- package/dist/backup/finalize-import/0.1/payload.js +209 -0
- package/dist/backup/finalize-import/0.1/payload.js.map +1 -0
- package/dist/backup/get-chunk/0.1/payload.d.ts +461 -0
- package/dist/backup/get-chunk/0.1/payload.d.ts.map +1 -0
- package/dist/backup/get-chunk/0.1/payload.js +250 -0
- package/dist/backup/get-chunk/0.1/payload.js.map +1 -0
- package/dist/backup/initiate-export/0.1/payload.d.ts +896 -0
- package/dist/backup/initiate-export/0.1/payload.d.ts.map +1 -0
- package/dist/backup/initiate-export/0.1/payload.js +507 -0
- package/dist/backup/initiate-export/0.1/payload.js.map +1 -0
- package/dist/backup/initiate-import/0.1/payload.d.ts +888 -0
- package/dist/backup/initiate-import/0.1/payload.d.ts.map +1 -0
- package/dist/backup/initiate-import/0.1/payload.js +504 -0
- package/dist/backup/initiate-import/0.1/payload.js.map +1 -0
- package/dist/backup/put-chunk/0.1/payload.d.ts +495 -0
- package/dist/backup/put-chunk/0.1/payload.d.ts.map +1 -0
- package/dist/backup/put-chunk/0.1/payload.js +265 -0
- package/dist/backup/put-chunk/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 +4 -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 +4 -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 +4 -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 +4 -2
- package/dist/device/register/0.2/payload.js.map +1 -1
- package/dist/git-ns/_shared/0.4/git-ns.d.ts +16 -0
- package/dist/git-ns/_shared/0.4/git-ns.d.ts.map +1 -0
- package/dist/git-ns/_shared/0.4/git-ns.js +6 -0
- package/dist/git-ns/_shared/0.4/git-ns.js.map +1 -0
- package/dist/git-ns/account/link-status/0.1/payload.d.ts +2 -2
- package/dist/git-ns/account/link-status/0.1/payload.js +2 -2
- package/dist/git-ns/account/link-status/0.1/payload.js.map +1 -1
- package/dist/git-ns/account/unlink/0.1/payload.d.ts +411 -0
- package/dist/git-ns/account/unlink/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/account/unlink/0.1/payload.js +228 -0
- package/dist/git-ns/account/unlink/0.1/payload.js.map +1 -0
- package/dist/git-ns/bridge/event/0.3/payload.d.ts +1682 -0
- package/dist/git-ns/bridge/event/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/event/0.3/payload.js +971 -0
- package/dist/git-ns/bridge/event/0.3/payload.js.map +1 -0
- package/dist/git-ns/bridge/job/0.4/payload.d.ts +1068 -0
- package/dist/git-ns/bridge/job/0.4/payload.d.ts.map +1 -0
- package/dist/git-ns/bridge/job/0.4/payload.js +573 -0
- package/dist/git-ns/bridge/job/0.4/payload.js.map +1 -0
- package/dist/git-ns/drift/resolve/0.3/payload.d.ts +1072 -0
- package/dist/git-ns/drift/resolve/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/drift/resolve/0.3/payload.js +634 -0
- package/dist/git-ns/drift/resolve/0.3/payload.js.map +1 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.d.ts +515 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.js +296 -0
- package/dist/git-ns/namespace/reseat/0.3/payload.js.map +1 -0
- package/dist/git-ns/repo/create/0.3/payload.d.ts +1101 -0
- package/dist/git-ns/repo/create/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/repo/create/0.3/payload.js +646 -0
- package/dist/git-ns/repo/create/0.3/payload.js.map +1 -0
- package/dist/git-ns/right/break-glass/0.1/payload.d.ts +685 -0
- package/dist/git-ns/right/break-glass/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/break-glass/0.1/payload.js +397 -0
- package/dist/git-ns/right/break-glass/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts +384 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.js +216 -0
- package/dist/git-ns/right/break-glass-notice/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/grant/0.3/payload.d.ts +678 -0
- package/dist/git-ns/right/grant/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/right/grant/0.3/payload.js +383 -0
- package/dist/git-ns/right/grant/0.3/payload.js.map +1 -0
- package/dist/git-ns/right/ratify/0.1/payload.d.ts +702 -0
- package/dist/git-ns/right/ratify/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/right/ratify/0.1/payload.js +404 -0
- package/dist/git-ns/right/ratify/0.1/payload.js.map +1 -0
- package/dist/git-ns/right/revoke/0.3/payload.d.ts +664 -0
- package/dist/git-ns/right/revoke/0.3/payload.d.ts.map +1 -0
- package/dist/git-ns/right/revoke/0.3/payload.js +378 -0
- package/dist/git-ns/right/revoke/0.3/payload.js.map +1 -0
- package/dist/git-ns/roles/reproject/0.1/payload.d.ts +325 -0
- package/dist/git-ns/roles/reproject/0.1/payload.d.ts.map +1 -0
- package/dist/git-ns/roles/reproject/0.1/payload.js +176 -0
- package/dist/git-ns/roles/reproject/0.1/payload.js.map +1 -0
- package/dist/git-ns/view/0.1/payload.d.ts +2 -2
- package/dist/git-ns/view/0.1/payload.js +2 -2
- package/dist/git-ns/view/0.1/payload.js.map +1 -1
- package/dist/git-ns/view/0.2/payload.d.ts +2 -2
- package/dist/git-ns/view/0.2/payload.js +2 -2
- package/dist/git-ns/view/0.2/payload.js.map +1 -1
- package/dist/git-ns/view/0.3/payload.d.ts +2 -2
- package/dist/git-ns/view/0.3/payload.js +2 -2
- package/dist/git-ns/view/0.3/payload.js.map +1 -1
- package/dist/git-ns/view/0.4/payload.d.ts +1696 -0
- package/dist/git-ns/view/0.4/payload.d.ts.map +1 -0
- package/dist/git-ns/view/0.4/payload.js +1012 -0
- package/dist/git-ns/view/0.4/payload.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -1
- package/dist/messaging/message/status/0.1/payload.d.ts +372 -0
- package/dist/messaging/message/status/0.1/payload.d.ts.map +1 -0
- package/dist/messaging/message/status/0.1/payload.js +214 -0
- package/dist/messaging/message/status/0.1/payload.js.map +1 -0
- package/dist/vta/_shared/0.3/did-key-roles.d.ts +16 -0
- package/dist/vta/_shared/0.3/did-key-roles.d.ts.map +1 -0
- package/dist/vta/_shared/0.3/did-key-roles.js +6 -0
- package/dist/vta/_shared/0.3/did-key-roles.js.map +1 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts +326 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.d.ts.map +1 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.js +175 -0
- package/dist/vta/attestation/mnemonic-export/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts +1914 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.js +1128 -0
- package/dist/vta/webvh/dids/keys/add/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts +1603 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.js +942 -0
- package/dist/vta/webvh/dids/keys/list/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts +1914 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.js +1123 -0
- package/dist/vta/webvh/dids/keys/retire/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts +2021 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js +1168 -0
- package/dist/vta/webvh/dids/keys/revoke/1.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts +1992 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js +1151 -0
- package/dist/vta/webvh/dids/rotate-keys/2.0/payload.js.map +1 -0
- package/dist/vta/webvh/dids/update/2.0/payload.d.ts +1062 -0
- package/dist/vta/webvh/dids/update/2.0/payload.d.ts.map +1 -0
- package/dist/vta/webvh/dids/update/2.0/payload.js +616 -0
- package/dist/vta/webvh/dids/update/2.0/payload.js.map +1 -0
- package/dist/vtc/credentials/reissue/0.1/payload.d.ts +502 -0
- package/dist/vtc/credentials/reissue/0.1/payload.d.ts.map +1 -0
- package/dist/vtc/credentials/reissue/0.1/payload.js +282 -0
- package/dist/vtc/credentials/reissue/0.1/payload.js.map +1 -0
- package/dist/vtc/members/personhood/challenge/0.1/payload.d.ts +2 -2
- package/dist/vtc/members/personhood/challenge/0.1/payload.js +2 -2
- package/dist/vtc/members/personhood/challenge/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/profile/0.1/payload.d.ts +2 -2
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js +2 -2
- package/dist/vtc/vetting/vetters/profile/0.1/payload.js.map +1 -1
- package/dist/vtc/vetting/vetters/resend/0.1/payload.d.ts +2 -2
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js +2 -2
- package/dist/vtc/vetting/vetters/resend/0.1/payload.js.map +1 -1
- package/package.json +1 -1
- package/src/_shared/components.ts +313 -2
- package/src/auth/passkey/enroll/invite/0.2/payload.ts +325 -0
- package/src/auth/passkey/enroll/redeem/finish/0.1/payload.ts +499 -0
- package/src/auth/passkey/enroll/redeem/start/0.1/payload.ts +700 -0
- package/src/auth/passkey/revoke/finish/0.2/payload.ts +379 -0
- package/src/auth/passkey/revoke/start/0.2/payload.ts +349 -0
- package/src/auth/step-up/approve-request/0.3/payload.ts +421 -0
- package/src/auth/step-up/approve-response/0.4/payload.ts +593 -0
- package/src/auth/step-up/approve-response/0.5/payload.ts +593 -0
- package/src/backup/abort/0.1/payload.ts +191 -0
- package/src/backup/complete-export/0.1/payload.ts +191 -0
- package/src/backup/finalize-import/0.1/payload.ts +279 -0
- package/src/backup/get-chunk/0.1/payload.ts +308 -0
- package/src/backup/initiate-export/0.1/payload.ts +564 -0
- package/src/backup/initiate-import/0.1/payload.ts +561 -0
- package/src/backup/put-chunk/0.1/payload.ts +331 -0
- package/src/device/list/0.1/payload.ts +4 -2
- package/src/device/list/0.2/payload.ts +4 -2
- package/src/device/register/0.1/payload.ts +4 -2
- package/src/device/register/0.2/payload.ts +4 -2
- package/src/git-ns/_shared/0.4/git-ns.ts +17 -0
- package/src/git-ns/account/link-status/0.1/payload.ts +2 -2
- package/src/git-ns/account/unlink/0.1/payload.ts +274 -0
- package/src/git-ns/bridge/event/0.3/payload.ts +1132 -0
- package/src/git-ns/bridge/job/0.4/payload.ts +691 -0
- package/src/git-ns/drift/resolve/0.3/payload.ts +707 -0
- package/src/git-ns/namespace/reseat/0.3/payload.ts +342 -0
- package/src/git-ns/repo/create/0.3/payload.ts +706 -0
- package/src/git-ns/right/break-glass/0.1/payload.ts +443 -0
- package/src/git-ns/right/break-glass-notice/0.1/payload.ts +258 -0
- package/src/git-ns/right/grant/0.3/payload.ts +434 -0
- package/src/git-ns/right/ratify/0.1/payload.ts +455 -0
- package/src/git-ns/right/revoke/0.3/payload.ts +425 -0
- package/src/git-ns/roles/reproject/0.1/payload.ts +220 -0
- package/src/git-ns/view/0.1/payload.ts +2 -2
- package/src/git-ns/view/0.2/payload.ts +2 -2
- package/src/git-ns/view/0.3/payload.ts +2 -2
- package/src/git-ns/view/0.4/payload.ts +1075 -0
- package/src/index.ts +39 -0
- package/src/messaging/message/status/0.1/payload.ts +270 -0
- package/src/vta/_shared/0.3/did-key-roles.ts +17 -0
- package/src/vta/attestation/mnemonic-export/1.0/payload.ts +232 -0
- package/src/vta/webvh/dids/keys/add/1.0/payload.ts +1217 -0
- package/src/vta/webvh/dids/keys/list/1.0/payload.ts +1004 -0
- package/src/vta/webvh/dids/keys/retire/1.0/payload.ts +1212 -0
- package/src/vta/webvh/dids/keys/revoke/1.0/payload.ts +1276 -0
- package/src/vta/webvh/dids/rotate-keys/2.0/payload.ts +1262 -0
- package/src/vta/webvh/dids/update/2.0/payload.ts +713 -0
- package/src/vtc/credentials/reissue/0.1/payload.ts +357 -0
- package/src/vtc/members/personhood/challenge/0.1/payload.ts +2 -2
- package/src/vtc/vetting/vetters/profile/0.1/payload.ts +2 -2
- package/src/vtc/vetting/vetters/resend/0.1/payload.ts +2 -2
|
@@ -0,0 +1,495 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/backup/put-chunk/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
import type { BundleId, ChunkData, ChunkIndex, DigestMultibase, ExpiresAt, Ext } from "../../../_shared/components.js";
|
|
6
|
+
/**
|
|
7
|
+
* Writes one chunk of a `chunkedTrustTask` import bundle, by index, into a slot opened by initiate-import. Idempotent for identical bytes; bytes that do not match the pre-committed manifest are refused. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.
|
|
8
|
+
*/
|
|
9
|
+
export interface BackupPutChunkPayload {
|
|
10
|
+
/**
|
|
11
|
+
* Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.
|
|
12
|
+
*/
|
|
13
|
+
bundleId: BundleId;
|
|
14
|
+
/**
|
|
15
|
+
* Which chunk. Zero-based, below the manifest's chunkCount.
|
|
16
|
+
*/
|
|
17
|
+
index: ChunkIndex;
|
|
18
|
+
/**
|
|
19
|
+
* Digest of this chunk's raw bytes, restating the manifest entry for `index`. Restated so that a chunk sent to the wrong index is refused as a mismatch against the manifest at the index it names, rather than surviving until reassembly — the recipient checks this member against the manifest and `data` against both.
|
|
20
|
+
*/
|
|
21
|
+
digestMultibase: DigestMultibase;
|
|
22
|
+
data: ChunkData;
|
|
23
|
+
/**
|
|
24
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
25
|
+
*/
|
|
26
|
+
ext?: Ext;
|
|
27
|
+
}
|
|
28
|
+
export interface BackupPutChunkResponsePayload {
|
|
29
|
+
/**
|
|
30
|
+
* Echoed so the response stands alone as the acknowledgement of one write.
|
|
31
|
+
*/
|
|
32
|
+
bundleId: BundleId;
|
|
33
|
+
/**
|
|
34
|
+
* Echoed, so an acknowledgement arriving out of order is attributable to its write.
|
|
35
|
+
*/
|
|
36
|
+
index: ChunkIndex;
|
|
37
|
+
/**
|
|
38
|
+
* Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write.
|
|
39
|
+
*/
|
|
40
|
+
stored: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent.
|
|
43
|
+
*/
|
|
44
|
+
remainingCount: number;
|
|
45
|
+
/**
|
|
46
|
+
* The slot's current expiry, after any extension this write earned.
|
|
47
|
+
*/
|
|
48
|
+
expiresAt: ExpiresAt;
|
|
49
|
+
/**
|
|
50
|
+
* Ecosystem-defined extension members per SPEC.md §4.5.1.
|
|
51
|
+
*/
|
|
52
|
+
ext?: Ext;
|
|
53
|
+
}
|
|
54
|
+
/** Shared definitions this specification references, re-exported under the names it used to declare them with. */
|
|
55
|
+
export type { BundleId, ChunkData, ChunkIndex, DigestMultibase, ExpiresAt, Ext };
|
|
56
|
+
/** Trust Task type URI. */
|
|
57
|
+
export declare const TYPE_URI: "https://trusttasks.org/spec/backup/put-chunk/0.1";
|
|
58
|
+
/** Stable alias for this specification's request payload shape. */
|
|
59
|
+
export type Payload = BackupPutChunkPayload;
|
|
60
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
61
|
+
export declare const RESPONSE_TYPE_URI: "https://trusttasks.org/spec/backup/put-chunk/0.1#response";
|
|
62
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
63
|
+
export type Response = BackupPutChunkResponsePayload;
|
|
64
|
+
/**
|
|
65
|
+
* This specification's payload schema, as a value.
|
|
66
|
+
*
|
|
67
|
+
* SPEC.md §7.2 item 2 is performed against this. It is shipped as data
|
|
68
|
+
* rather than only as a `.json` file because TypeScript types are erased
|
|
69
|
+
* at runtime: without a schema a consumer has nothing to validate, and
|
|
70
|
+
* every REQUIRED payload member is optional in practice. Cross-file
|
|
71
|
+
* `$ref`s are already inlined, so it needs no resolver.
|
|
72
|
+
*/
|
|
73
|
+
export declare const PAYLOAD_SCHEMA: {
|
|
74
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
75
|
+
readonly $id: "https://trusttasks.org/spec/backup/put-chunk/0.1";
|
|
76
|
+
readonly title: "Backup — Put Chunk — payload";
|
|
77
|
+
readonly description: "Writes one chunk of a `chunkedTrustTask` import bundle, by index, into a slot opened by initiate-import. Idempotent for identical bytes; bytes that do not match the pre-committed manifest are refused. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
78
|
+
readonly type: "object";
|
|
79
|
+
readonly additionalProperties: false;
|
|
80
|
+
readonly required: readonly ["bundleId", "index", "digestMultibase", "data"];
|
|
81
|
+
readonly properties: {
|
|
82
|
+
readonly bundleId: {
|
|
83
|
+
readonly $ref: "#/$defs/BundleId";
|
|
84
|
+
readonly description: "Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
85
|
+
};
|
|
86
|
+
readonly index: {
|
|
87
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
88
|
+
readonly description: "Which chunk. Zero-based, below the manifest's chunkCount.";
|
|
89
|
+
};
|
|
90
|
+
readonly digestMultibase: {
|
|
91
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
92
|
+
readonly description: "Digest of this chunk's raw bytes, restating the manifest entry for `index`. Restated so that a chunk sent to the wrong index is refused as a mismatch against the manifest at the index it names, rather than surviving until reassembly — the recipient checks this member against the manifest and `data` against both.";
|
|
93
|
+
};
|
|
94
|
+
readonly data: {
|
|
95
|
+
readonly $ref: "#/$defs/ChunkData";
|
|
96
|
+
};
|
|
97
|
+
readonly ext: {
|
|
98
|
+
readonly $ref: "#/$defs/Ext";
|
|
99
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
readonly $defs: {
|
|
103
|
+
readonly Response: {
|
|
104
|
+
readonly $anchor: "response";
|
|
105
|
+
readonly title: "Backup — Put Chunk — response payload";
|
|
106
|
+
readonly type: "object";
|
|
107
|
+
readonly additionalProperties: false;
|
|
108
|
+
readonly required: readonly ["bundleId", "index", "stored", "remainingCount", "expiresAt"];
|
|
109
|
+
readonly properties: {
|
|
110
|
+
readonly bundleId: {
|
|
111
|
+
readonly $ref: "#/$defs/BundleId";
|
|
112
|
+
readonly description: "Echoed so the response stands alone as the acknowledgement of one write.";
|
|
113
|
+
};
|
|
114
|
+
readonly index: {
|
|
115
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
116
|
+
readonly description: "Echoed, so an acknowledgement arriving out of order is attributable to its write.";
|
|
117
|
+
};
|
|
118
|
+
readonly stored: {
|
|
119
|
+
readonly type: "boolean";
|
|
120
|
+
readonly description: "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write.";
|
|
121
|
+
};
|
|
122
|
+
readonly remainingCount: {
|
|
123
|
+
readonly type: "integer";
|
|
124
|
+
readonly minimum: 0;
|
|
125
|
+
readonly maximum: 4095;
|
|
126
|
+
readonly description: "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent.";
|
|
127
|
+
};
|
|
128
|
+
readonly expiresAt: {
|
|
129
|
+
readonly $ref: "#/$defs/ExpiresAt";
|
|
130
|
+
readonly description: "The slot's current expiry, after any extension this write earned.";
|
|
131
|
+
};
|
|
132
|
+
readonly ext: {
|
|
133
|
+
readonly $ref: "#/$defs/Ext";
|
|
134
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
readonly Ext: {
|
|
139
|
+
readonly title: "Ext";
|
|
140
|
+
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.";
|
|
141
|
+
readonly type: "object";
|
|
142
|
+
readonly minProperties: 1;
|
|
143
|
+
readonly additionalProperties: true;
|
|
144
|
+
readonly propertyNames: {
|
|
145
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
146
|
+
};
|
|
147
|
+
};
|
|
148
|
+
readonly ExpiresAt: {
|
|
149
|
+
readonly title: "ExpiresAt";
|
|
150
|
+
readonly description: "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.";
|
|
151
|
+
readonly type: "string";
|
|
152
|
+
readonly format: "date-time";
|
|
153
|
+
};
|
|
154
|
+
readonly ChunkIndex: {
|
|
155
|
+
readonly title: "ChunkIndex";
|
|
156
|
+
readonly description: "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.";
|
|
157
|
+
readonly type: "integer";
|
|
158
|
+
readonly minimum: 0;
|
|
159
|
+
readonly maximum: 4095;
|
|
160
|
+
};
|
|
161
|
+
readonly BundleId: {
|
|
162
|
+
readonly title: "BundleId";
|
|
163
|
+
readonly description: "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
164
|
+
readonly type: "string";
|
|
165
|
+
readonly pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
|
|
166
|
+
};
|
|
167
|
+
readonly ChunkData: {
|
|
168
|
+
readonly title: "ChunkData";
|
|
169
|
+
readonly description: "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.";
|
|
170
|
+
readonly type: "string";
|
|
171
|
+
readonly minLength: 2;
|
|
172
|
+
readonly maxLength: 349526;
|
|
173
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
174
|
+
};
|
|
175
|
+
readonly DigestMultibase: {
|
|
176
|
+
readonly title: "DigestMultibase";
|
|
177
|
+
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`.";
|
|
178
|
+
readonly type: "string";
|
|
179
|
+
readonly minLength: 16;
|
|
180
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
181
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
};
|
|
185
|
+
/** As {@link PAYLOAD_SCHEMA}, for the success-response variant. */
|
|
186
|
+
export declare const RESPONSE_PAYLOAD_SCHEMA: {
|
|
187
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
188
|
+
readonly $ref: "#/$defs/Response";
|
|
189
|
+
readonly $defs: {
|
|
190
|
+
readonly Response: {
|
|
191
|
+
readonly $anchor: "response";
|
|
192
|
+
readonly title: "Backup — Put Chunk — response payload";
|
|
193
|
+
readonly type: "object";
|
|
194
|
+
readonly additionalProperties: false;
|
|
195
|
+
readonly required: readonly ["bundleId", "index", "stored", "remainingCount", "expiresAt"];
|
|
196
|
+
readonly properties: {
|
|
197
|
+
readonly bundleId: {
|
|
198
|
+
readonly $ref: "#/$defs/BundleId";
|
|
199
|
+
readonly description: "Echoed so the response stands alone as the acknowledgement of one write.";
|
|
200
|
+
};
|
|
201
|
+
readonly index: {
|
|
202
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
203
|
+
readonly description: "Echoed, so an acknowledgement arriving out of order is attributable to its write.";
|
|
204
|
+
};
|
|
205
|
+
readonly stored: {
|
|
206
|
+
readonly type: "boolean";
|
|
207
|
+
readonly description: "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write.";
|
|
208
|
+
};
|
|
209
|
+
readonly remainingCount: {
|
|
210
|
+
readonly type: "integer";
|
|
211
|
+
readonly minimum: 0;
|
|
212
|
+
readonly maximum: 4095;
|
|
213
|
+
readonly description: "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent.";
|
|
214
|
+
};
|
|
215
|
+
readonly expiresAt: {
|
|
216
|
+
readonly $ref: "#/$defs/ExpiresAt";
|
|
217
|
+
readonly description: "The slot's current expiry, after any extension this write earned.";
|
|
218
|
+
};
|
|
219
|
+
readonly ext: {
|
|
220
|
+
readonly $ref: "#/$defs/Ext";
|
|
221
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
222
|
+
};
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
readonly Ext: {
|
|
226
|
+
readonly title: "Ext";
|
|
227
|
+
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.";
|
|
228
|
+
readonly type: "object";
|
|
229
|
+
readonly minProperties: 1;
|
|
230
|
+
readonly additionalProperties: true;
|
|
231
|
+
readonly propertyNames: {
|
|
232
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
readonly ExpiresAt: {
|
|
236
|
+
readonly title: "ExpiresAt";
|
|
237
|
+
readonly description: "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.";
|
|
238
|
+
readonly type: "string";
|
|
239
|
+
readonly format: "date-time";
|
|
240
|
+
};
|
|
241
|
+
readonly ChunkIndex: {
|
|
242
|
+
readonly title: "ChunkIndex";
|
|
243
|
+
readonly description: "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.";
|
|
244
|
+
readonly type: "integer";
|
|
245
|
+
readonly minimum: 0;
|
|
246
|
+
readonly maximum: 4095;
|
|
247
|
+
};
|
|
248
|
+
readonly BundleId: {
|
|
249
|
+
readonly title: "BundleId";
|
|
250
|
+
readonly description: "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
251
|
+
readonly type: "string";
|
|
252
|
+
readonly pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
|
|
253
|
+
};
|
|
254
|
+
readonly ChunkData: {
|
|
255
|
+
readonly title: "ChunkData";
|
|
256
|
+
readonly description: "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.";
|
|
257
|
+
readonly type: "string";
|
|
258
|
+
readonly minLength: 2;
|
|
259
|
+
readonly maxLength: 349526;
|
|
260
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
261
|
+
};
|
|
262
|
+
readonly DigestMultibase: {
|
|
263
|
+
readonly title: "DigestMultibase";
|
|
264
|
+
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`.";
|
|
265
|
+
readonly type: "string";
|
|
266
|
+
readonly minLength: 16;
|
|
267
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
268
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
269
|
+
};
|
|
270
|
+
};
|
|
271
|
+
};
|
|
272
|
+
/**
|
|
273
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
274
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
275
|
+
* per-specification and cannot be derived from the document alone, and
|
|
276
|
+
* item 2 needs the schema this carries.
|
|
277
|
+
*/
|
|
278
|
+
export declare const SPEC: {
|
|
279
|
+
readonly typeUri: "https://trusttasks.org/spec/backup/put-chunk/0.1";
|
|
280
|
+
readonly isBearer: false;
|
|
281
|
+
readonly isProofRequired: true;
|
|
282
|
+
readonly isRecipientRequired: true;
|
|
283
|
+
readonly isIssuedAtRequired: true;
|
|
284
|
+
readonly payloadSchema: {
|
|
285
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
286
|
+
readonly $id: "https://trusttasks.org/spec/backup/put-chunk/0.1";
|
|
287
|
+
readonly title: "Backup — Put Chunk — payload";
|
|
288
|
+
readonly description: "Writes one chunk of a `chunkedTrustTask` import bundle, by index, into a slot opened by initiate-import. Idempotent for identical bytes; bytes that do not match the pre-committed manifest are refused. The outer document members (id, type, issuer, recipient, issuedAt, expiresAt, proof) are owned by the framework — SPEC §6.3.";
|
|
289
|
+
readonly type: "object";
|
|
290
|
+
readonly additionalProperties: false;
|
|
291
|
+
readonly required: readonly ["bundleId", "index", "digestMultibase", "data"];
|
|
292
|
+
readonly properties: {
|
|
293
|
+
readonly bundleId: {
|
|
294
|
+
readonly $ref: "#/$defs/BundleId";
|
|
295
|
+
readonly description: "Handle from the initiate-import descriptor. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
296
|
+
};
|
|
297
|
+
readonly index: {
|
|
298
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
299
|
+
readonly description: "Which chunk. Zero-based, below the manifest's chunkCount.";
|
|
300
|
+
};
|
|
301
|
+
readonly digestMultibase: {
|
|
302
|
+
readonly $ref: "#/$defs/DigestMultibase";
|
|
303
|
+
readonly description: "Digest of this chunk's raw bytes, restating the manifest entry for `index`. Restated so that a chunk sent to the wrong index is refused as a mismatch against the manifest at the index it names, rather than surviving until reassembly — the recipient checks this member against the manifest and `data` against both.";
|
|
304
|
+
};
|
|
305
|
+
readonly data: {
|
|
306
|
+
readonly $ref: "#/$defs/ChunkData";
|
|
307
|
+
};
|
|
308
|
+
readonly ext: {
|
|
309
|
+
readonly $ref: "#/$defs/Ext";
|
|
310
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
readonly $defs: {
|
|
314
|
+
readonly Response: {
|
|
315
|
+
readonly $anchor: "response";
|
|
316
|
+
readonly title: "Backup — Put Chunk — response payload";
|
|
317
|
+
readonly type: "object";
|
|
318
|
+
readonly additionalProperties: false;
|
|
319
|
+
readonly required: readonly ["bundleId", "index", "stored", "remainingCount", "expiresAt"];
|
|
320
|
+
readonly properties: {
|
|
321
|
+
readonly bundleId: {
|
|
322
|
+
readonly $ref: "#/$defs/BundleId";
|
|
323
|
+
readonly description: "Echoed so the response stands alone as the acknowledgement of one write.";
|
|
324
|
+
};
|
|
325
|
+
readonly index: {
|
|
326
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
327
|
+
readonly description: "Echoed, so an acknowledgement arriving out of order is attributable to its write.";
|
|
328
|
+
};
|
|
329
|
+
readonly stored: {
|
|
330
|
+
readonly type: "boolean";
|
|
331
|
+
readonly description: "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write.";
|
|
332
|
+
};
|
|
333
|
+
readonly remainingCount: {
|
|
334
|
+
readonly type: "integer";
|
|
335
|
+
readonly minimum: 0;
|
|
336
|
+
readonly maximum: 4095;
|
|
337
|
+
readonly description: "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent.";
|
|
338
|
+
};
|
|
339
|
+
readonly expiresAt: {
|
|
340
|
+
readonly $ref: "#/$defs/ExpiresAt";
|
|
341
|
+
readonly description: "The slot's current expiry, after any extension this write earned.";
|
|
342
|
+
};
|
|
343
|
+
readonly ext: {
|
|
344
|
+
readonly $ref: "#/$defs/Ext";
|
|
345
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly Ext: {
|
|
350
|
+
readonly title: "Ext";
|
|
351
|
+
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.";
|
|
352
|
+
readonly type: "object";
|
|
353
|
+
readonly minProperties: 1;
|
|
354
|
+
readonly additionalProperties: true;
|
|
355
|
+
readonly propertyNames: {
|
|
356
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
357
|
+
};
|
|
358
|
+
};
|
|
359
|
+
readonly ExpiresAt: {
|
|
360
|
+
readonly title: "ExpiresAt";
|
|
361
|
+
readonly description: "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.";
|
|
362
|
+
readonly type: "string";
|
|
363
|
+
readonly format: "date-time";
|
|
364
|
+
};
|
|
365
|
+
readonly ChunkIndex: {
|
|
366
|
+
readonly title: "ChunkIndex";
|
|
367
|
+
readonly description: "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.";
|
|
368
|
+
readonly type: "integer";
|
|
369
|
+
readonly minimum: 0;
|
|
370
|
+
readonly maximum: 4095;
|
|
371
|
+
};
|
|
372
|
+
readonly BundleId: {
|
|
373
|
+
readonly title: "BundleId";
|
|
374
|
+
readonly description: "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
375
|
+
readonly type: "string";
|
|
376
|
+
readonly pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
|
|
377
|
+
};
|
|
378
|
+
readonly ChunkData: {
|
|
379
|
+
readonly title: "ChunkData";
|
|
380
|
+
readonly description: "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.";
|
|
381
|
+
readonly type: "string";
|
|
382
|
+
readonly minLength: 2;
|
|
383
|
+
readonly maxLength: 349526;
|
|
384
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
385
|
+
};
|
|
386
|
+
readonly DigestMultibase: {
|
|
387
|
+
readonly title: "DigestMultibase";
|
|
388
|
+
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`.";
|
|
389
|
+
readonly type: "string";
|
|
390
|
+
readonly minLength: 16;
|
|
391
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
392
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
/**
|
|
398
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
399
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
400
|
+
* parties (§7.3 item 5).
|
|
401
|
+
*/
|
|
402
|
+
export declare const RESPONSE_SPEC: {
|
|
403
|
+
readonly typeUri: "https://trusttasks.org/spec/backup/put-chunk/0.1#response";
|
|
404
|
+
readonly isBearer: false;
|
|
405
|
+
readonly isProofRequired: false;
|
|
406
|
+
readonly isRecipientRequired: true;
|
|
407
|
+
readonly isIssuedAtRequired: true;
|
|
408
|
+
readonly payloadSchema: {
|
|
409
|
+
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
410
|
+
readonly $ref: "#/$defs/Response";
|
|
411
|
+
readonly $defs: {
|
|
412
|
+
readonly Response: {
|
|
413
|
+
readonly $anchor: "response";
|
|
414
|
+
readonly title: "Backup — Put Chunk — response payload";
|
|
415
|
+
readonly type: "object";
|
|
416
|
+
readonly additionalProperties: false;
|
|
417
|
+
readonly required: readonly ["bundleId", "index", "stored", "remainingCount", "expiresAt"];
|
|
418
|
+
readonly properties: {
|
|
419
|
+
readonly bundleId: {
|
|
420
|
+
readonly $ref: "#/$defs/BundleId";
|
|
421
|
+
readonly description: "Echoed so the response stands alone as the acknowledgement of one write.";
|
|
422
|
+
};
|
|
423
|
+
readonly index: {
|
|
424
|
+
readonly $ref: "#/$defs/ChunkIndex";
|
|
425
|
+
readonly description: "Echoed, so an acknowledgement arriving out of order is attributable to its write.";
|
|
426
|
+
};
|
|
427
|
+
readonly stored: {
|
|
428
|
+
readonly type: "boolean";
|
|
429
|
+
readonly description: "Whether this request is what stored the chunk. False means the recipient already held identical bytes at this index — a success, not a failure, and the reason a write can be retried safely. Required rather than optional: an absent member on an idempotent repeat would be indistinguishable from a first write.";
|
|
430
|
+
};
|
|
431
|
+
readonly remainingCount: {
|
|
432
|
+
readonly type: "integer";
|
|
433
|
+
readonly minimum: 0;
|
|
434
|
+
readonly maximum: 4095;
|
|
435
|
+
readonly description: "How many indices the slot still lacks after this write. Zero means the upload is complete and finalize-import can be sent.";
|
|
436
|
+
};
|
|
437
|
+
readonly expiresAt: {
|
|
438
|
+
readonly $ref: "#/$defs/ExpiresAt";
|
|
439
|
+
readonly description: "The slot's current expiry, after any extension this write earned.";
|
|
440
|
+
};
|
|
441
|
+
readonly ext: {
|
|
442
|
+
readonly $ref: "#/$defs/Ext";
|
|
443
|
+
readonly description: "Ecosystem-defined extension members per SPEC.md §4.5.1.";
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
};
|
|
447
|
+
readonly Ext: {
|
|
448
|
+
readonly title: "Ext";
|
|
449
|
+
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.";
|
|
450
|
+
readonly type: "object";
|
|
451
|
+
readonly minProperties: 1;
|
|
452
|
+
readonly additionalProperties: true;
|
|
453
|
+
readonly propertyNames: {
|
|
454
|
+
readonly pattern: "^[a-z][a-z0-9-]*(\\.[a-z0-9-]+)+$";
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
readonly ExpiresAt: {
|
|
458
|
+
readonly title: "ExpiresAt";
|
|
459
|
+
readonly description: "After which the bundle is collected: staged bytes discarded, tokens and chunk requests refused. Short by design. For a chunked transfer a recipient may move it later as chunks are exchanged, never past its own ceiling — each chunk response reports the current value.";
|
|
460
|
+
readonly type: "string";
|
|
461
|
+
readonly format: "date-time";
|
|
462
|
+
};
|
|
463
|
+
readonly ChunkIndex: {
|
|
464
|
+
readonly title: "ChunkIndex";
|
|
465
|
+
readonly description: "Zero-based position of a chunk within its bundle. Valid values are 0 to chunkCount − 1; an index outside that range is refused with chunkOutOfRange rather than validated here, because the bound depends on the bundle.";
|
|
466
|
+
readonly type: "integer";
|
|
467
|
+
readonly minimum: 0;
|
|
468
|
+
readonly maximum: 4095;
|
|
469
|
+
};
|
|
470
|
+
readonly BundleId: {
|
|
471
|
+
readonly title: "BundleId";
|
|
472
|
+
readonly description: "Handle for a bundle across its whole lifecycle. Recipient-generated and unguessable, which is what lets an unauthorized reference be answered as not-found without confirming existence. Opaque: a producer quotes what it was given and must not derive, guess or enumerate one.";
|
|
473
|
+
readonly type: "string";
|
|
474
|
+
readonly pattern: "^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$";
|
|
475
|
+
};
|
|
476
|
+
readonly ChunkData: {
|
|
477
|
+
readonly title: "ChunkData";
|
|
478
|
+
readonly description: "The chunk's bytes, base64url-encoded without padding (RFC 4648 §5). Bounded at 349526 characters, the unpadded encoding of a 262144-byte chunk. These are bytes of the encrypted bundle, so a chunk read in isolation reveals nothing of the agent's state — but a complete set of chunks is the export, and is to be handled as such.";
|
|
479
|
+
readonly type: "string";
|
|
480
|
+
readonly minLength: 2;
|
|
481
|
+
readonly maxLength: 349526;
|
|
482
|
+
readonly pattern: "^[A-Za-z0-9_-]+$";
|
|
483
|
+
};
|
|
484
|
+
readonly DigestMultibase: {
|
|
485
|
+
readonly title: "DigestMultibase";
|
|
486
|
+
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`.";
|
|
487
|
+
readonly type: "string";
|
|
488
|
+
readonly minLength: 16;
|
|
489
|
+
readonly pattern: "^(z[1-9A-HJ-NP-Za-km-z]+|u[A-Za-z0-9_-]+)$";
|
|
490
|
+
readonly examples: readonly ["zQmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR"];
|
|
491
|
+
};
|
|
492
|
+
};
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
//# sourceMappingURL=payload.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"payload.d.ts","sourceRoot":"","sources":["../../../../src/backup/put-chunk/0.1/payload.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,gCAAgC,CAAC;AAGvH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB;;OAEG;IACH,eAAe,EAAE,eAAe,CAAC;IACjC,IAAI,EAAE,SAAS,CAAC;IAChB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AACD,MAAM,WAAW,6BAA6B;IAC5C;;OAEG;IACH,QAAQ,EAAE,QAAQ,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,UAAU,CAAC;IAClB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,SAAS,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;CACX;AAED,kHAAkH;AAClH,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAE,CAAC;AAEjF,2BAA2B;AAC3B,eAAO,MAAM,QAAQ,EAAG,kDAA2D,CAAC;AAEpF,mEAAmE;AACnE,MAAM,MAAM,OAAO,GAAG,qBAAqB,CAAC;AAE5C,qEAAqE;AACrE,eAAO,MAAM,iBAAiB,EAAG,2DAAoE,CAAC;AAEtG,4EAA4E;AAC5E,MAAM,MAAM,QAAQ,GAAG,6BAA6B,CAAC;AAErD;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4HjB,CAAC;AAEX,mEAAmE;AACnE,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6F1B,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOP,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhB,CAAC"}
|