Skip to content

Commit

Permalink
Merge pull request WebOfTrust#741 from SmithSamuelM/development
Browse files Browse the repository at this point in the history
Move Indexer and its subclasses to its own module. Put common Matter and Indexer classing in keri.core package .__init__
  • Loading branch information
SmithSamuelM authored Apr 5, 2024
2 parents 5b9b8fd + 0d7dd7a commit 8477339
Show file tree
Hide file tree
Showing 26 changed files with 2,700 additions and 2,602 deletions.
4 changes: 2 additions & 2 deletions src/keri/app/agenting.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from . import httping, forwarding
from .. import help
from .. import kering
from ..core import eventing, parsing, coring, serdering
from ..core import eventing, parsing, coring, serdering, indexing
from ..core.coring import CtrDex
from ..db import dbing
from ..kering import Roles
Expand Down Expand Up @@ -360,7 +360,7 @@ def receiptDo(self, tymth=None, tock=0.0):
continue

# generate all rct msgs to send to all witnesses
awigers = [coring.Siger(qb64b=bytes(wig)) for wig in wigs]
awigers = [indexing.Siger(qb64b=bytes(wig)) for wig in wigs]

# make sure all witnesses have fully receipted KERL and know about each other
for witer in witers:
Expand Down
4 changes: 2 additions & 2 deletions src/keri/app/cli/commands/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from keri import kering
from keri.app.cli.common import existing
from keri.core import coring
from keri.core import coring, indexing

parser = argparse.ArgumentParser(description='Verify signature(s) on arbitrary data')
parser.set_defaults(handler=lambda args: handler(args))
Expand Down Expand Up @@ -49,7 +49,7 @@ def verify(tymth, tock=0.0, **opts):
base = args.base
bran = args.bran

sigers = [coring.Siger(qb64=sig) for sig in args.signature]
sigers = [indexing.Siger(qb64=sig) for sig in args.signature]

try:
with existing.existingHab(name=name, alias=alias, base=base, bran=bran) as (_, hab):
Expand Down
6 changes: 3 additions & 3 deletions src/keri/app/grouping.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from .. import kering
from .. import help
from ..app import delegating, agenting
from ..core import coring, routing, eventing, parsing, serdering
from ..core import coring, routing, eventing, parsing, serdering, indexing
from ..db import dbing
from ..db.dbing import snKey
from ..peer import exchanging
Expand Down Expand Up @@ -124,7 +124,7 @@ def processPartialSignedEscrow(self):
if not sigs: # otherwise its a list of sigs
continue

sigers = [coring.Siger(qb64b=bytes(sig)) for sig in sigs]
sigers = [indexing.Siger(qb64b=bytes(sig)) for sig in sigs]
windex = min([siger.index for siger in sigers])

# True if Elected to perform delegation and witnessing
Expand Down Expand Up @@ -516,7 +516,7 @@ def getEscrowedEvent(db, pre, sn):

sigs = []
for sig in db.getSigsIter(key):
sigs.append(coring.Siger(qb64b=bytes(sig)))
sigs.append(indexing.Siger(qb64b=bytes(sig)))

couple = db.getAes(key)

Expand Down
6 changes: 3 additions & 3 deletions src/keri/app/habbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from . import keeping, configing
from .. import help
from .. import kering
from ..core import coring, eventing, parsing, routing, serdering
from ..core import coring, eventing, parsing, routing, serdering, indexing
from ..db import dbing, basing
from ..kering import MissingSignatureError, Roles

Expand Down Expand Up @@ -2011,7 +2011,7 @@ def getOwnEvent(self, sn, allowPartiallySigned=False):

sigs = []
for sig in self.db.getSigsIter(key):
sigs.append(coring.Siger(qb64b=bytes(sig)))
sigs.append(indexing.Siger(qb64b=bytes(sig)))

couple = self.db.getAes(key)

Expand Down Expand Up @@ -2890,7 +2890,7 @@ def witnesser(self):
if not sigs: # otherwise its a list of sigs
return False

sigers = [coring.Siger(qb64b=bytes(sig)) for sig in sigs]
sigers = [indexing.Siger(qb64b=bytes(sig)) for sig in sigs]
windex = min([siger.index for siger in sigers])

# True if Elected to perform delegation and witnessing
Expand Down
11 changes: 10 additions & 1 deletion src/keri/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@
keri.core Package
"""

__all__ = ["coring", "eventing", "parsing", "scheming"]
#__all__ = ["coring", "eventing", "parsing", "scheming"]

# Matter class and its subclasses
from .coring import (Matter, MtrDex, Number, NumDex, Dater,Texter,
Bexter, Pather, Verfer, Cigar, Signer, Salter,
Cipher, Encrypter, Decrypter, Diger, DigDex,
Prefixer, PreDex, )

from .coring import Tholder
from .indexing import Siger, IdrDex, IdxSigDex
Loading

0 comments on commit 8477339

Please sign in to comment.