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

cross ported fixes in Serder and tests #610

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading