From 7c9a3a6d682841032fbe9706a83b81f3e0899048 Mon Sep 17 00:00:00 2001 From: Samuel M Smith Date: Thu, 21 Dec 2023 19:13:18 -0700 Subject: [PATCH] Serder is no more --- src/keri/core/coring.py | 209 ------------------- tests/core/test_coring.py | 413 -------------------------------------- 2 files changed, 622 deletions(-) diff --git a/src/keri/core/coring.py b/src/keri/core/coring.py index 16b5ae16d..4d58794c3 100644 --- a/src/keri/core/coring.py +++ b/src/keri/core/coring.py @@ -5369,215 +5369,6 @@ def pretty(self, *, size=1024): return json.dumps(self.ked, indent=1)[:size if size is not None else None] -class Serder(Sadder): - """ - Serder is versioned protocol key event message serializer-deserializer class - - Only supports current version VERSION - - Has the following public properties: - - Inherited Properties: - raw (bytes): of serialized event only - ked (dict): self addressed data dict - kind (str): serialization kind coring.Serials such as JSON, CBOR, MGPK, CESR - size (int): number of bytes in serialization - version (Versionage): protocol version (Major, Minor) - proto (str): Protocolage value as protocol identifier such as KERI, ACDC - label (str): Saidage value as said field label - saider (Saider): of SAID of this SAD .ked['d'] if present - said (str): SAID of .saider qb64 - saidb (bytes): SAID of .saider qb64b - pretty (str): Pretty JSON of this SAD - - Properties: - .diger is Diger instance of digest of .raw - .dig is qb64 digest from .diger - .digb is qb64b digest from .diger - .verfers is list of Verfers converted from .ked["k"] - .werfers is list of Verfers converted from .ked["b"] - .tholder is Tholder instance from .ked["kt'] else None - .ntholder is Tholder instance from .ked["nt'] else None - sner (Number): instance converted from sequence number .ked["s"] hex str - sn (int): sequence number converted from .ked["s"] - fner (Number): instance converted from first seen ordinal number - .ked["f"] hex str if any otherwise None - fn (int): first seen ordinal number converted from .ked["f"] if any - otherwise None - .pre is qb64 str of identifier prefix from .ked["i"] - .preb is qb64b bytes of identifier prefix from .ked["i"] - - Inherited Hidden Attributes: - ._raw is bytes of serialized event only - ._ked is key event dict - ._kind is serialization kind string value (see namedtuple coring.Serials) - supported kinds are 'json', 'cbor', 'msgpack', 'binary' - ._size is int of number of bytes in serialed event only - ._version is Versionage instance of event version - ._proto (str): Protocolage value as protocol type identifier - ._saider (Saider): instance for this Sadder's SAID - - Note: - loads and jumps of json use str whereas cbor and msgpack use bytes - - """ - - def __init__(self, raw=b'', ked=None, kind=None, sad=None, code=MtrDex.Blake3_256): - """ - Deserialize if raw provided - Serialize if ked provided but not raw - When serializing if kind provided then use kind instead of field in ked - - Parameters: - raw is bytes of serialized event plus any attached signatures - ked is key event dict or None - if None its deserialized from raw - sad (Sadder) is clonable base class - kind is serialization kind string value or None (see namedtuple coring.Serials) - supported kinds are 'json', 'cbor', 'msgpack', 'binary' - if kind is None then its extracted from ked or raw - code is .diger default digest code - - """ - super(Serder, self).__init__(raw=raw, ked=ked, kind=kind, sad=sad, code=code) - - if self._proto != Protos.keri: - raise ValueError("Invalid protocol {}, must be KERI".format(self._proto)) - - - @property - def verfers(self): - """ - Returns list of Verfer instances as converted from .ked['k']. - One for each key. - verfers property getter - """ - if "k" in self.ked: # establishment event - keys = self.ked["k"] - else: # non-establishment event - keys = [] - - return [Verfer(qb64=key) for key in keys] - - @property - def digers(self): - """ - Returns list of Diger instances as converted from .ked['n']. - One for each next key digests. - digers property getter - """ - if "n" in self.ked: # establishment event - digs = self.ked["n"] - else: # non-establishment event - digs = [] - - return [Diger(qb64=dig) for dig in digs] - - @property - def werfers(self): - """ - Returns list of Verfer instances as converted from .ked['b']. - One for each backer (witness). - werfers property getter - """ - if "b" in self.ked: # inception establishment event - wits = self.ked["b"] - else: # non-establishment event - wits = [] - - return [Verfer(qb64=wit) for wit in wits] - - @property - def tholder(self): - """ - Returns Tholder instance as converted from .ked['kt'] or None if missing. - - """ - return Tholder(sith=self.ked["kt"]) if "kt" in self.ked else None - - @property - def ntholder(self): - """ - Returns Tholder instance as converted from .ked['nt'] or None if missing. - - """ - return Tholder(sith=self.ked["nt"]) if "nt" in self.ked else None - - @property - def sner(self): - """ - sner (Number of sequence number) property getter - Returns: - (Number): of .ked["s"] hex number str converted - """ - return Number(num=self.ked["s"]) # auto converts hex num str to int - - - @property - def sn(self): - """ - sn (sequence number) property getter - Returns: - sn (int): of .sner.num from .ked["s"] - """ - return (self.sner.num) - - - @property - def fner(self): - """ - fner (Number of first seen ordinal) property getter - Returns: - (Number): of .ked["f"] hex number str converted - """ - # auto converts hex num str to int - return Number(num=self.ked["f"]) if "f" in self.ked else None - - - @property - def fn(self): - """ - fn (first seen ordinal number) property getter - Returns: - fn (int): of .fner.num from .ked["f"] - """ - return (self.fner.num) - - - @property - def pre(self): - """ - Returns str qb64 of .ked["i"] (identifier prefix) - pre (identifier prefix) property getter - """ - return self.ked["i"] - - - @property - def preb(self): - """ - Returns bytes qb64b of .ked["i"] (identifier prefix) - preb (identifier prefix) property getter - """ - return self.pre.encode("utf-8") - - - @property - def est(self): # establishative - """ Returns True if Serder represents an establishment event """ - return self.ked["t"] in (Ilks.icp, Ilks.rot, Ilks.dip, Ilks.drt) - - - def pretty(self, *, size=1024): - """ - Returns str JSON of .ked with pretty formatting - - ToDo: add default size limit on pretty when used for syslog UDP MCU - like 1024 for ogler.logger - """ - return json.dumps(self.ked, indent=1)[:size if size is not None else None] - - class Tholder: """ diff --git a/tests/core/test_coring.py b/tests/core/test_coring.py index 924538fc4..7ec33df4a 100644 --- a/tests/core/test_coring.py +++ b/tests/core/test_coring.py @@ -5768,419 +5768,6 @@ def test_versify(): -def test_serder(): - """ - Test the support functionality for Serder key event serialization deserialization - deprecated - """ - with pytest.raises(ValueError): - serder = coring.Serder() - - e1 = dict(v=Vstrings.json, - d="", - i="ABCDEFG", - s="0001", - t="rot") - _, e1 = coring.Saider.saidify(sad=e1) - - serder = coring.Serder(ked=e1) - assert serder.ked == e1 - assert serder.kind == Serials.json - assert serder.version == Versionage(major=1, minor=0) - assert serder.said == 'EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F' - #'EgzrpOMEx_A-dvAruhmptnIbP2c55WZAd4fc1nGuyTwU' - assert serder.saidb == b'EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F' - assert serder.size == 111 - assert serder.verfers == [] - assert serder.raw == (b'{"v":"KERI10JSON00006f_","d":"EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F",' - b'"i":"ABCDEFG","s":"0001","t":"rot"}') - assert serder.sn == 1 - assert serder.pre == "ABCDEFG" - assert serder.preb == b"ABCDEFG" - - e1s = json.dumps(e1, separators=(",", ":"), ensure_ascii=False).encode("utf-8") - assert e1s == ((b'{"v":"KERI10JSON00006f_","d":"EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F",' - b'"i":"ABCDEFG","s":"0001","t":"rot"}')) - vs = versify(kind=Serials.json, size=len(e1s)) # use real length - assert vs == 'KERI10JSON00006f_' - e1["v"] = vs # has real length - pretty = serder.pretty() - assert pretty == ('{\n' - ' "v": "KERI10JSON00006f_",\n' - ' "d": "EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F",\n' - ' "i": "ABCDEFG",\n' - ' "s": "0001",\n' - ' "t": "rot"\n' - '}') - - e1s = json.dumps(e1, separators=(",", ":"), ensure_ascii=False).encode("utf-8") - with pytest.raises(ShortageError): # test too short - protos1, kind1, vers1, size1 = sniff(e1s[:VERFULLSIZE]) - - protos1, kind1, vers1, size1 = sniff(e1s[:MINSNIFFSIZE]) - assert protos1 == Protos.keri - assert kind1 == Serials.json - assert size1 == 111 - - protos1, kind1, vers1, size1 = sniff(e1s) - assert protos1 == Protos.keri - assert kind1 == Serials.json - assert size1 == 111 - e1ss = e1s + b'extra attached at the end.' - ked1, idnt1, knd1, vrs1, siz1 = serder._inhale(e1ss) - assert ked1 == e1 - assert idnt1 == Protos.keri - assert knd1 == kind1 - assert vrs1 == vers1 - assert siz1 == size1 - - with pytest.raises(ShortageError): # test too short - ked1, knd1, vrs1, siz1 = serder._inhale(e1ss[:size1 - 1]) - - raw1, idnt1, knd1, ked1, ver1 = serder._exhale(ked=e1) - assert raw1 == e1s - assert idnt1 == Protos.keri - assert knd1 == kind1 - assert ked1 == e1 - assert vrs1 == vers1 - - e2 = dict(e1) - e2["v"] = Vstrings.mgpk - e2s = msgpack.dumps(e2) - assert e2s == (b'\x85\xa1v\xb1KERI10MGPK000000_\xa1d\xd9,EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH' - b'3NZxrsk8F\xa1i\xa7ABCDEFG\xa1s\xa40001\xa1t\xa3rot') - vs = versify(kind=Serials.mgpk, size=len(e2s)) # use real length - assert vs == 'KERI10MGPK00005c_' - e2["v"] = vs # has real length - _, e2 = coring.Saider.saidify(sad=e2) - e2s = msgpack.dumps(e2) - - with pytest.raises(ShortageError): # test too short - ident2, kind2, vers2, size2 = sniff(e2s[:VERFULLSIZE]) - - ident2, kind2, vers2, size2 = sniff(e2s[:MINSNIFFSIZE]) - assert ident2 == Protos.keri - assert kind2 == Serials.mgpk - assert size2 == 92 - - ident2, kind2, vers2, size2 = sniff(e2s) - assert ident2 == Protos.keri - assert kind2 == Serials.mgpk - assert size2 == 92 - e2ss = e2s + b'extra attached at the end.' - ked2, idnt2, knd2, vrs2, siz2 = serder._inhale(e2ss) - assert ked2 == e2 - assert idnt2 == Protos.keri - assert knd2 == kind2 - assert vrs2 == vers2 - assert siz2 == size2 - - with pytest.raises(ShortageError): # test too short - ked2, knd2, vrs2, siz2 = serder._inhale(e2ss[:size2 - 1]) - - raw2, idnt2, knd2, ked2, ver2 = serder._exhale(ked=e2) - assert raw2 == e2s - assert idnt2 == Protos.keri - assert knd2 == kind2 - assert ked2 == e2 - assert vrs2 == vers2 - - e3 = dict(e1) - e3["v"] = Vstrings.cbor - e3s = cbor.dumps(e3) - assert e3s == (b'\xa5avqKERI10CBOR000000_adx,EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8Faig' - b'ABCDEFGasd0001atcrot') - vs = versify(kind=Serials.cbor, size=len(e3s)) # use real length - assert vs == 'KERI10CBOR00005c_' - e3["v"] = vs # has real length - _, e3 = coring.Saider.saidify(sad=e3) - e3s = cbor.dumps(e3) - - with pytest.raises(ShortageError): # test too short - ident3, kind3, vers3, size3 = sniff(e3s[:VERFULLSIZE]) - - ident3, kind3, vers3, size3 = sniff(e3s[:MINSNIFFSIZE]) - assert ident3 == Protos.keri - assert kind3 == Serials.cbor - assert size3 == 92 - - ident3, kind3, vers3, size3 = sniff(e3s) - assert ident3 == Protos.keri - assert kind3 == Serials.cbor - assert size3 == 92 - e3ss = e3s + b'extra attached at the end.' - ked3, idnt3, knd3, vrs3, siz3 = serder._inhale(e3ss) - assert ked3 == e3 - assert idnt3 == Protos.keri - assert knd3 == kind3 - assert vrs3 == vers3 - assert siz3 == size3 - - with pytest.raises(ShortageError): # test too short - ked3, knd3, vrs3, siz3 = serder._inhale(e3ss[:size3 - 1]) - - raw3, idnt3, knd3, ked3, ver3 = serder._exhale(ked=e3) - assert raw3 == e3s - assert idnt3 == Protos.keri - assert knd3 == kind3 - assert ked3 == e3 - assert vrs3 == vers3 - - e4 = dict(v=versify(proto=Protos.acdc, kind=Serials.json, size=0), - d="", - i="ABCDEFG", - s="0001", - t="rot") - _, e4 = coring.Saider.saidify(sad=e4) - - e4s = json.dumps(e4, separators=(",", ":"), ensure_ascii=False).encode("utf-8") - assert e4s == (b'{"v":"ACDC10JSON00006f_","d":"EMFw6MEBmwWU28-7wK4SJ2kasSzVgLKkAM7iwoqJJ07Z",' - b'"i":"ABCDEFG","s":"0001","t":"rot"}') - vs = versify(proto=Protos.acdc, kind=Serials.json, size=len(e4s)) # use real length - assert vs == 'ACDC10JSON00006f_' - e4["v"] = vs # has real length - serder = Sadder(ked=e4) - pretty = serder.pretty() - assert pretty == ('{\n' - ' "v": "ACDC10JSON00006f_",\n' - ' "d": "EMFw6MEBmwWU28-7wK4SJ2kasSzVgLKkAM7iwoqJJ07Z",\n' - ' "i": "ABCDEFG",\n' - ' "s": "0001",\n' - ' "t": "rot"\n' - '}') - - e4s = json.dumps(e4, separators=(",", ":"), ensure_ascii=False).encode("utf-8") - with pytest.raises(ShortageError): # test too short - ident4, kind4, vers4, size4 = sniff(e4s[:VERFULLSIZE]) - - ident4, kind4, vers4, size4 = sniff(e4s[:MINSNIFFSIZE]) - assert ident4 == Protos.acdc - assert kind4 == Serials.json - assert size4 == 111 - - ident4, kind4, vers4, size4 = sniff(e4s) - assert ident4 == Protos.acdc - assert kind4 == Serials.json - assert size4 == 111 - - evt1 = coring.Serder(raw=e1ss) - assert evt1.kind == kind1 - assert evt1.raw == e1s - assert evt1.ked == ked1 - assert evt1.size == size1 - assert evt1.raw == e1ss[:size1] - assert evt1.version == vers1 - assert evt1.sn == 1 - - # test digest properties .diger and .dig - assert evt1.saider.qb64 == evt1.said - assert evt1.saider.code == MtrDex.Blake3_256 - assert len(evt1.saider.raw) == 32 - assert len(evt1.said) == 44 - assert len(evt1.said) == Matter.Sizes[MtrDex.Blake3_256].fs - assert evt1.said == 'EIM66TjBMfwPnbwK7oZqbZyGz9nOeVmQHeH3NZxrsk8F' - assert evt1.saider.verify(evt1.ked) - - evt1 = coring.Serder(ked=ked1) - assert evt1.kind == kind1 - assert evt1.raw == e1s - assert evt1.ked == ked1 - assert evt1.size == size1 - assert evt1.raw == e1ss[:size1] - assert evt1.version == vers1 - assert evt1.saider.code == MtrDex.Blake3_256 - - evt2 = coring.Serder(raw=e2ss) - assert evt2.kind == kind2 - assert evt2.raw == e2s - assert evt2.ked == ked2 - assert evt2.version == vers2 - - evt2 = coring.Serder(ked=ked2) - assert evt2.kind == kind2 - assert evt2.raw == e2s - assert evt2.ked == ked2 - assert evt2.size == size2 - assert evt2.raw == e2ss[:size2] - assert evt2.version == vers2 - - evt3 = coring.Serder(raw=e3ss) - assert evt3.kind == kind3 - assert evt3.raw == e3s - assert evt3.ked == ked3 - assert evt3.version == vers3 - - evt3 = coring.Serder(ked=ked3) - assert evt3.kind == kind3 - assert evt3.raw == e3s - assert evt3.ked == ked3 - assert evt3.size == size3 - assert evt3.raw == e3ss[:size3] - assert evt3.version == vers3 - - # round trip - evt2 = coring.Serder(ked=evt1.ked) - assert evt2.kind == evt1.kind - assert evt2.raw == evt1.raw - assert evt2.ked == evt1.ked - assert evt2.size == evt1.size - assert evt2.version == vers2 - - # Test change in kind by Serder - ked1["v"] = Vstrings.mgpk - _, ked1 = coring.Saider.saidify(sad=ked1) - evt1 = coring.Serder(ked=ked1, kind=Serials.mgpk) # ked is json but kind mgpk - assert evt1.kind == kind2 - assert evt1.raw == e2s - assert evt1.ked == ked2 - assert evt1.size == size2 - assert evt1.raw == e2ss[:size2] - assert evt1.version == vers1 - assert evt1.said == 'EMvr339cs3EH-WcXfLDGOi-rRjNQxK46PqvBcgdAgg8p' - assert evt1.saider.verify(evt1.ked) - - # round trip - evt2 = coring.Serder(raw=evt1.raw) - assert evt2.kind == evt1.kind - assert evt2.raw == evt1.raw - assert evt2.ked == evt1.ked - assert evt2.size == evt1.size - assert evt2.version == vers2 - - ked1["v"] = Vstrings.cbor - _, ked1 = coring.Saider.saidify(sad=ked1) - evt1 = coring.Serder(ked=ked1, kind=Serials.cbor) # ked is json but kind mgpk - assert evt1.kind == kind3 - assert evt1.raw == e3s - assert evt1.ked == ked3 - assert evt1.size == size3 - assert evt1.raw == e3ss[:size3] - assert evt1.version == vers1 - - # round trip - evt2 = coring.Serder(raw=evt1.raw) - assert evt2.kind == evt1.kind - assert evt2.raw == evt1.raw - assert evt2.ked == evt1.ked - assert evt2.size == evt1.size - assert evt2.version == vers2 - - # use kind setter property - assert evt2.kind == Serials.cbor - evt2.kind = Serials.json - assert evt2.kind == Serials.json - proto, version, knd, size = deversify(evt2.ked["v"]) - assert proto == Protos.keri - assert knd == Serials.json - - # Test diger code - ked = {'v': "KERI10JSON00006a_", - 'd': 'HAg9_-rPd8oga-oyPghCEIlJZHKbYXcP86LQl0Yg2AvA', - 'i': 'ABCDEFG', 's': 1, - 't': 'rot'} - raw = ( - b'{"v":"KERI10JSON00006a_","d":"HAg9_-rPd8oga-oyPghCEIlJZHKbYXcP86LQl0Yg2AvA","i":"ABCDEFG","s":1,"t":"rot"}') - srdr = coring.Serder(raw=raw, code=MtrDex.SHA3_256) - assert srdr.kind == 'JSON' - assert srdr.raw == raw - assert srdr.ked == ked - assert srdr.saider.code == MtrDex.SHA3_256 - - # Test compare - ked = {'v': "KERI10JSON00006a_", - 'd': 'EADZ055vgh5utgSY3OOL1lW0m1pJ1W0Ia6-SVuGa0OqE', - 'i': 'ABCDEFG', 's': 1, - 't': 'rot'} - raw = ( - b'{"v":"KERI10JSON00006a_","d":"EADZ055vgh5utgSY3OOL1lW0m1pJ1W0Ia6-SVuGa0OqE","i":"ABCDEFG","s":1,"t":"rot"}') - srdr = coring.Serder(raw=raw) - assert srdr.kind == 'JSON' - assert srdr.raw == raw - assert srdr.ked == ked - assert srdr.saider.code == MtrDex.Blake3_256 - - # need tests will fully populated serder for icp rot dip drt - #aids = generatePublics(salt=None, count=3, transferable=False) - aids = ['BEy_EvE8OUMqj0AgCJ3wOCOrIVHVtwubYAysPyaAv9VI', - 'BC9Df6ssUZQFQZJYVUyfudw4WTQsugGcvVD_Z4ChFGE4', - 'BEejlxZytU7gjUwtgkmNKmBWiFPKSsXjk_uxzoun8dtK'] - - - #pre0 = aids[0] - #wit0 = aids[1] - #wit1 = aids[2] - #srdr = eventing.incept(keys=[pre0], wits=[wit0, wit1]) - #assert srdr.raw == (b'{"v":"KERI10JSON00015a_","t":"icp","d":"EBAjyPZ8Ed4XXl5cVZhqAy7SuaGivQp0WqQK' - #b'VXvg7oqd","i":"BEy_EvE8OUMqj0AgCJ3wOCOrIVHVtwubYAysPyaAv9VI","s":"0","kt":"1' - #b'","k":["BEy_EvE8OUMqj0AgCJ3wOCOrIVHVtwubYAysPyaAv9VI"],"nt":"0","n":[],"bt":' - #b'"2","b":["BC9Df6ssUZQFQZJYVUyfudw4WTQsugGcvVD_Z4ChFGE4","BEejlxZytU7gjUwtgkm' - #b'NKmBWiFPKSsXjk_uxzoun8dtK"],"c":[],"a":[]}') - ## test for serder.verfers and serder.werfers - #assert srdr.pre == pre0 - #assert srdr.sn == 0 - #assert [verfer.qb64 for verfer in srdr.verfers] == [pre0] - #assert [werfer.qb64 for werfer in srdr.werfers] == [wit0, wit1] - - # test .said and .saidb properties - ked = { - "v": "KERI10JSON00011c_", - "t": "rep", - "d": "EBAjyPZ8Ed4XXl5cVZhqAy7SuaGivQp0WqQKVXvg7oqd", - "dt": "2020-08-22T17:50:12.988921+00:00", - "r": "logs/processor", - "a": - { - "d": "EBAjyPZ8Ed4XXl5cVZhqAy7SuaGivQp0WqQKVXvg7oqd", - "i": "BEy_EvE8OUMqj0AgCJ3wOCOrIVHVtwubYAysPyaAv9VI", - "name": "John Jones", - "role": "Founder", - } - } - srdr = coring.Serder(ked=ked) - assert srdr.said == 'EBAjyPZ8Ed4XXl5cVZhqAy7SuaGivQp0WqQKVXvg7oqd' - assert srdr.saidb == b'EBAjyPZ8Ed4XXl5cVZhqAy7SuaGivQp0WqQKVXvg7oqd' - - # test tholder - ked = dict(v="KERI10JSON000000_", # version string - t="icp", - d="", - i="BEy_EvE8OUMqj0AgCJ3wOCOrIVHVtwubYAysPyaAv9VI", # qb64 prefix - s="0", # hex string no leading zeros lowercase - kt="1", # hex string no leading zeros lowercase - k=["BC9Df6ssUZQFQZJYVUyfudw4WTQsugGcvVD_Z4ChFGE4"], # list of qb64 - n="", # hash qual Base64 - bt="0", # hex string no leading zeros lowercase - b=[], # list of qb64 may be empty - c=[], # list of config ordered mappings may be empty - a=[], # list of seal dicts - ) - _, ked = coring.Saider.saidify(sad=ked) - - srdr = coring.Serder(ked=ked) - assert srdr.tholder.sith == "1" - assert srdr.tholder.thold == 1 - assert srdr.sn == 0 - assert srdr.sner.num == srdr.sn - - # test validation in Serder.sn property - ked["s"] = "-1" - srdr = coring.Serder(ked=ked) - with pytest.raises(InvalidValueError): - sn = srdr.sn - - #ked["s"] = "0" * 33 - #srdr = coring.Serder(ked=ked) - #with pytest.raises(InvalidValueError): - #sn = srdr.sn - - ked["s"] = "15.34" - srdr = coring.Serder(ked=ked) - with pytest.raises(InvalidValueError): - sn = srdr.sn - - """Done Test """ - - def test_tholder(): """ Test Tholder signing threshold satisfier class