diff --git a/src/keri/app/cli/common/existing.py b/src/keri/app/cli/common/existing.py index 0339d9246..287d4e033 100644 --- a/src/keri/app/cli/common/existing.py +++ b/src/keri/app/cli/common/existing.py @@ -46,9 +46,7 @@ def setupHby(name, base="", bran=None, cf=None): retries += 1 hby = habbing.Habery(name=name, base=base, bran=bran, cf=cf, free=True) break - except (kering.AuthError, ValueError) as e: - raise e - + except (kering.AuthError, ValueError): if retries >= 3: raise kering.AuthError("too many attempts") print("Valid passcode required, try again...") diff --git a/src/keri/vdr/viring.py b/src/keri/vdr/viring.py index f14f69de3..f55925634 100644 --- a/src/keri/vdr/viring.py +++ b/src/keri/vdr/viring.py @@ -17,6 +17,7 @@ from ..app import signing from ..core import coring, serdering from ..db import dbing, basing +from ..db.dbing import snKey from ..help import helping from ..vc import proving from ..vdr import eventing @@ -398,6 +399,14 @@ def cloneCreds(self, saids, db): for saider in saids: key = saider.qb64 creder, prefixer, seqner, asaider = self.cloneCred(said=key) + atc = bytearray(signing.serialize(creder, prefixer, seqner, saider)) + del atc[0:creder.size] + + iss = bytearray(self.cloneTvtAt(pre=prefixer.qb64, sn=seqner.sn)) + iserder = serdering.SerderKERI(raw=iss) + issatc = bytes(iss[iserder.size:]) + + del iss[0:iserder.size] chainSaids = [] for k, p in creder.edge.items(): @@ -416,6 +425,9 @@ def cloneCreds(self, saids, db): cred = dict( sad=creder.sad, + atc=atc.decode("utf-8"), + iss=iserder.sad, + issatc=issatc.decode("utf-8"), pre=creder.issuer, schema=schemer.sed, chains=chains, @@ -427,7 +439,22 @@ def cloneCreds(self, saids, db): ) ) + ctr = coring.Counter(qb64b=iss, strip=True) + if ctr.code == coring.CtrDex.AttachedMaterialQuadlets: + ctr = coring.Counter(qb64b=iss, strip=True) + + if ctr.code == coring.CtrDex.SealSourceCouples: + coring.Seqner(qb64b=iss, strip=True) + saider = coring.Saider(qb64b=iss) + + anc = db.cloneEvtMsg(pre=creder.issuer, fn=0, dig=saider.qb64b) + aserder = serdering.SerderKERI(raw=anc) + ancatc = bytes(anc[aserder.size:]) + cred['anc'] = aserder.sad + cred['ancatc'] = ancatc.decode("utf-8"), + creds.append(cred) + return creds def logCred(self, creder, prefixer, seqner, saider):