|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
3 | 3 | "title": "IcpEvent", |
4 | | - "description": "Inception event.", |
| 4 | + "description": "Inception event — creates a new KERI identity.\n\nThe inception event establishes the identifier prefix and commits to the first rotation key via the `n` (next) field.\n\nNote: The `t` (type) field is handled by the `Event` enum's serde tag.", |
5 | 5 | "type": "object", |
6 | 6 | "required": [ |
| 7 | + "b", |
| 8 | + "bt", |
7 | 9 | "i", |
8 | 10 | "k", |
| 11 | + "kt", |
9 | 12 | "n", |
| 13 | + "nt", |
10 | 14 | "s", |
11 | 15 | "v" |
12 | 16 | ], |
13 | 17 | "properties": { |
14 | 18 | "a": { |
15 | | - "description": "Anchored seals (attached data digests).", |
| 19 | + "description": "Anchored seals", |
16 | 20 | "default": [], |
17 | 21 | "type": "array", |
18 | 22 | "items": { |
19 | 23 | "$ref": "#/definitions/Seal" |
20 | 24 | } |
21 | 25 | }, |
22 | 26 | "b": { |
23 | | - "description": "Witness list (DIDs or URLs of witnesses).", |
24 | | - "default": [], |
| 27 | + "description": "Witness list (empty)", |
25 | 28 | "type": "array", |
26 | 29 | "items": { |
27 | 30 | "type": "string" |
28 | 31 | } |
29 | 32 | }, |
30 | 33 | "bt": { |
31 | | - "description": "Witness threshold.", |
32 | | - "default": "", |
| 34 | + "description": "Witness threshold: \"0\" (no witnesses)", |
33 | 35 | "type": "string" |
34 | 36 | }, |
35 | 37 | "d": { |
36 | | - "description": "Self-Addressing Identifier (SAID) of this event.", |
| 38 | + "description": "SAID (Self-Addressing Identifier) — Blake3 hash of event", |
37 | 39 | "default": "", |
38 | 40 | "allOf": [ |
39 | 41 | { |
|
42 | 44 | ] |
43 | 45 | }, |
44 | 46 | "i": { |
45 | | - "description": "KERI prefix — same as `d` for inception.", |
| 47 | + "description": "Identifier prefix (same as `d` for inception)", |
46 | 48 | "allOf": [ |
47 | 49 | { |
48 | 50 | "$ref": "#/definitions/Prefix" |
49 | 51 | } |
50 | 52 | ] |
51 | 53 | }, |
52 | 54 | "k": { |
53 | | - "description": "Current signing keys (base64url-encoded with derivation prefix).", |
| 55 | + "description": "Current public key(s), Base64url encoded with derivation code", |
54 | 56 | "type": "array", |
55 | 57 | "items": { |
56 | 58 | "type": "string" |
57 | 59 | } |
58 | 60 | }, |
59 | 61 | "kt": { |
60 | | - "description": "Signing key threshold.", |
61 | | - "default": "", |
| 62 | + "description": "Key threshold: \"1\" for single-sig", |
62 | 63 | "type": "string" |
63 | 64 | }, |
64 | 65 | "n": { |
65 | | - "description": "Next-key commitments (Blake3 hashes of the pre-rotation public keys).", |
| 66 | + "description": "Next key commitment(s) — hash of next public key(s)", |
66 | 67 | "type": "array", |
67 | 68 | "items": { |
68 | 69 | "type": "string" |
69 | 70 | } |
70 | 71 | }, |
71 | 72 | "nt": { |
72 | | - "description": "Next-key commitment threshold.", |
73 | | - "default": "", |
| 73 | + "description": "Next key threshold: \"1\"", |
74 | 74 | "type": "string" |
75 | 75 | }, |
76 | 76 | "s": { |
77 | | - "description": "Sequence number (always `\"0\"` for inception).", |
78 | | - "type": "string" |
| 77 | + "description": "Sequence number (always 0 for inception)", |
| 78 | + "allOf": [ |
| 79 | + { |
| 80 | + "$ref": "#/definitions/KeriSequence" |
| 81 | + } |
| 82 | + ] |
79 | 83 | }, |
80 | 84 | "v": { |
81 | | - "description": "KERI version string (e.g. `\"KERI10JSON\"`).", |
| 85 | + "description": "Version string: \"KERI10JSON\"", |
82 | 86 | "type": "string" |
83 | 87 | }, |
84 | 88 | "x": { |
85 | | - "description": "Ed25519 signature over the canonical event body.", |
| 89 | + "description": "Event signature (Ed25519, base64url-no-pad)", |
86 | 90 | "default": "", |
87 | 91 | "type": "string" |
88 | 92 | } |
89 | 93 | }, |
90 | 94 | "definitions": { |
| 95 | + "KeriSequence": { |
| 96 | + "type": "string" |
| 97 | + }, |
91 | 98 | "Prefix": { |
92 | 99 | "description": "Strongly-typed KERI identifier prefix (e.g., `\"ETest123...\"`).\n\nA prefix is the self-addressing identifier derived from the inception event's Blake3 hash. Always starts with 'E' (Blake3-256 derivation code).\n\nArgs: * Inner `String` should start with `'E'` (enforced by `new()`, not by serde).\n\nUsage: ```ignore let prefix = Prefix::new(\"ETest123abc\".to_string())?; assert_eq!(prefix.as_str(), \"ETest123abc\"); ```", |
93 | 100 | "type": "string" |
|
97 | 104 | "type": "string" |
98 | 105 | }, |
99 | 106 | "Seal": { |
100 | | - "description": "A seal anchors external data in a KERI event.", |
| 107 | + "description": "A seal anchors external data in a KERI event.\n\nSeals are included in the `a` (anchors) field of KERI events. They contain a digest of the anchored data and a type indicator.", |
101 | 108 | "type": "object", |
102 | 109 | "required": [ |
103 | 110 | "d", |
104 | 111 | "type" |
105 | 112 | ], |
106 | 113 | "properties": { |
107 | 114 | "d": { |
108 | | - "description": "Digest (SAID) of the anchored data.", |
| 115 | + "description": "SAID (digest) of the anchored data", |
109 | 116 | "allOf": [ |
110 | 117 | { |
111 | 118 | "$ref": "#/definitions/Said" |
112 | 119 | } |
113 | 120 | ] |
114 | 121 | }, |
115 | 122 | "type": { |
116 | | - "description": "Semantic type label (e.g. `\"device-attestation\"`).", |
117 | | - "type": "string" |
| 123 | + "description": "Type of anchored data", |
| 124 | + "allOf": [ |
| 125 | + { |
| 126 | + "$ref": "#/definitions/SealType" |
| 127 | + } |
| 128 | + ] |
118 | 129 | } |
119 | 130 | } |
| 131 | + }, |
| 132 | + "SealType": { |
| 133 | + "description": "Type of data anchored by a seal.", |
| 134 | + "oneOf": [ |
| 135 | + { |
| 136 | + "description": "Device attestation seal", |
| 137 | + "type": "string", |
| 138 | + "enum": [ |
| 139 | + "device-attestation" |
| 140 | + ] |
| 141 | + }, |
| 142 | + { |
| 143 | + "description": "Revocation seal", |
| 144 | + "type": "string", |
| 145 | + "enum": [ |
| 146 | + "revocation" |
| 147 | + ] |
| 148 | + }, |
| 149 | + { |
| 150 | + "description": "Capability delegation seal", |
| 151 | + "type": "string", |
| 152 | + "enum": [ |
| 153 | + "delegation" |
| 154 | + ] |
| 155 | + }, |
| 156 | + { |
| 157 | + "description": "Identity provider binding seal", |
| 158 | + "type": "string", |
| 159 | + "enum": [ |
| 160 | + "idp-binding" |
| 161 | + ] |
| 162 | + } |
| 163 | + ] |
120 | 164 | } |
121 | 165 | } |
122 | 166 | } |
0 commit comments