|
1 | 1 | { |
2 | 2 | "$schema": "http://json-schema.org/draft-07/schema#", |
3 | 3 | "title": "IcpEvent", |
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.", |
| 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\nSpec field order: `[v, t, d, i, s, kt, k, nt, n, bt, b, c, a]`", |
5 | 5 | "type": "object", |
6 | 6 | "required": [ |
7 | | - "b", |
8 | 7 | "bt", |
9 | 8 | "i", |
10 | 9 | "k", |
|
24 | 23 | } |
25 | 24 | }, |
26 | 25 | "b": { |
27 | | - "description": "Witness list (empty)", |
| 26 | + "description": "Witness/backer list (ordered AIDs)", |
| 27 | + "default": [], |
28 | 28 | "type": "array", |
29 | 29 | "items": { |
30 | | - "type": "string" |
| 30 | + "$ref": "#/definitions/Prefix" |
31 | 31 | } |
32 | 32 | }, |
33 | 33 | "bt": { |
34 | | - "description": "Witness threshold: \"0\" (no witnesses)", |
35 | | - "type": "string" |
| 34 | + "description": "Witness/backer threshold", |
| 35 | + "allOf": [ |
| 36 | + { |
| 37 | + "$ref": "#/definitions/Threshold" |
| 38 | + } |
| 39 | + ] |
| 40 | + }, |
| 41 | + "c": { |
| 42 | + "description": "Configuration traits (e.g., EstablishmentOnly, DoNotDelegate)", |
| 43 | + "default": [], |
| 44 | + "type": "array", |
| 45 | + "items": { |
| 46 | + "$ref": "#/definitions/ConfigTrait" |
| 47 | + } |
36 | 48 | }, |
37 | 49 | "d": { |
38 | 50 | "description": "SAID (Self-Addressing Identifier) — Blake3 hash of event", |
|
44 | 56 | ] |
45 | 57 | }, |
46 | 58 | "i": { |
47 | | - "description": "Identifier prefix (same as `d` for inception)", |
| 59 | + "description": "Identifier prefix (same as `d` for self-addressing inception)", |
48 | 60 | "allOf": [ |
49 | 61 | { |
50 | 62 | "$ref": "#/definitions/Prefix" |
51 | 63 | } |
52 | 64 | ] |
53 | 65 | }, |
54 | 66 | "k": { |
55 | | - "description": "Current public key(s), Base64url encoded with derivation code", |
| 67 | + "description": "Current public key(s), CESR-encoded", |
56 | 68 | "type": "array", |
57 | 69 | "items": { |
58 | | - "type": "string" |
| 70 | + "$ref": "#/definitions/CesrKey" |
59 | 71 | } |
60 | 72 | }, |
61 | 73 | "kt": { |
62 | | - "description": "Key threshold: \"1\" for single-sig", |
63 | | - "type": "string" |
| 74 | + "description": "Key signing threshold (hex integer or fractional weight list)", |
| 75 | + "allOf": [ |
| 76 | + { |
| 77 | + "$ref": "#/definitions/Threshold" |
| 78 | + } |
| 79 | + ] |
64 | 80 | }, |
65 | 81 | "n": { |
66 | | - "description": "Next key commitment(s) — hash of next public key(s)", |
| 82 | + "description": "Next key commitment(s) — Blake3 digests of next public key(s)", |
67 | 83 | "type": "array", |
68 | 84 | "items": { |
69 | | - "type": "string" |
| 85 | + "$ref": "#/definitions/Said" |
70 | 86 | } |
71 | 87 | }, |
72 | 88 | "nt": { |
73 | | - "description": "Next key threshold: \"1\"", |
74 | | - "type": "string" |
| 89 | + "description": "Next key signing threshold", |
| 90 | + "allOf": [ |
| 91 | + { |
| 92 | + "$ref": "#/definitions/Threshold" |
| 93 | + } |
| 94 | + ] |
75 | 95 | }, |
76 | 96 | "s": { |
77 | 97 | "description": "Sequence number (always 0 for inception)", |
|
82 | 102 | ] |
83 | 103 | }, |
84 | 104 | "v": { |
85 | | - "description": "Version string: \"KERI10JSON\"", |
86 | | - "type": "string" |
| 105 | + "description": "Version string", |
| 106 | + "allOf": [ |
| 107 | + { |
| 108 | + "$ref": "#/definitions/VersionString" |
| 109 | + } |
| 110 | + ] |
87 | 111 | }, |
88 | 112 | "x": { |
89 | | - "description": "Event signature (Ed25519, base64url-no-pad)", |
| 113 | + "description": "Legacy signature field — DEPRECATED. Use `SignedEvent` with externalized signatures. Retained for backwards compatibility with stored events.", |
90 | 114 | "default": "", |
91 | 115 | "type": "string" |
92 | 116 | } |
93 | 117 | }, |
94 | 118 | "definitions": { |
95 | | - "KeriSequence": { |
| 119 | + "CesrKey": { |
| 120 | + "description": "A CESR-encoded public key (e.g., `D` + base64url Ed25519).\n\nWraps the qualified string form. Use `parse_ed25519()` to extract the raw 32-byte key for cryptographic operations.\n\nUsage: ``` use auths_keri::CesrKey; let key = CesrKey::new_unchecked(\"DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\".into()); assert!(key.parse_ed25519().is_ok()); ```", |
96 | 121 | "type": "string" |
97 | 122 | }, |
98 | | - "Prefix": { |
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\"); ```", |
100 | | - "type": "string" |
101 | | - }, |
102 | | - "Said": { |
103 | | - "description": "KERI Self-Addressing Identifier (SAID).\n\nA Blake3 hash that uniquely identifies a KERI event. Creates the hash chain: each event's `p` (previous) field is the prior event's SAID.\n\nStructurally identical to `Prefix` (both start with 'E') but semantically distinct — a prefix identifies an *identity*, a SAID identifies an *event*.\n\nArgs: * Inner `String` should start with `'E'` (enforced by `new()`, not by serde).\n\nUsage: ```ignore let said = Said::new(\"ESAID123\".to_string())?; assert_eq!(said.as_str(), \"ESAID123\"); ```", |
104 | | - "type": "string" |
105 | | - }, |
106 | | - "Seal": { |
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.", |
108 | | - "type": "object", |
109 | | - "required": [ |
110 | | - "d", |
111 | | - "type" |
112 | | - ], |
113 | | - "properties": { |
114 | | - "d": { |
115 | | - "description": "SAID (digest) of the anchored data", |
116 | | - "allOf": [ |
117 | | - { |
118 | | - "$ref": "#/definitions/Said" |
119 | | - } |
| 123 | + "ConfigTrait": { |
| 124 | + "description": "KERI configuration trait codes.\n\nThese control identity behavior at inception and may be updated at rotation (for `RB`/`NRB` only). If two conflicting traits appear, the latter supersedes.\n\nUsage: ``` use auths_keri::ConfigTrait; let traits: Vec<ConfigTrait> = serde_json::from_str(r#\"[\"EO\",\"DND\"]\"#).unwrap(); assert!(traits.contains(&ConfigTrait::EstablishmentOnly)); ```", |
| 125 | + "oneOf": [ |
| 126 | + { |
| 127 | + "description": "Establishment-Only: only establishment events in KEL.", |
| 128 | + "type": "string", |
| 129 | + "enum": [ |
| 130 | + "EO" |
120 | 131 | ] |
121 | 132 | }, |
122 | | - "type": { |
123 | | - "description": "Type of anchored data", |
124 | | - "allOf": [ |
125 | | - { |
126 | | - "$ref": "#/definitions/SealType" |
127 | | - } |
128 | | - ] |
129 | | - } |
130 | | - } |
131 | | - }, |
132 | | - "SealType": { |
133 | | - "description": "Type of data anchored by a seal.", |
134 | | - "oneOf": [ |
135 | 133 | { |
136 | | - "description": "Device attestation seal", |
| 134 | + "description": "Do-Not-Delegate: cannot act as delegator.", |
137 | 135 | "type": "string", |
138 | 136 | "enum": [ |
139 | | - "device-attestation" |
| 137 | + "DND" |
140 | 138 | ] |
141 | 139 | }, |
142 | 140 | { |
143 | | - "description": "Revocation seal", |
| 141 | + "description": "Delegate-Is-Delegator: delegated AID treated same as delegator.", |
144 | 142 | "type": "string", |
145 | 143 | "enum": [ |
146 | | - "revocation" |
| 144 | + "DID" |
147 | 145 | ] |
148 | 146 | }, |
149 | 147 | { |
150 | | - "description": "Capability delegation seal", |
| 148 | + "description": "Registrar Backers: backer list provides registrar backer AIDs.", |
151 | 149 | "type": "string", |
152 | 150 | "enum": [ |
153 | | - "delegation" |
| 151 | + "RB" |
154 | 152 | ] |
155 | 153 | }, |
156 | 154 | { |
157 | | - "description": "Identity provider binding seal", |
| 155 | + "description": "No Registrar Backers: switch back to witnesses.", |
158 | 156 | "type": "string", |
159 | 157 | "enum": [ |
160 | | - "idp-binding" |
| 158 | + "NRB" |
161 | 159 | ] |
162 | 160 | } |
163 | 161 | ] |
| 162 | + }, |
| 163 | + "KeriSequence": { |
| 164 | + "type": "string" |
| 165 | + }, |
| 166 | + "Prefix": { |
| 167 | + "description": "Strongly-typed KERI identifier prefix (e.g., `\"ETest123...\"`, `\"DKey456...\"`).\n\nA prefix is the autonomous identifier (AID) for a KERI identity. For self-addressing AIDs it starts with `E` (Blake3-256 digest of the inception event); for key-based AIDs it starts with `D` (Ed25519 public key) or another CESR derivation code.\n\nArgs: * Inner `String` must start with a valid CESR derivation code (uppercase letter or digit). Enforced by `new()`, not by serde.\n\nUsage: ```ignore let prefix = Prefix::new(\"ETest123abc\".to_string())?; assert_eq!(prefix.as_str(), \"ETest123abc\"); ```", |
| 168 | + "type": "string" |
| 169 | + }, |
| 170 | + "Said": { |
| 171 | + "description": "KERI Self-Addressing Identifier (SAID).\n\nA Blake3 hash that uniquely identifies a KERI event. Creates the hash chain: each event's `p` (previous) field is the prior event's SAID.\n\nStructurally identical to `Prefix` (both start with 'E') but semantically distinct — a prefix identifies an *identity*, a SAID identifies an *event*.\n\nArgs: * Inner `String` should start with `'E'` (enforced by `new()`, not by serde).\n\nUsage: ```ignore let said = Said::new(\"ESAID123\".to_string())?; assert_eq!(said.as_str(), \"ESAID123\"); ```", |
| 172 | + "type": "string" |
| 173 | + }, |
| 174 | + "Seal": true, |
| 175 | + "Threshold": true, |
| 176 | + "VersionString": { |
| 177 | + "type": "string" |
164 | 178 | } |
165 | 179 | } |
166 | 180 | } |
0 commit comments