@bsv/dpp-core 0.3.0-beta.1
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/LICENSE +58 -0
- package/README.md +95 -0
- package/dist/acceptance.d.ts +100 -0
- package/dist/acceptance.d.ts.map +1 -0
- package/dist/acceptance.js +202 -0
- package/dist/acceptance.js.map +1 -0
- package/dist/anchor.d.ts +66 -0
- package/dist/anchor.d.ts.map +1 -0
- package/dist/anchor.js +145 -0
- package/dist/anchor.js.map +1 -0
- package/dist/attestation.d.ts +40 -0
- package/dist/attestation.d.ts.map +1 -0
- package/dist/attestation.js +111 -0
- package/dist/attestation.js.map +1 -0
- package/dist/blob.d.ts +11 -0
- package/dist/blob.d.ts.map +1 -0
- package/dist/blob.js +16 -0
- package/dist/blob.js.map +1 -0
- package/dist/canonical.d.ts +32 -0
- package/dist/canonical.d.ts.map +1 -0
- package/dist/canonical.js +54 -0
- package/dist/canonical.js.map +1 -0
- package/dist/canonicalJson.d.ts +22 -0
- package/dist/canonicalJson.d.ts.map +1 -0
- package/dist/canonicalJson.js +60 -0
- package/dist/canonicalJson.js.map +1 -0
- package/dist/codec.d.ts +45 -0
- package/dist/codec.d.ts.map +1 -0
- package/dist/codec.js +459 -0
- package/dist/codec.js.map +1 -0
- package/dist/constants.d.ts +150 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +179 -0
- package/dist/constants.js.map +1 -0
- package/dist/did.d.ts +37 -0
- package/dist/did.d.ts.map +1 -0
- package/dist/did.js +129 -0
- package/dist/did.js.map +1 -0
- package/dist/evidence.d.ts +224 -0
- package/dist/evidence.d.ts.map +1 -0
- package/dist/evidence.js +716 -0
- package/dist/evidence.js.map +1 -0
- package/dist/evidencePackage.d.ts +114 -0
- package/dist/evidencePackage.d.ts.map +1 -0
- package/dist/evidencePackage.js +164 -0
- package/dist/evidencePackage.js.map +1 -0
- package/dist/index.d.ts +31 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/owner.d.ts +135 -0
- package/dist/owner.d.ts.map +1 -0
- package/dist/owner.js +181 -0
- package/dist/owner.js.map +1 -0
- package/dist/publisherPolicy.d.ts +70 -0
- package/dist/publisherPolicy.d.ts.map +1 -0
- package/dist/publisherPolicy.js +186 -0
- package/dist/publisherPolicy.js.map +1 -0
- package/dist/signatures.d.ts +84 -0
- package/dist/signatures.d.ts.map +1 -0
- package/dist/signatures.js +137 -0
- package/dist/signatures.js.map +1 -0
- package/dist/transition.d.ts +29 -0
- package/dist/transition.d.ts.map +1 -0
- package/dist/transition.js +117 -0
- package/dist/transition.js.map +1 -0
- package/dist/types.d.ts +135 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/verifyChain.d.ts +152 -0
- package/dist/verifyChain.d.ts.map +1 -0
- package/dist/verifyChain.js +314 -0
- package/dist/verifyChain.js.map +1 -0
- package/package.json +46 -0
- package/schemas/capabilities.schema.json +129 -0
- package/schemas/epcis-import.schema.json +212 -0
- package/schemas/evidence-export.schema.json +67 -0
- package/schemas/evidence-package.schema.json +307 -0
- package/schemas/native-evidence-extension.schema.json +66 -0
- package/schemas/paginated-history.schema.json +32 -0
- package/schemas/passport-projection.schema.json +151 -0
- package/schemas/passport-source.schema.json +370 -0
- package/schemas/profile-evidence.schema.json +706 -0
- package/schemas/publisher-policy.schema.json +173 -0
- package/schemas/verification-report.schema.json +397 -0
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://bsv-blockchain.github.io/dpp/contracts/paginated-history.schema.json",
|
|
4
|
+
"title": "DPP paginated history page, version 1",
|
|
5
|
+
"description": "One page of an export over a stable snapshot (spec/portable-evidence.md section 1). An extension a service serves beside the standard bounded lookups, never in place of them; completeness is relative to the snapshot's scope.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["pageVersion", "items", "nextCursor", "snapshotId", "scope", "truncated", "completeForSnapshot"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"pageVersion": { "const": "1" },
|
|
11
|
+
"items": { "type": "array", "maxItems": 500 },
|
|
12
|
+
"nextCursor": { "type": ["string", "null"], "description": "Opaque, bound to the query and the snapshot; null when exhausted." },
|
|
13
|
+
"snapshotId": { "type": "string", "minLength": 1 },
|
|
14
|
+
"scope": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"required": ["source", "query"],
|
|
18
|
+
"properties": {
|
|
19
|
+
"source": { "type": "string", "description": "The service or topic answered from." },
|
|
20
|
+
"query": { "type": "object" },
|
|
21
|
+
"sequenceRange": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"additionalProperties": false,
|
|
24
|
+
"properties": { "from": { "type": "integer", "minimum": 0 }, "to": { "type": "integer", "minimum": 0 } }
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
"truncated": { "type": "boolean" },
|
|
29
|
+
"completeForSnapshot": { "type": "boolean" },
|
|
30
|
+
"pageSize": { "type": "integer", "minimum": 1, "maximum": 500 }
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://bsv-blockchain.github.io/dpp/contracts/passport-projection.schema.json",
|
|
4
|
+
"title": "DPP passport projection, version 1",
|
|
5
|
+
"description": "passport-projection@1 (spec/passport-projections.md section 4): the deterministic derivation of one passport's fields from pinned source revisions, accepted relationships and a named policy, at a stated cutoff and for a stated audience. A data projection envelope with its own identity and digest; not a token format, not a credential, and never carrying a proof copied from a source. The same pinned inputs produce the same projectionDigest whatever the arrival order.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": false,
|
|
8
|
+
"required": ["projectionId", "projectionVersion", "projectionDigest", "passportId", "subjectId", "granularity", "profileRef", "sourceRefs", "relationshipRefs", "policyRef", "asOf", "disclosureScope", "values", "fieldResults", "evidenceRefs", "validationRefs"],
|
|
9
|
+
"properties": {
|
|
10
|
+
"projectionId": { "type": "string", "pattern": "^urn:bsv:dpp:projection:sha256:[0-9a-f]{64}$", "description": "Derived from projectionDigest; never a secured-source digest." },
|
|
11
|
+
"projectionVersion": { "const": "1" },
|
|
12
|
+
"projectionDigest": { "$ref": "#/$defs/hex64", "description": "SHA-256 of the RFC 8785 canonical JSON of the commitment body: every property of this document except projectionId, projectionDigest, diagnostics and template." },
|
|
13
|
+
"passportId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
14
|
+
"subjectId": { "type": "string", "minLength": 1, "maxLength": 512 },
|
|
15
|
+
"granularity": { "enum": ["model", "batch", "item"] },
|
|
16
|
+
"profileRef": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"required": ["id", "version"],
|
|
20
|
+
"properties": { "id": { "type": "string", "pattern": "^[a-z][a-z0-9-]*$" }, "version": { "type": "integer", "minimum": 1 } }
|
|
21
|
+
},
|
|
22
|
+
"sourceRefs": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"description": "Every source revision the projection read, sorted by record then revision identifier.",
|
|
25
|
+
"items": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"additionalProperties": false,
|
|
28
|
+
"required": ["recordId", "revisionId", "digest"],
|
|
29
|
+
"properties": {
|
|
30
|
+
"recordId": { "type": "string", "minLength": 1 },
|
|
31
|
+
"revisionId": { "type": "string", "minLength": 1 },
|
|
32
|
+
"digest": { "$ref": "#/$defs/hex64" },
|
|
33
|
+
"subjectId": { "type": "string", "minLength": 1 },
|
|
34
|
+
"granularity": { "enum": ["model", "batch", "item", "component"] },
|
|
35
|
+
"pointer": { "type": "string" }
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"relationshipRefs": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"description": "Every accepted relationship the projection followed, sorted by identifier.",
|
|
42
|
+
"items": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"required": ["relationshipId", "kind", "sourceId", "targetId"],
|
|
46
|
+
"properties": {
|
|
47
|
+
"relationshipId": { "type": "string", "minLength": 1 },
|
|
48
|
+
"kind": { "enum": ["instance-of-model", "member-of-batch", "component-of", "successor-of"] },
|
|
49
|
+
"sourceId": { "type": "string", "minLength": 1 },
|
|
50
|
+
"targetId": { "type": "string", "minLength": 1 },
|
|
51
|
+
"policyRef": { "type": "string" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"policyRef": { "type": "string", "minLength": 1 },
|
|
56
|
+
"asOf": { "type": ["string", "null"], "description": "The historical cutoff sources and measurements were selected at, or null when none was selected." },
|
|
57
|
+
"disclosureScope": { "enum": ["public", "owner", "legitimate", "authority"] },
|
|
58
|
+
"values": {
|
|
59
|
+
"type": "object",
|
|
60
|
+
"description": "The derived value of each field that has one, keyed by field key.",
|
|
61
|
+
"additionalProperties": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"additionalProperties": false,
|
|
64
|
+
"required": ["value", "source", "granularity"],
|
|
65
|
+
"properties": {
|
|
66
|
+
"value": {},
|
|
67
|
+
"source": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"additionalProperties": false,
|
|
70
|
+
"required": ["recordId", "revisionId", "pointer"],
|
|
71
|
+
"properties": {
|
|
72
|
+
"recordId": { "type": "string", "minLength": 1 },
|
|
73
|
+
"revisionId": { "type": "string", "minLength": 1 },
|
|
74
|
+
"pointer": { "type": "string" }
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"granularity": { "enum": ["model", "batch", "item", "component"] },
|
|
78
|
+
"language": { "type": "string" },
|
|
79
|
+
"selection": { "enum": ["exact", "base", "default"] },
|
|
80
|
+
"conversion": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": ["fromUnit", "toUnit", "rule", "explicit"],
|
|
84
|
+
"properties": {
|
|
85
|
+
"fromUnit": { "type": "string" },
|
|
86
|
+
"toUnit": { "type": "string" },
|
|
87
|
+
"rule": { "type": "string" },
|
|
88
|
+
"explicit": { "const": true }
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"observedAt": { "type": "string" },
|
|
92
|
+
"method": { "type": "string" }
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"fieldResults": {
|
|
97
|
+
"type": "object",
|
|
98
|
+
"description": "One result per field the profile declares, keyed by field key: availability, applicability and any finding, on separate axes.",
|
|
99
|
+
"additionalProperties": {
|
|
100
|
+
"type": "object",
|
|
101
|
+
"additionalProperties": false,
|
|
102
|
+
"required": ["availability", "applicability"],
|
|
103
|
+
"properties": {
|
|
104
|
+
"availability": { "enum": ["present", "missing", "unknown", "withheld"] },
|
|
105
|
+
"applicability": { "enum": ["applies", "not-applicable", "unresolved"] },
|
|
106
|
+
"finding": { "enum": ["conflict", "unsupported", "limit", "cycle", "missing-source"] },
|
|
107
|
+
"conflicts": {
|
|
108
|
+
"type": "array",
|
|
109
|
+
"items": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"additionalProperties": false,
|
|
112
|
+
"required": ["recordId", "revisionId", "value"],
|
|
113
|
+
"properties": {
|
|
114
|
+
"recordId": { "type": "string" },
|
|
115
|
+
"revisionId": { "type": "string" },
|
|
116
|
+
"value": {}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
"reason": { "type": "string" },
|
|
121
|
+
"excluded": {
|
|
122
|
+
"type": "array",
|
|
123
|
+
"description": "Measurements or sources set aside with the reason, so the history stays inspectable.",
|
|
124
|
+
"items": {
|
|
125
|
+
"type": "object",
|
|
126
|
+
"additionalProperties": false,
|
|
127
|
+
"required": ["recordId", "revisionId", "reason"],
|
|
128
|
+
"properties": { "recordId": { "type": "string" }, "revisionId": { "type": "string" }, "reason": { "type": "string" } }
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
"evidenceRefs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
135
|
+
"validationRefs": { "type": "array", "items": { "type": "string", "minLength": 1 } },
|
|
136
|
+
"diagnostics": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"additionalProperties": false,
|
|
139
|
+
"description": "Outside the commitment: what the derivation ran into.",
|
|
140
|
+
"properties": {
|
|
141
|
+
"truncated": { "type": "boolean" },
|
|
142
|
+
"limits": { "type": "object", "additionalProperties": { "type": "integer" } },
|
|
143
|
+
"findings": { "type": "array", "items": { "type": "object", "additionalProperties": false, "required": ["code", "detail"], "properties": { "code": { "type": "string" }, "field": { "type": "string" }, "detail": { "type": "string" } } } }
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
"template": { "type": "string", "description": "Outside the commitment: the rendering preset a surface applied, if any." }
|
|
147
|
+
},
|
|
148
|
+
"$defs": {
|
|
149
|
+
"hex64": { "type": "string", "pattern": "^[0-9a-f]{64}$" }
|
|
150
|
+
}
|
|
151
|
+
}
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://bsv-blockchain.github.io/dpp/contracts/passport-source.schema.json",
|
|
4
|
+
"title": "DPP passport source revision and relationship, version 1",
|
|
5
|
+
"description": "The two records a passport's facts are derived from (spec/passport-projections.md sections 2 and 3): an immutable source revision of a model, batch, item or component record, and a typed relationship between subjects. Revisions are append-only; a current pointer moves by compare-and-swap and never rewrites a revision. A relationship is an accepted assertion under a named policy, kept apart from any source event's own edges.",
|
|
6
|
+
"oneOf": [
|
|
7
|
+
{
|
|
8
|
+
"$ref": "#/$defs/sourceRevision"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"$ref": "#/$defs/relationship"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"$defs": {
|
|
15
|
+
"hex64": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
18
|
+
},
|
|
19
|
+
"dateTime": {
|
|
20
|
+
"type": "string",
|
|
21
|
+
"pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2})$"
|
|
22
|
+
},
|
|
23
|
+
"dateOrDateTime": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^\\d{4}(-(0[1-9]|1[0-2])(-(0[1-9]|[12]\\d|3[01])(T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(Z|[+-]\\d{2}:\\d{2}))?)?)?$"
|
|
26
|
+
},
|
|
27
|
+
"subjectRef": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": [
|
|
31
|
+
"id",
|
|
32
|
+
"granularity"
|
|
33
|
+
],
|
|
34
|
+
"properties": {
|
|
35
|
+
"id": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"minLength": 1,
|
|
38
|
+
"maxLength": 512
|
|
39
|
+
},
|
|
40
|
+
"granularity": {
|
|
41
|
+
"enum": [
|
|
42
|
+
"model",
|
|
43
|
+
"batch",
|
|
44
|
+
"item",
|
|
45
|
+
"component"
|
|
46
|
+
]
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"revisionRef": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"required": [
|
|
54
|
+
"recordId",
|
|
55
|
+
"revisionId"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"recordId": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"minLength": 1
|
|
61
|
+
},
|
|
62
|
+
"revisionId": {
|
|
63
|
+
"type": "string",
|
|
64
|
+
"minLength": 1
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"interval": {
|
|
69
|
+
"type": "object",
|
|
70
|
+
"additionalProperties": false,
|
|
71
|
+
"properties": {
|
|
72
|
+
"from": {
|
|
73
|
+
"$ref": "#/$defs/dateOrDateTime"
|
|
74
|
+
},
|
|
75
|
+
"until": {
|
|
76
|
+
"$ref": "#/$defs/dateOrDateTime"
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"sourceRevision": {
|
|
81
|
+
"type": "object",
|
|
82
|
+
"additionalProperties": false,
|
|
83
|
+
"required": [
|
|
84
|
+
"recordId",
|
|
85
|
+
"revisionId",
|
|
86
|
+
"subject",
|
|
87
|
+
"profileRef",
|
|
88
|
+
"recordedAt",
|
|
89
|
+
"payloadDigest",
|
|
90
|
+
"authorisation",
|
|
91
|
+
"disclosure"
|
|
92
|
+
],
|
|
93
|
+
"properties": {
|
|
94
|
+
"recordId": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"minLength": 1,
|
|
97
|
+
"description": "The stable identifier of the record the revision belongs to."
|
|
98
|
+
},
|
|
99
|
+
"revisionId": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"minLength": 1,
|
|
102
|
+
"description": "Unique within the record; a revision is never edited or deleted, only superseded."
|
|
103
|
+
},
|
|
104
|
+
"subject": {
|
|
105
|
+
"$ref": "#/$defs/subjectRef"
|
|
106
|
+
},
|
|
107
|
+
"profileRef": {
|
|
108
|
+
"type": "object",
|
|
109
|
+
"additionalProperties": false,
|
|
110
|
+
"required": [
|
|
111
|
+
"id",
|
|
112
|
+
"version"
|
|
113
|
+
],
|
|
114
|
+
"properties": {
|
|
115
|
+
"id": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"pattern": "^[a-z][a-z0-9-]*$"
|
|
118
|
+
},
|
|
119
|
+
"version": {
|
|
120
|
+
"type": "integer",
|
|
121
|
+
"minimum": 1
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
},
|
|
125
|
+
"recordedAt": {
|
|
126
|
+
"$ref": "#/$defs/dateTime"
|
|
127
|
+
},
|
|
128
|
+
"effective": {
|
|
129
|
+
"$ref": "#/$defs/interval",
|
|
130
|
+
"description": "When the facts hold, where the source says so; distinct from when they were recorded."
|
|
131
|
+
},
|
|
132
|
+
"payloadDigest": {
|
|
133
|
+
"$ref": "#/$defs/hex64",
|
|
134
|
+
"description": "SHA-256 of the payload's exact bytes as retained."
|
|
135
|
+
},
|
|
136
|
+
"payload": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"description": "The payload when carried inline; keys are the profile's field keys."
|
|
139
|
+
},
|
|
140
|
+
"payloadRef": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"additionalProperties": false,
|
|
143
|
+
"required": [
|
|
144
|
+
"uri"
|
|
145
|
+
],
|
|
146
|
+
"properties": {
|
|
147
|
+
"uri": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"minLength": 1
|
|
150
|
+
},
|
|
151
|
+
"byteLength": {
|
|
152
|
+
"type": "integer",
|
|
153
|
+
"minimum": 0
|
|
154
|
+
},
|
|
155
|
+
"mediaType": {
|
|
156
|
+
"type": "string"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
},
|
|
160
|
+
"authorisation": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"additionalProperties": false,
|
|
163
|
+
"required": [
|
|
164
|
+
"kind",
|
|
165
|
+
"policyId"
|
|
166
|
+
],
|
|
167
|
+
"description": "Who was entitled to write this revision and under which policy. migration-unknown-ancestry marks a legacy copy whose provenance is not known and is never invented.",
|
|
168
|
+
"properties": {
|
|
169
|
+
"kind": {
|
|
170
|
+
"enum": [
|
|
171
|
+
"registration",
|
|
172
|
+
"import",
|
|
173
|
+
"migration-unknown-ancestry",
|
|
174
|
+
"operator"
|
|
175
|
+
]
|
|
176
|
+
},
|
|
177
|
+
"principal": {
|
|
178
|
+
"type": "string",
|
|
179
|
+
"minLength": 1
|
|
180
|
+
},
|
|
181
|
+
"evidenceRef": {
|
|
182
|
+
"type": "string",
|
|
183
|
+
"minLength": 1
|
|
184
|
+
},
|
|
185
|
+
"policyId": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"minLength": 1
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"disclosure": {
|
|
192
|
+
"type": "object",
|
|
193
|
+
"additionalProperties": false,
|
|
194
|
+
"required": [
|
|
195
|
+
"policyId",
|
|
196
|
+
"scope"
|
|
197
|
+
],
|
|
198
|
+
"properties": {
|
|
199
|
+
"policyId": {
|
|
200
|
+
"type": "string",
|
|
201
|
+
"minLength": 1
|
|
202
|
+
},
|
|
203
|
+
"scope": {
|
|
204
|
+
"enum": [
|
|
205
|
+
"public",
|
|
206
|
+
"owner",
|
|
207
|
+
"legitimate",
|
|
208
|
+
"authority"
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
"supersedes": {
|
|
214
|
+
"$ref": "#/$defs/revisionRef"
|
|
215
|
+
},
|
|
216
|
+
"sourceRefs": {
|
|
217
|
+
"type": "array",
|
|
218
|
+
"description": "Where the values came from, when the revision was derived from a retained source such as an import: opaque pointers, never the source bytes.",
|
|
219
|
+
"items": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"minLength": 1
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"relationship": {
|
|
227
|
+
"type": "object",
|
|
228
|
+
"additionalProperties": false,
|
|
229
|
+
"required": [
|
|
230
|
+
"relationshipId",
|
|
231
|
+
"kind",
|
|
232
|
+
"source",
|
|
233
|
+
"target",
|
|
234
|
+
"evidence",
|
|
235
|
+
"policyRef"
|
|
236
|
+
],
|
|
237
|
+
"properties": {
|
|
238
|
+
"relationshipId": {
|
|
239
|
+
"type": "string",
|
|
240
|
+
"minLength": 1
|
|
241
|
+
},
|
|
242
|
+
"kind": {
|
|
243
|
+
"enum": [
|
|
244
|
+
"instance-of-model",
|
|
245
|
+
"member-of-batch",
|
|
246
|
+
"component-of",
|
|
247
|
+
"successor-of"
|
|
248
|
+
]
|
|
249
|
+
},
|
|
250
|
+
"source": {
|
|
251
|
+
"$ref": "#/$defs/subjectRef"
|
|
252
|
+
},
|
|
253
|
+
"target": {
|
|
254
|
+
"$ref": "#/$defs/subjectRef"
|
|
255
|
+
},
|
|
256
|
+
"evidence": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"additionalProperties": false,
|
|
259
|
+
"description": "What the assertion rests on: a source revision, a credential or a retained source event. At least one is named.",
|
|
260
|
+
"minProperties": 1,
|
|
261
|
+
"properties": {
|
|
262
|
+
"sourceRevision": {
|
|
263
|
+
"$ref": "#/$defs/revisionRef"
|
|
264
|
+
},
|
|
265
|
+
"credentialRef": {
|
|
266
|
+
"type": "object",
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"required": [
|
|
269
|
+
"id"
|
|
270
|
+
],
|
|
271
|
+
"properties": {
|
|
272
|
+
"id": {
|
|
273
|
+
"type": "string",
|
|
274
|
+
"minLength": 1
|
|
275
|
+
},
|
|
276
|
+
"digest": {
|
|
277
|
+
"$ref": "#/$defs/hex64"
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
"eventRef": {
|
|
282
|
+
"type": "object",
|
|
283
|
+
"additionalProperties": false,
|
|
284
|
+
"required": [
|
|
285
|
+
"importId",
|
|
286
|
+
"eventRef"
|
|
287
|
+
],
|
|
288
|
+
"properties": {
|
|
289
|
+
"importId": {
|
|
290
|
+
"type": "string",
|
|
291
|
+
"minLength": 1
|
|
292
|
+
},
|
|
293
|
+
"eventRef": {
|
|
294
|
+
"type": "string",
|
|
295
|
+
"minLength": 1
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
"effective": {
|
|
302
|
+
"$ref": "#/$defs/interval"
|
|
303
|
+
},
|
|
304
|
+
"policyRef": {
|
|
305
|
+
"type": "string",
|
|
306
|
+
"minLength": 1
|
|
307
|
+
},
|
|
308
|
+
"quantities": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"additionalProperties": false,
|
|
311
|
+
"description": "For component-of only: the quantities the accepted assertion covers. A source event's own input and output quantities stay on the event and are not copied here.",
|
|
312
|
+
"properties": {
|
|
313
|
+
"input": {
|
|
314
|
+
"type": "object",
|
|
315
|
+
"additionalProperties": false,
|
|
316
|
+
"required": [
|
|
317
|
+
"value",
|
|
318
|
+
"unit"
|
|
319
|
+
],
|
|
320
|
+
"properties": {
|
|
321
|
+
"value": {
|
|
322
|
+
"type": "number"
|
|
323
|
+
},
|
|
324
|
+
"unit": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"minLength": 1
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
},
|
|
330
|
+
"output": {
|
|
331
|
+
"type": "object",
|
|
332
|
+
"additionalProperties": false,
|
|
333
|
+
"required": [
|
|
334
|
+
"value",
|
|
335
|
+
"unit"
|
|
336
|
+
],
|
|
337
|
+
"properties": {
|
|
338
|
+
"value": {
|
|
339
|
+
"type": "number"
|
|
340
|
+
},
|
|
341
|
+
"unit": {
|
|
342
|
+
"type": "string",
|
|
343
|
+
"minLength": 1
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
"allOf": [
|
|
351
|
+
{
|
|
352
|
+
"if": {
|
|
353
|
+
"properties": {
|
|
354
|
+
"kind": {
|
|
355
|
+
"not": {
|
|
356
|
+
"const": "component-of"
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"then": {
|
|
362
|
+
"properties": {
|
|
363
|
+
"quantities": false
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
]
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|