Skip to content

Commit fd8b3fb

Browse files
committed
updated doc strings added couple of property aliases
1 parent a601a92 commit fd8b3fb

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

src/keri/core/serdering.py

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -201,8 +201,13 @@ class Serder:
201201
Properties:
202202
raw (bytes): of serialized event only
203203
sad (dict): self addressed data dict
204+
cvrsn (Versionage): CESR code table version (Major, Minor)
204205
proto (str): Protocolage value as protocol identifier such as KERI, ACDC
205-
version (Versionage): protocol version (Major, Minor)
206+
alias of .protocol
207+
protocol (str): Protocolage value as protocol identifier such as KERI, ACDC
208+
alias of .proto
209+
vrsn (Versionage): protocol version (Major, Minor) alias of .version
210+
version (Versionage): protocol version (Major, Minor) alias of .vrsn
206211
kind (str): serialization kind coring.Serials such as JSON, CBOR, MGPK, CESR
207212
size (int): number of bytes in serialization
208213
said (str): qb64 said of .raw given by appropriate field
@@ -211,10 +216,11 @@ class Serder:
211216
212217
213218
Hidden Attributes:
214-
._raw is bytes of serialized event only
215-
._sad is key event dict
219+
._raw (bytes): serialized message
220+
._sad (dict): sad dict (key event dict)
221+
._cvrsn (Versionage): CESR code table version
216222
._proto (str): Protocolage value as protocol type identifier
217-
._version is Versionage instance of event version
223+
._vrsn is Versionage instance of event version
218224
._kind is serialization kind string value (see namedtuple coring.Serials)
219225
supported kinds are 'json', 'cbor', 'msgpack', 'binary'
220226
._size is int of number of bytes in serialed event only
@@ -1288,18 +1294,28 @@ def kind(self):
12881294

12891295
@property
12901296
def proto(self):
1291-
"""proto property getter
1297+
"""proto property getter, alias of .protocol
12921298
protocol identifier type value of Protocolage such as 'KERI' or 'ACDC'
12931299
12941300
Returns:
12951301
proto (str): Protocolage value as protocol type
12961302
"""
12971303
return self._proto
12981304

1305+
@property
1306+
def protocol(self):
1307+
"""protocp; property getter, alias of .proto
1308+
protocol identifier type value of Protocolage such as 'KERI' or 'ACDC'
1309+
1310+
Returns:
1311+
protocol (str): Protocolage value as protocol type
1312+
"""
1313+
return self._proto
1314+
12991315

13001316
@property
13011317
def vrsn(self):
1302-
"""vrsn (version) property getter
1318+
"""vrsn (version) property getter, alias of .version
13031319
13041320
Returns:
13051321
vrsn (Versionage): instance of protocol version for this Serder
@@ -1308,7 +1324,7 @@ def vrsn(self):
13081324

13091325
@property
13101326
def version(self):
1311-
"""version property getter alias of .vrsn
1327+
"""version property getter, alias of .vrsn
13121328
13131329
Returns:
13141330
version (Versionage): instance of protocol version for this Serder

0 commit comments

Comments
 (0)