Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Ilker class and started tests for native CESR Serder some cleanup refactor #735

Merged
merged 10 commits into from
Apr 4, 2024
38 changes: 22 additions & 16 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
$ twine upload dist/keri-0.0.1.tar.gz

Create release git:
$ git tag # lists all tags
$ git tag -a v0.6.11 -m "new feature"
$ git show v0.6.11
$ git push --tags # pushes tags to default remote
$ git push wot --tags # pushes tags to wot remote

$ git tag -a v0.4.2 -m "bump version"
$ git push --tags
$ git checkout -b release_0.4.2
Expand Down Expand Up @@ -70,31 +76,31 @@
],
python_requires='>=3.12.2',
install_requires=[
'lmdb>=1.3.0',
'pysodium>=0.7.12',
'blake3>=0.3.1',
'msgpack>=1.0.4',
'lmdb>=1.4.1',
'pysodium>=0.7.17',
'blake3>=0.4.1',
'msgpack>=1.0.8',
'cbor2>=5.6.2',
'multidict>=6.0.2',
'multidict>=6.0.5',
'ordered-set>=4.1.0',
'hio>=0.6.11',
'hio>=0.6.12',
'multicommand>=1.0.0',
'jsonschema>=4.17.0',
'falcon>=3.1.0',
'hjson>=3.0.2',
'PyYaml>=6.0',
'apispec>=6.0.0',
'mnemonic>=0.20',
'PrettyTable>=3.5.0',
'http_sfv>=0.9.8',
'jsonschema>=4.21.1',
'falcon>=3.1.3',
'hjson>=3.1.0',
'PyYaml>=6.0.1',
'apispec>=6.6.0',
'mnemonic>=0.21',
'PrettyTable>=3.10.0',
'http_sfv>=0.9.9',
'cryptography>=42.0.5',
'semver>=3.0.2'
],
extras_require={
},
tests_require=[
'coverage>=6.5.0',
'pytest>=7.2.0',
'coverage>=7.4.4',
'pytest>=8.1.1',
'pytest-shell>=0.3.2'
],
setup_requires=[
Expand Down
2 changes: 1 addition & 1 deletion src/keri/app/cli/commands/incept.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def __init__(self, name, base, alias, bran, endpoint, proxy=None, cnfg=None, **k
self.proxy = proxy
hby = existing.setupHby(name=name, base=base, bran=bran, cf=cf)
self.hbyDoer = habbing.HaberyDoer(habery=hby) # setup doer
self.swain = delegating.Sealer(hby=hby)
self.swain = delegating.Anchorer(hby=hby)
self.postman = forwarding.Poster(hby=hby)
self.mbx = indirecting.MailboxDirector(hby=hby, topics=['/receipt', "/replay", "/reply"])
doers = [self.hbyDoer, self.postman, self.mbx, self.swain, doing.doify(self.inceptDo)]
Expand Down
8 changes: 4 additions & 4 deletions src/keri/app/cli/commands/multisig/join.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ def incept(self, attrs):
inits["isith"] = ked["kt"]
inits["nsith"] = ked["nt"]

inits["estOnly"] = eventing.TraitCodex.EstOnly in ked["c"]
inits["DnD"] = eventing.TraitCodex.DoNotDelegate in ked["c"]
inits["estOnly"] = eventing.TraitDex.EstOnly in ked["c"]
inits["DnD"] = eventing.TraitDex.DoNotDelegate in ked["c"]

inits["toad"] = ked["bt"]
inits["wits"] = ked["b"]
Expand Down Expand Up @@ -273,8 +273,8 @@ def showEvent(self, hab, mids, ked):
if not thold.weighted:
tab.add_row(["Signature Threshold", thold.num])

tab.add_row(["Establishment Only", eventing.TraitCodex.EstOnly in ked["c"]])
tab.add_row(["Do Not Delegate", eventing.TraitCodex.DoNotDelegate in ked["c"]])
tab.add_row(["Establishment Only", eventing.TraitDex.EstOnly in ked["c"]])
tab.add_row(["Do Not Delegate", eventing.TraitDex.DoNotDelegate in ked["c"]])
tab.add_row(["Witness Threshold", ked["bt"]])
tab.add_row(["Witnesses", "\n".join(ked["b"])])

Expand Down
2 changes: 1 addition & 1 deletion src/keri/app/cli/commands/rotate.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def __init__(self, name, base, bran, alias, endpoint=False, isith=None, nsith=No

self.hby = existing.setupHby(name=name, base=base, bran=bran)
self.hbyDoer = habbing.HaberyDoer(habery=self.hby) # setup doer
self.swain = delegating.Sealer(hby=self.hby)
self.swain = delegating.Anchorer(hby=self.hby)
self.postman = forwarding.Poster(hby=self.hby)
self.mbx = indirecting.MailboxDirector(hby=self.hby, topics=['/receipt', "/replay", "/reply"])
doers = [self.hbyDoer, self.mbx, self.swain, self.postman, doing.doify(self.rotateDo)]
Expand Down
6 changes: 3 additions & 3 deletions src/keri/app/delegating.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
logger = help.ogler.getLogger()


class Sealer(doing.DoDoer):
"""
class Anchorer(doing.DoDoer):
"""Anchorer subclass of DoDoer
Sends messages to Delegator of an identifier and wait for the anchoring event to
be processed to ensure the inception or rotation event has been approved by the delegator.

Expand All @@ -46,7 +46,7 @@ def __init__(self, hby, proxy=None, **kwa):
self.witDoer = agenting.Receiptor(hby=self.hby)
self.proxy = proxy

super(Sealer, self).__init__(doers=[self.witq, self.witDoer, self.postman, doing.doify(self.escrowDo)],
super(Anchorer, self).__init__(doers=[self.witq, self.witDoer, self.postman, doing.doify(self.escrowDo)],
**kwa)

def delegation(self, pre, sn=None, proxy=None):
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 @@ -25,7 +25,7 @@ class Counselor(doing.DoDoer):
def __init__(self, hby, swain=None, proxy=None, **kwa):

self.hby = hby
self.swain = swain if swain is not None else delegating.Sealer(hby=self.hby)
self.swain = swain if swain is not None else delegating.Anchorer(hby=self.hby)
self.proxy = proxy
self.witDoer = agenting.Receiptor(hby=self.hby)
self.witq = agenting.WitnessInquisitor(hby=hby)
Expand Down
22 changes: 11 additions & 11 deletions src/keri/app/habbing.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def makeHab(self, name, ns=None, cf=None, **kwa):
toad (Union[int,str]): int or str hex of witness threshold
wits (list): of qb64 prefixes of witnesses
delpre (str): qb64 of delegator identifier prefix
estOnly (str): eventing.TraitCodex.EstOnly means only establishment
estOnly (str): eventing.TraitDex.EstOnly means only establishment
events allowed in KEL for this Hab
data (list | None): seal dicts
"""
Expand Down Expand Up @@ -427,9 +427,9 @@ def makeGroupHab(self, group, mhab, smids, rmids=None, ns=None, **kwa):
toad (Union[int,str]): int or str hex of witness threshold
wits (list): of qb64 prefixes of witnesses
delpre (str): qb64 of delegator identifier prefix
estOnly (str): eventing.TraitCodex.EstOnly means only establishment
estOnly (str): eventing.TraitDex.EstOnly means only establishment
events allowed in KEL for this Hab
DnD (bool): eventing.TraitCodex.DnD means do allow delegated identifiers from this identifier
DnD (bool): eventing.TraitDex.DnD means do allow delegated identifiers from this identifier

ToDo: NRR
add midxs tuples for each group member or all in group multisig.
Expand Down Expand Up @@ -1006,10 +1006,10 @@ def make(self, DnD, code, data, delpre, estOnly, isith, verfers, nsith, digers,
specified else compute default based on number of wits (backers)
wits (list | None): qb64 prefixes of witnesses if any
delpre (str | None): qb64 of delegator identifier prefix if any
estOnly (bool | None): True means add trait eventing.TraitCodex.EstOnly
estOnly (bool | None): True means add trait eventing.TraitDex.EstOnly
which means only establishment events allowed in KEL for this Hab
False (default) means allows non-est events and no trait is added.
DnD (bool): True means add trait of eventing.TraitCodex.DnD which
DnD (bool): True means add trait of eventing.TraitDex.DnD which
means do not allow delegated identifiers from this identifier
False (default) means do allow and no trait is added.

Expand All @@ -1026,9 +1026,9 @@ def make(self, DnD, code, data, delpre, estOnly, isith, verfers, nsith, digers,
nst = coring.Tholder(sith=nsith).sith # next signing threshold
cnfg = []
if estOnly:
cnfg.append(eventing.TraitCodex.EstOnly)
cnfg.append(eventing.TraitDex.EstOnly)
if DnD:
cnfg.append(eventing.TraitCodex.DoNotDelegate)
cnfg.append(eventing.TraitDex.DoNotDelegate)
self.delpre = delpre
keys = [verfer.qb64 for verfer in verfers]
if self.delpre:
Expand Down Expand Up @@ -2207,10 +2207,10 @@ def make(self, *, secrecies=None, iridx=0, code=coring.MtrDex.Blake3_256, dcode=
specified else compute default based on number of wits (backers)
wits (list | None): qb64 prefixes of witnesses if any
delpre (str | None): qb64 of delegator identifier prefix if any
estOnly (bool | None): True means add trait eventing.TraitCodex.EstOnly
estOnly (bool | None): True means add trait eventing.TraitDex.EstOnly
which means only establishment events allowed in KEL for this Hab
False (default) means allows non-est events and no trait is added.
DnD (bool): True means add trait of eventing.TraitCodex.DnD which
DnD (bool): True means add trait of eventing.TraitDex.DnD which
means do not allow delegated identifiers from this identifier
False (default) means do allow and no trait is added.

Expand Down Expand Up @@ -2671,10 +2671,10 @@ def make(self, *, code=coring.MtrDex.Blake3_256, transferable=True, isith=None,
specified else compute default based on number of wits (backers)
wits (list | None): qb64 prefixes of witnesses if any
delpre (str | None): qb64 of delegator identifier prefix if any
estOnly (bool | None): True means add trait eventing.TraitCodex.EstOnly
estOnly (bool | None): True means add trait eventing.TraitDex.EstOnly
which means only establishment events allowed in KEL for this Hab
False (default) means allows non-est events and no trait is added.
DnD (bool): True means add trait of eventing.TraitCodex.DnD which
DnD (bool): True means add trait of eventing.TraitDex.DnD which
means do not allow delegated identifiers from this identifier
False (default) means do allow and no trait is added.
merfers (list[Verfer] | None): group member Verfer instances of
Expand Down