Skip to content

Commit

Permalink
Merge pull request #610 from SmithSamuelM/dev
Browse files Browse the repository at this point in the history
cross ported fixes in Serder and tests
  • Loading branch information
SmithSamuelM authored Nov 30, 2023
2 parents 4316434 + ab6a340 commit 024b7fd
Show file tree
Hide file tree
Showing 2 changed files with 174 additions and 192 deletions.
249 changes: 125 additions & 124 deletions src/keri/core/serdering.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,136 +200,137 @@ class Serder:
# Each ilk value is a Labelage named tuple with saids, codes and fields
# ilk value of None is default for protocols that support ilkless packets
Fields = {
Protos.keri:
Protos.keri:
{
Vrsn_1_0:
{
Vrsn_1_0:
{
Ilks.icp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[])),
Ilks.rot: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', b=[], br=[],
ba=[], a=[])),
Ilks.ixn: Fieldage({Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='', a=[])),
Ilks.dip: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[],
di='')),
Ilks.drt: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', b=[], br=[],
ba=[], a=[], di='')),
Ilks.rct: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0')),
Ilks.qry: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='', rr='',
q={})),
Ilks.rpy: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',a=[])),
Ilks.pro: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='', rr='',
q={})),
Ilks.bar: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',a=[])),
Ilks.exn: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',q={},
a=[], e={})),
Ilks.vcp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', c=[],
bt='0', b=[], n='')),
Ilks.vrt: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', p='', s='0',
bt='0', br=[], ba=[])),
Ilks.iss: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
dt='')),
Ilks.rev: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
p='', dt='')),
Ilks.bis: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', ra={},
dt='')),
Ilks.brv: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', p='', ra={},
dt='')),
},
Vrsn_1_1:
{
Ilks.icp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[])),
Ilks.rot: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', b=[], br=[],
ba=[], a=[])),
Ilks.ixn: Fieldage({Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='', a=[])),
Ilks.dip: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[],
di='')),
Ilks.drt: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', b=[], br=[],
ba=[], a=[], di='')),
Ilks.rct: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0')),
Ilks.qry: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='', rr='',
q={})),
Ilks.rpy: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',a=[])),
Ilks.pro: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='', rr='',
q={})),
Ilks.bar: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',a=[])),
Ilks.exn: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',q={},
a=[], e={})),
},
Ilks.icp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[])),
Ilks.rot: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', br=[],
ba=[], a=[])),
Ilks.ixn: Fieldage({Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='', a=[])),
Ilks.dip: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[],
di='')),
Ilks.drt: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', br=[],
ba=[], a=[])),
Ilks.rct: Fieldage(saids={},
alls=dict(v='', t='',d='', i='', s='0')),
Ilks.qry: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='', rr='',
q={})),
Ilks.rpy: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',a=[])),
Ilks.pro: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='', rr='',
q={})),
Ilks.bar: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',a=[])),
Ilks.exn: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', dt='', r='',q={},
a=[], e={})),
Ilks.vcp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', c=[],
bt='0', b=[], n='')),
Ilks.vrt: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', p='', s='0',
bt='0', br=[], ba=[])),
Ilks.iss: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
dt='')),
Ilks.rev: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
p='', dt='')),
Ilks.bis: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', ra={},
dt='')),
Ilks.brv: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', p='', ra={},
dt='')),
},
Protos.crel:
Vrsn_1_1:
{
Vrsn_1_1:
{
Ilks.vcp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', c=[],
bt='0', b=[], u='')),
Ilks.vrt: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', p='', s='0',
bt='0', br=[], ba=[])),
Ilks.iss: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
dt='')),
Ilks.rev: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
p='', dt='')),
Ilks.bis: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', ra={},
dt='')),
Ilks.brv: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', p='', ra={},
dt='')),
},
Ilks.icp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[])),
Ilks.rot: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', br=[],
ba=[], a=[])),
Ilks.ixn: Fieldage({Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='', a=[])),
Ilks.dip: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', kt='0',
k=[], nt='0', n=[], bt='0', b=[], c=[], a=[],
di='')),
Ilks.drt: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', s='0', p='',
kt='0',k=[], nt='0', n=[], bt='0', br=[],
ba=[], a=[])),
Ilks.rct: Fieldage(saids={},
alls=dict(v='', t='',d='', i='', s='0')),
Ilks.qry: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='', rr='',
q={})),
Ilks.rpy: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',a=[])),
Ilks.pro: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='', rr='',
q={})),
Ilks.bar: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',a=[])),
Ilks.exn: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', t='',d='', i='', dt='', r='',q={},
a=[], e={})),
},
Protos.acdc:
},
Protos.crel:
{
Vrsn_1_1:
{
Vrsn_1_0:
{
None: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', d='', i='', s='')),
}
Ilks.vcp: Fieldage(saids={Saids.d: DigDex.Blake3_256,
Saids.i: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', c=[],
bt='0', b=[], u='')),
Ilks.vrt: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', p='', s='0',
bt='0', br=[], ba=[])),
Ilks.iss: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
dt='')),
Ilks.rev: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', ri='',
p='', dt='')),
Ilks.bis: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', ii='', s='0', ra={},
dt='')),
Ilks.brv: Fieldage(saids={Saids.d: DigDex.Blake3_256,},
alls=dict(v='', t='',d='', i='', s='0', p='', ra={},
dt='')),
},
}
},
Protos.acdc:
{
Vrsn_1_0:
{
None: Fieldage(saids={Saids.d: DigDex.Blake3_256},
alls=dict(v='', d='', i='', s='')),
}
},
}


# default ilk for each protocol at default version is zeroth ilk in dict
Ilks = dict()
Expand Down
Loading

0 comments on commit 024b7fd

Please sign in to comment.