@openvtc/trust-tasks 0.6.1 → 0.6.3
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/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/vrc/relationships/issue/0.1/payload.d.ts +69 -0
- package/dist/vrc/relationships/issue/0.1/payload.d.ts.map +1 -0
- package/dist/vrc/relationships/issue/0.1/payload.js +31 -0
- package/dist/vrc/relationships/issue/0.1/payload.js.map +1 -0
- package/dist/vrc/relationships/propose/0.1/payload.d.ts +77 -0
- package/dist/vrc/relationships/propose/0.1/payload.d.ts.map +1 -0
- package/dist/vrc/relationships/propose/0.1/payload.js +31 -0
- package/dist/vrc/relationships/propose/0.1/payload.js.map +1 -0
- package/dist/vtc/relationships/list/0.2/payload.d.ts +70 -0
- package/dist/vtc/relationships/list/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/list/0.2/payload.js +31 -0
- package/dist/vtc/relationships/list/0.2/payload.js.map +1 -0
- package/dist/vtc/relationships/publish/0.2/payload.d.ts +62 -0
- package/dist/vtc/relationships/publish/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/publish/0.2/payload.js +31 -0
- package/dist/vtc/relationships/publish/0.2/payload.js.map +1 -0
- package/dist/vtc/relationships/request/0.2/payload.d.ts +66 -0
- package/dist/vtc/relationships/request/0.2/payload.d.ts.map +1 -0
- package/dist/vtc/relationships/request/0.2/payload.js +31 -0
- package/dist/vtc/relationships/request/0.2/payload.js.map +1 -0
- package/dist/witness/session/0.1/payload.d.ts +68 -0
- package/dist/witness/session/0.1/payload.d.ts.map +1 -0
- package/dist/witness/session/0.1/payload.js +31 -0
- package/dist/witness/session/0.1/payload.js.map +1 -0
- package/dist/witness/session/submit/0.1/payload.d.ts +66 -0
- package/dist/witness/session/submit/0.1/payload.d.ts.map +1 -0
- package/dist/witness/session/submit/0.1/payload.js +31 -0
- package/dist/witness/session/submit/0.1/payload.js.map +1 -0
- package/package.json +1 -1
- package/src/index.ts +7 -0
- package/src/vrc/relationships/issue/0.1/payload.ts +76 -0
- package/src/vrc/relationships/propose/0.1/payload.ts +83 -0
- package/src/vtc/relationships/list/0.2/payload.ts +77 -0
- package/src/vtc/relationships/publish/0.2/payload.ts +69 -0
- package/src/vtc/relationships/request/0.2/payload.ts +73 -0
- package/src/witness/session/0.1/payload.ts +74 -0
- package/src/witness/session/submit/0.1/payload.ts +73 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/relationships/publish/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Digest over the RFC 8785 canonicalization of the stored VRC, for out-of-band integrity checks. The same value vtc/relationships/request reports on issuance and vtc/relationships/list reports per entry, so a member can tie the three together without re-hashing.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
11
|
+
export interface VTCRelationshipsPublishPayload {
|
|
12
|
+
/**
|
|
13
|
+
* A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST equal the document proof signer; credentialSubject.id names the subject member; it carries its own DataIntegrityProof.
|
|
14
|
+
*/
|
|
15
|
+
vrc: {};
|
|
16
|
+
ext?: Ext;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 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.
|
|
20
|
+
*/
|
|
21
|
+
export interface Ext {
|
|
22
|
+
[k: string]: unknown | undefined;
|
|
23
|
+
}
|
|
24
|
+
export interface VTCRelationshipsPublishResponsePayload {
|
|
25
|
+
/**
|
|
26
|
+
* Id assigned to the stored relationship (a UUID).
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
issuerDid: string;
|
|
30
|
+
subjectDid: string;
|
|
31
|
+
vrcDigestMultibase: DigestMultibase;
|
|
32
|
+
ext?: Ext;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Trust Task type URI. */
|
|
36
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/publish/0.2" as const;
|
|
37
|
+
|
|
38
|
+
/** Stable alias for this specification's request payload shape. */
|
|
39
|
+
export type Payload = DigestMultibase;
|
|
40
|
+
|
|
41
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
42
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/publish/0.2#response" as const;
|
|
43
|
+
|
|
44
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
45
|
+
export type Response = VTCRelationshipsPublishResponsePayload;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
49
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
50
|
+
* per-specification and cannot be derived from the document alone.
|
|
51
|
+
*/
|
|
52
|
+
export const SPEC = {
|
|
53
|
+
typeUri: TYPE_URI,
|
|
54
|
+
isBearer: false,
|
|
55
|
+
isProofRequired: true,
|
|
56
|
+
isRecipientRequired: true,
|
|
57
|
+
} as const;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
61
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
62
|
+
* parties (§7.3 item 5).
|
|
63
|
+
*/
|
|
64
|
+
export const RESPONSE_SPEC = {
|
|
65
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
66
|
+
isBearer: false,
|
|
67
|
+
isProofRequired: true,
|
|
68
|
+
isRecipientRequired: true,
|
|
69
|
+
} as const;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/vtc/relationships/request/0.2/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Digest over the RFC 8785 canonicalization of the returned VRC, for out-of-band integrity checks. Matches the digest `vtc/relationships/publish` reports once the credential is lodged, so the two can be tied together without re-hashing — which requires both ends to canonicalize the same way, and is why the canonicalization is named here rather than assumed.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A member asks another member to issue them a Verifiable Relationship Credential. Everything here is a hint: the issuing member decides, and declines with a trust-task-error carrying `vtc/relationships/request:declined` rather than a bespoke rejection message.
|
|
13
|
+
*/
|
|
14
|
+
export interface VTCRelationshipsRequestPayload {
|
|
15
|
+
/**
|
|
16
|
+
* Why the requester is asking, in their own words, for the issuing member to weigh. A hint and not a term — the issuing member is under no obligation to honour it, and MUST NOT treat its absence as a defect. Free text reaching a human, so a producer SHOULD keep it to what it is willing to have quoted back.
|
|
17
|
+
*/
|
|
18
|
+
reason?: string;
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
export interface Ext {
|
|
25
|
+
[k: string]: unknown | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The issued credential. Returned only where the issuing member agreed; a decline is a trust-task-error, not a response with an empty field.
|
|
29
|
+
*/
|
|
30
|
+
export interface VTCRelationshipsRequestResponsePayload {
|
|
31
|
+
/**
|
|
32
|
+
* A signed W3C Verifiable Relationship Credential (opaque here). Its issuer MUST be the issuing member — the party that signed this response — and its credentialSubject.id MUST name the requester. The same shape `vtc/relationships/publish` accepts, so a requester can lodge it with the community unchanged.
|
|
33
|
+
*/
|
|
34
|
+
vrc: {};
|
|
35
|
+
vrcDigestMultibase?: DigestMultibase;
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Trust Task type URI. */
|
|
40
|
+
export const TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/request/0.2" as const;
|
|
41
|
+
|
|
42
|
+
/** Stable alias for this specification's request payload shape. */
|
|
43
|
+
export type Payload = DigestMultibase;
|
|
44
|
+
|
|
45
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
46
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/vtc/relationships/request/0.2#response" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
49
|
+
export type Response = VTCRelationshipsRequestResponsePayload;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
53
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
54
|
+
* per-specification and cannot be derived from the document alone.
|
|
55
|
+
*/
|
|
56
|
+
export const SPEC = {
|
|
57
|
+
typeUri: TYPE_URI,
|
|
58
|
+
isBearer: false,
|
|
59
|
+
isProofRequired: true,
|
|
60
|
+
isRecipientRequired: true,
|
|
61
|
+
} as const;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
65
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
66
|
+
* parties (§7.3 item 5).
|
|
67
|
+
*/
|
|
68
|
+
export const RESPONSE_SPEC = {
|
|
69
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
70
|
+
isBearer: false,
|
|
71
|
+
isProofRequired: true,
|
|
72
|
+
isRecipientRequired: true,
|
|
73
|
+
} as const;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/witness/session/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Opens one participating party's witness session as its own exchange, nested in a relationship exchange via parentThreadId. A session is bilateral — a witnessed exchange between two parties runs two sessions with the same witness, each naming the same parties pair. The response issues the session challenge; the request document's id is the value that party's VWC later carries as taskContext.
|
|
8
|
+
*/
|
|
9
|
+
export interface WitnessSessionPayload {
|
|
10
|
+
/**
|
|
11
|
+
* The relationship DIDs of the exchange to be witnessed — the pairwise values the relationship proposal exchanged, in either order.
|
|
12
|
+
*
|
|
13
|
+
* @minItems 2
|
|
14
|
+
* @maxItems 2
|
|
15
|
+
*/
|
|
16
|
+
parties: [string, string];
|
|
17
|
+
ext?: Ext;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* 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.
|
|
21
|
+
*/
|
|
22
|
+
export interface Ext {
|
|
23
|
+
[k: string]: unknown | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* The session challenge, issued under the REQUIRED proof. The presentation under witness/session/submit binds to {challenge, domain}. It reaches only the party that opened this session — which is why each party opens its own.
|
|
27
|
+
*/
|
|
28
|
+
export interface WitnessSessionResponsePayload {
|
|
29
|
+
/**
|
|
30
|
+
* A fresh, unpredictable, single-use value this session's presentation binds to. A witness MUST NOT reuse a challenge across sessions — including across the two sessions of one witnessed exchange, where a shared value would let either party's presentation satisfy the other's session.
|
|
31
|
+
*/
|
|
32
|
+
challenge: string;
|
|
33
|
+
/**
|
|
34
|
+
* The domain the presentations bind alongside the challenge, identifying this witness's verification context.
|
|
35
|
+
*/
|
|
36
|
+
domain: string;
|
|
37
|
+
ext?: Ext;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/** Trust Task type URI. */
|
|
41
|
+
export const TYPE_URI = "https://trusttasks.org/spec/witness/session/0.1" as const;
|
|
42
|
+
|
|
43
|
+
/** Stable alias for this specification's request payload shape. */
|
|
44
|
+
export type Payload = WitnessSessionPayload;
|
|
45
|
+
|
|
46
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
47
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/witness/session/0.1#response" as const;
|
|
48
|
+
|
|
49
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
50
|
+
export type Response = WitnessSessionResponsePayload;
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
54
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
55
|
+
* per-specification and cannot be derived from the document alone.
|
|
56
|
+
*/
|
|
57
|
+
export const SPEC = {
|
|
58
|
+
typeUri: TYPE_URI,
|
|
59
|
+
isBearer: false,
|
|
60
|
+
isProofRequired: false,
|
|
61
|
+
isRecipientRequired: true,
|
|
62
|
+
} as const;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
66
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
67
|
+
* parties (§7.3 item 5).
|
|
68
|
+
*/
|
|
69
|
+
export const RESPONSE_SPEC = {
|
|
70
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
71
|
+
isBearer: false,
|
|
72
|
+
isProofRequired: true,
|
|
73
|
+
isRecipientRequired: true,
|
|
74
|
+
} as const;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated by scripts/build-ts-bindings.mjs — DO NOT EDIT BY HAND.
|
|
3
|
+
* Source: specs/witness/session/submit/0.1/payload.schema.json
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Digest over the RFC 8785 canonicalization of the delivered credential, computed by the witness. It binds this evidence to one specific credential rather than to the session alone, so a verifier pairing a presented VWC with this response can check it is the credential this session issued and not another the same witness signed.
|
|
8
|
+
*/
|
|
9
|
+
export type DigestMultibase = string;
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* A participating party submits its presentation bound to its session challenge; the witness's mandatory response delivers the Verifiable Witness Credential and its digest. The response is the outcome evidence a VWC presentation must ship.
|
|
13
|
+
*/
|
|
14
|
+
export interface WitnessSessionSubmitPayload {
|
|
15
|
+
/**
|
|
16
|
+
* A W3C Verifiable Presentation of the submitting party's own relationship credential material (opaque here), bound to the session's challenge and domain. A presentation not bound to this session is rejected with witness/session/submit:challengeMismatch.
|
|
17
|
+
*/
|
|
18
|
+
vp: {};
|
|
19
|
+
ext?: Ext;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* 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.
|
|
23
|
+
*/
|
|
24
|
+
export interface Ext {
|
|
25
|
+
[k: string]: unknown | undefined;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* The Verifiable Witness Credential and its digest, delivered under the REQUIRED proof. This document is the session's terminal success form and the outcome evidence a VWC presentation must ship.
|
|
29
|
+
*/
|
|
30
|
+
export interface WitnessSessionSubmitResponsePayload {
|
|
31
|
+
/**
|
|
32
|
+
* A signed Verifiable Witness Credential (opaque here; its schema belongs to DTG Core Credentials). Its taskContext MUST equal the id of the witness/session document that opened this session — the innermost exchange that attests the witnessing (SPEC.md §4.9.1).
|
|
33
|
+
*/
|
|
34
|
+
vwc: {};
|
|
35
|
+
vwcDigestMultibase: DigestMultibase;
|
|
36
|
+
ext?: Ext;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** Trust Task type URI. */
|
|
40
|
+
export const TYPE_URI = "https://trusttasks.org/spec/witness/session/submit/0.1" as const;
|
|
41
|
+
|
|
42
|
+
/** Stable alias for this specification's request payload shape. */
|
|
43
|
+
export type Payload = DigestMultibase;
|
|
44
|
+
|
|
45
|
+
/** Trust Task response type URI (request type URI + "#response"). */
|
|
46
|
+
export const RESPONSE_TYPE_URI = "https://trusttasks.org/spec/witness/session/submit/0.1#response" as const;
|
|
47
|
+
|
|
48
|
+
/** Stable alias for this specification's success-response payload shape. */
|
|
49
|
+
export type Response = WitnessSessionSubmitResponsePayload;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* SPEC.md §7.2 policy for the request variant, from this specification's
|
|
53
|
+
* front matter. Pass to `consumeInbound` — items 5b, 7 and 8 are
|
|
54
|
+
* per-specification and cannot be derived from the document alone.
|
|
55
|
+
*/
|
|
56
|
+
export const SPEC = {
|
|
57
|
+
typeUri: TYPE_URI,
|
|
58
|
+
isBearer: false,
|
|
59
|
+
isProofRequired: true,
|
|
60
|
+
isRecipientRequired: true,
|
|
61
|
+
} as const;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* SPEC.md §7.2 policy for the success-response variant. `isRecipientRequired`
|
|
65
|
+
* tracks the *issuer* party's requirement because a response swaps the
|
|
66
|
+
* parties (§7.3 item 5).
|
|
67
|
+
*/
|
|
68
|
+
export const RESPONSE_SPEC = {
|
|
69
|
+
typeUri: RESPONSE_TYPE_URI,
|
|
70
|
+
isBearer: false,
|
|
71
|
+
isProofRequired: true,
|
|
72
|
+
isRecipientRequired: true,
|
|
73
|
+
} as const;
|