]> Cypherpunks repositories - keks.git/commitdiff
Less JSON in examples
authorSergey Matveev <stargrave@stargrave.org>
Mon, 14 Apr 2025 06:45:40 +0000 (09:45 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Mon, 14 Apr 2025 06:45:53 +0000 (09:45 +0300)
spec/cm/pub.texi

index 9a1ab94ae1f53f97be8d933dbee55b71e96440e420ecb28556fbcab29bcdc7d6..a9bdfaeba92d44bb1fcc7fc2eb91a49da46eefbae28849735fae532b41286165 100644 (file)
@@ -74,23 +74,39 @@ datetime (no nanoseconds).
 Example minimal certified public key may look like:
 
 @verbatim
-{
-    "load": {
-        "t": "pub",
-        "v": {
-            "id": hash(pub),
-            "pub": [{"a": "gost3410-256A", "v"}],
-            "sub": {"n": "test"},
-        },
-    },
-    "sigs": [{
-        "tbs": {
-            "cid": UUID(certification id),
-            "sid": signer's pkid,
-            "exp": [TAI64, TAI64],
-        },
-        "sign": {"a": "gost3410-256A", "v": 'signature'},
-    }],
+MAGIC cm/pub
+MAP {
+  load {MAP {
+    t {STR pub}
+    v {MAP {
+      id {BIN "6aee..."}
+      pub {LIST {
+        {MAP {
+          a {STR ed25519-blake2b}
+          v {BIN "c1bf..."}
+        }}
+      }}
+      sub {MAP {
+        N {STR test}
+      }}
+    }}
+  }}
+  sigs {LIST {
+    {MAP {
+      tbs {MAP {
+        cid {HEXLET 01963308-1033-75a7-bfb6-7d3ab3db6d63}
+        exp {LIST {
+          {TAI64 "2025-04-14 06:41:28"}
+          {TAI64 "2026-04-14 06:41:28"}
+        }}
+        sid {BIN "0087..."}
+      }}
+      sign {MAP {
+        a {STR ed25519-blake2b}
+        v {BIN "7450..."}
+      }}
+    }}
+  }}
 }
 @end verbatim