Skip to content

Commit

Permalink
Merge pull request WebOfTrust#635 from SmithSamuelM/dev
Browse files Browse the repository at this point in the history
Replaced coring.Serder with serdering.SerderKERI and deleted coring.Serder
  • Loading branch information
SmithSamuelM authored Dec 22, 2023
2 parents 88cab47 + 7c9a3a6 commit dc29ac1
Show file tree
Hide file tree
Showing 16 changed files with 104 additions and 728 deletions.
2 changes: 1 addition & 1 deletion src/keri/app/cli/commands/delegate/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def requestDo(self, tymth, tock=0.0):
exn, atc = delegating.delegateRequestExn(hab.mhab, delpre=delpre, evt=bytes(evt), aids=hab.smids)

# delegate AID ICP and exn of delegation request EXN
srdr = coring.Serder(raw=evt)
srdr = serdering.SerderKERI(raw=evt) # coring.Serder(raw=evt)
del evt[:srdr.size]
self.postman.send(src=phab.pre, dest=delpre, topic="delegate", serder=srdr, attachment=evt)
self.postman.send(src=phab.pre, dest=hab.kever.delegator, topic="delegate", serder=exn, attachment=atc)
Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/ipex/grant.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from keri.app import forwarding, connecting, habbing, grouping, indirecting, signing
from keri.app.cli.common import existing
from keri.app.notifying import Notifier
from keri.core import coring, parsing
from keri.core import coring, parsing, serdering
from keri.peer import exchanging
from keri.vc import protocoling
from keri.vdr import credentialing
Expand Down Expand Up @@ -108,7 +108,7 @@ def grantDo(self, tymth, tock=0.0):

iss = self.rgy.reger.cloneTvtAt(creder.said)

iserder = coring.Serder(raw=bytes(iss))
iserder = serdering.SerderKERI(raw=bytes(iss)) # coring.Serder(raw=bytes(iss))
seqner = coring.Seqner(sn=iserder.sn)

serder = self.hby.db.findAnchoringSealEvent(creder.ked['i'],
Expand Down
20 changes: 10 additions & 10 deletions src/keri/app/cli/commands/multisig/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def rpy(self, attrs):

if approve:
# Create and parse the event with "their" signatures
rserder = coring.Serder(ked=rpy)
rserder = serdering.SerderKERI(ked=rpy)
anc = bytearray(rserder.raw) + pathed["rpy"]
self.psr.parseOne(ims=bytes(anc))

Expand Down Expand Up @@ -512,7 +512,7 @@ def vcp(self, attrs):
# Create and parse the event with "their" signatures
registryName = input("Name for Registry: ")
anc = embeds["anc"]
aserder = coring.Serder(ked=anc)
aserder = serdering.SerderKERI(ked=anc)
anc = bytearray(aserder.raw) + pathed["anc"]
self.psr.parseOne(ims=bytes(anc))

Expand All @@ -522,7 +522,7 @@ def vcp(self, attrs):
self.psr.parseOne(ims=bytes(anc))

vcp = embeds["vcp"]
vserder = coring.Serder(ked=vcp)
vserder = serdering.SerderKERI(ked=vcp)
try:
self.rgy.tvy.processEvent(serder=vserder)
except kering.MissingAnchorError:
Expand Down Expand Up @@ -606,7 +606,7 @@ def iss(self, attrs):
if approve:
# Create and parse the event with "their" signatures
anc = embeds["anc"]
aserder = coring.Serder(ked=anc)
aserder = serdering.SerderKERI(ked=anc)
anc = bytearray(aserder.raw) + pathed["anc"]
self.psr.parseOne(ims=bytes(anc))

Expand All @@ -616,7 +616,7 @@ def iss(self, attrs):
self.psr.parseOne(ims=bytes(anc))

iss = embeds["iss"]
iserder = coring.Serder(ked=iss)
iserder = serdering.SerderKERI(ked=iss)
try:
self.rgy.tvy.processEvent(serder=iserder)
except kering.MissingAnchorError:
Expand Down Expand Up @@ -704,7 +704,7 @@ def rev(self, attrs):
if approve:
# Create and parse the event with "their" signatures
anc = embeds["anc"]
aserder = coring.Serder(ked=anc)
aserder = serdering.SerderKERI(ked=anc)
anc = bytearray(aserder.raw) + pathed["anc"]
self.psr.parseOne(ims=bytes(anc))

Expand All @@ -714,7 +714,7 @@ def rev(self, attrs):
self.psr.parseOne(ims=bytes(anc))

rev = embeds["rev"]
rserder = coring.Serder(ked=rev)
rserder = serdering.SerderKERI(ked=rev)
try:
self.rgy.tvy.processEvent(serder=rserder)
except kering.MissingAnchorError:
Expand Down Expand Up @@ -742,11 +742,11 @@ def rev(self, attrs):
recp = creder.subject['i']
msgs = []
for msg in self.hby.db.clonePreIter(pre=creder.issuer):
serder = coring.Serder(raw=msg)
serder = serdering.SerderKERI(raw=msg)
atc = msg[serder.size:]
msgs.append((serder, atc))
for msg in self.rgy.reger.clonePreIter(pre=creder.said):
serder = coring.Serder(raw=msg)
serder = serdering.SerderKERI(raw=msg)
atc = msg[serder.size:]
msgs.append((serder, atc))

Expand Down Expand Up @@ -798,7 +798,7 @@ def exn(self, attrs):
approve = yn in ('', 'y', 'Y')

if approve:
eserder = coring.Serder(ked=eexn)
eserder = serdering.SerderKERI(ked=eexn)
anc = bytearray(eserder.raw) + pathed["exn"]
self.psr.parseOne(ims=bytes(anc))

Expand Down
2 changes: 1 addition & 1 deletion src/keri/app/cli/commands/rollback.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def rollback(tymth, tock=0.0, **opts):
ked['f'] = fner.numh
ked['dt'] = helping.nowIso8601()

state = coring.Serder(ked=ked)
state = serdering.SerderKERI(ked=ked) # This is wrong key state is not Serder anymore
hby.db.states.pin(keys=hab.pre,
val=helping.datify(basing.KeyStateRecord,
state.ked))
Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from hio.base import doing

from keri.app.cli.common import displaying, existing
from keri.core import coring
from keri.core import coring, serdering
from keri.kering import ConfigurationError

logger = help.ogler.getLogger()
Expand Down Expand Up @@ -60,7 +60,7 @@ def status(tymth, tock=0.0, **opts):

cloner = hab.db.clonePreIter(pre=hab.pre, fn=0) # create iterator at 0
for msg in cloner:
srdr = coring.Serder(raw=msg)
srdr = serdering.SerderKERI(raw=msg)
print(srdr.pretty(size=10000))
print()

Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/vc/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from keri.core import serdering
from keri.app import indirecting, habbing, grouping, connecting, forwarding, signing, notifying
from keri.app.cli.common import existing
from keri.core import coring, eventing
from keri.core import coring, eventing, serdering
from keri.help import helping
from keri.peer import exchanging
from keri.vc import proving
Expand Down Expand Up @@ -220,7 +220,7 @@ def createDo(self, tymth, tock=0.0):
else:
anc = hab.interact(data=[rseal])

aserder = coring.Serder(raw=anc)
aserder = serdering.SerderACDC(raw=anc) # coring.Serder(raw=anc)
self.credentialer.issue(self.creder, iserder)
self.registrar.issue(self.creder, iserder, aserder)

Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/vc/registry/incept.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from keri.app.cli.common import existing
from keri.app.habbing import GroupHab
from keri.app.notifying import Notifier
from keri.core import coring
from keri.core import coring, serdering
from keri.core.eventing import SealEvent
from keri.peer import exchanging
from keri.vdr import credentialing
Expand Down Expand Up @@ -132,7 +132,7 @@ def inceptDo(self, tymth, tock=0.0, **kwa):
else:
anc = hab.interact(data=[rseal])

aserder = coring.Serder(raw=bytes(anc))
aserder = serdering.SerderKERI(raw=bytes(anc)) # coring.Serder(raw=bytes(anc))
self.registrar.incept(iserder=registry.vcp, anc=aserder)

if isinstance(hab, GroupHab):
Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/vc/registry/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

from keri.app import indirecting, habbing, grouping
from keri.app.cli.common import existing
from keri.core import coring
from keri.core import coring, serdering
from keri.vdr import credentialing

logger = help.ogler.getLogger()
Expand Down Expand Up @@ -98,7 +98,7 @@ def statusDo(self, tymth, tock=0.0):
if self.verbose:
cloner = reg.reger.clonePreIter(pre=reg.regk, fn=0) # create iterator at 0
for msg in cloner:
srdr = coring.Serder(raw=msg)
srdr = serdering.SerderKERI(raw=msg)
print(srdr.pretty())
print()

Expand Down
8 changes: 4 additions & 4 deletions src/keri/app/cli/commands/vc/revoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from keri.app import indirecting, habbing, grouping, forwarding, connecting, notifying
from keri.app.cli.common import existing
from keri.app.habbing import GroupHab
from keri.core import coring
from keri.core import coring, serdering
from keri.core.eventing import SealEvent
from keri.peer import exchanging
from keri.vdr import credentialing, verifying
Expand Down Expand Up @@ -119,7 +119,7 @@ def revokeDo(self, tymth, tock=0.0):
else:
anc = hab.interact(data=[rseal])

aserder = coring.Serder(raw=bytes(anc))
aserder = serdering.SerderKERI(raw=bytes(anc))
self.registrar.revoke(creder, rserder, aserder)

senderHab = self.hab
Expand All @@ -143,11 +143,11 @@ def revokeDo(self, tymth, tock=0.0):
recp = creder.attrib['i']
msgs = []
for msg in self.hby.db.clonePreIter(pre=creder.issuer):
serder = coring.Serder(raw=msg)
serder = serdering.SerderKERI(raw=msg)
atc = msg[serder.size:]
msgs.append((serder, atc))
for msg in self.rgy.reger.clonePreIter(pre=creder.said):
serder = coring.Serder(raw=msg)
serder = serdering.SerderKERI(raw=msg)
atc = msg[serder.size:]
msgs.append((serder, atc))

Expand Down
2 changes: 1 addition & 1 deletion src/keri/app/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def multisigInceptExn(hab, smids, rmids, icp, delegator=None):
"""
rmids = rmids if rmids is not None else smids
serder = coring.Serder(raw=icp)
serder = serdering.SerderKERI(raw=icp) # coring.Serder(raw=icp)
data = dict(
gid=serder.pre,
smids=smids,
Expand Down
Loading

0 comments on commit dc29ac1

Please sign in to comment.