Skip to content

Commit 252dddb

Browse files
committed
fix: update keri-icp-v1 schema
1 parent b002a8c commit 252dddb

1 file changed

Lines changed: 66 additions & 22 deletions

File tree

schemas/keri-icp-v1.json

Lines changed: 66 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,41 @@
11
{
22
"$schema": "http://json-schema.org/draft-07/schema#",
33
"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.",
55
"type": "object",
66
"required": [
7+
"b",
8+
"bt",
79
"i",
810
"k",
11+
"kt",
912
"n",
13+
"nt",
1014
"s",
1115
"v"
1216
],
1317
"properties": {
1418
"a": {
15-
"description": "Anchored seals (attached data digests).",
19+
"description": "Anchored seals",
1620
"default": [],
1721
"type": "array",
1822
"items": {
1923
"$ref": "#/definitions/Seal"
2024
}
2125
},
2226
"b": {
23-
"description": "Witness list (DIDs or URLs of witnesses).",
24-
"default": [],
27+
"description": "Witness list (empty)",
2528
"type": "array",
2629
"items": {
2730
"type": "string"
2831
}
2932
},
3033
"bt": {
31-
"description": "Witness threshold.",
32-
"default": "",
34+
"description": "Witness threshold: \"0\" (no witnesses)",
3335
"type": "string"
3436
},
3537
"d": {
36-
"description": "Self-Addressing Identifier (SAID) of this event.",
38+
"description": "SAID (Self-Addressing Identifier) — Blake3 hash of event",
3739
"default": "",
3840
"allOf": [
3941
{
@@ -42,52 +44,57 @@
4244
]
4345
},
4446
"i": {
45-
"description": "KERI prefix same as `d` for inception.",
47+
"description": "Identifier prefix (same as `d` for inception)",
4648
"allOf": [
4749
{
4850
"$ref": "#/definitions/Prefix"
4951
}
5052
]
5153
},
5254
"k": {
53-
"description": "Current signing keys (base64url-encoded with derivation prefix).",
55+
"description": "Current public key(s), Base64url encoded with derivation code",
5456
"type": "array",
5557
"items": {
5658
"type": "string"
5759
}
5860
},
5961
"kt": {
60-
"description": "Signing key threshold.",
61-
"default": "",
62+
"description": "Key threshold: \"1\" for single-sig",
6263
"type": "string"
6364
},
6465
"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)",
6667
"type": "array",
6768
"items": {
6869
"type": "string"
6970
}
7071
},
7172
"nt": {
72-
"description": "Next-key commitment threshold.",
73-
"default": "",
73+
"description": "Next key threshold: \"1\"",
7474
"type": "string"
7575
},
7676
"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+
]
7983
},
8084
"v": {
81-
"description": "KERI version string (e.g. `\"KERI10JSON\"`).",
85+
"description": "Version string: \"KERI10JSON\"",
8286
"type": "string"
8387
},
8488
"x": {
85-
"description": "Ed25519 signature over the canonical event body.",
89+
"description": "Event signature (Ed25519, base64url-no-pad)",
8690
"default": "",
8791
"type": "string"
8892
}
8993
},
9094
"definitions": {
95+
"KeriSequence": {
96+
"type": "string"
97+
},
9198
"Prefix": {
9299
"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\"); ```",
93100
"type": "string"
@@ -97,26 +104,63 @@
97104
"type": "string"
98105
},
99106
"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.",
101108
"type": "object",
102109
"required": [
103110
"d",
104111
"type"
105112
],
106113
"properties": {
107114
"d": {
108-
"description": "Digest (SAID) of the anchored data.",
115+
"description": "SAID (digest) of the anchored data",
109116
"allOf": [
110117
{
111118
"$ref": "#/definitions/Said"
112119
}
113120
]
114121
},
115122
"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+
]
118129
}
119130
}
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+
]
120164
}
121165
}
122166
}

0 commit comments

Comments
 (0)