Serializers
Info
This reference defines the necessary types required to handle SEP-001 serialization. It provides the implementation details for handling serialization based on the specification's guidelines for each strategy. Please see more about serializers spec.
Compact(standard)
JWS Compact serializer implementation.
Initialize a new instance with the standard implementation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
standard |
Standard
|
Standard object |
required |
Source code in nucleus/sdk/expose/marshall.py
97 98 99 100 101 102 103 104 105 106 |
|
__bytes__()
Return compact serialization as bytes.
Returns:
Type | Description |
---|---|
bytes
|
Source code in nucleus/sdk/expose/marshall.py
175 176 177 178 179 180 |
|
__iter__()
Yield typ
headers specified in SEP-001 standard.
Returns:
Type | Description |
---|---|
Setting
|
The iterable media type settings |
Source code in nucleus/sdk/expose/marshall.py
161 162 163 164 165 166 |
|
__str__()
Return compact serialization as string.
Returns:
Type | Description |
---|---|
str
|
Source code in nucleus/sdk/expose/marshall.py
168 169 170 171 172 173 |
|
save_to(store)
Publishes Compact serialization into the local store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
store |
Store
|
The Store function |
required |
Returns:
Type | Description |
---|---|
Object
|
Source code in nucleus/sdk/expose/marshall.py
147 148 149 150 151 152 153 154 155 156 157 158 159 |
|
update(jwt)
Acts as an observer, waiting for events triggered by any cryptographic operation. Encodes JWS/JWE to compact serialization when a cryptographic operation notifies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jwt |
JWT
|
The JWT implementation passed by the cryptographic operation. |
required |
Returns:
Type | Description |
---|---|
Compact
|
The compact serialization string. |
Source code in nucleus/sdk/expose/marshall.py
136 137 138 139 140 141 142 143 144 145 |
|
DagJose(standard)
Dag-JOSE serializer implementation.
Initialize a new instance with the standard implementation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
standard |
Standard
|
Standard object |
required |
Source code in nucleus/sdk/expose/marshall.py
34 35 36 37 38 39 40 41 |
|
__bytes__()
Return DAG-JOSE serialization as bytes.
Returns:
Type | Description |
---|---|
bytes
|
Source code in nucleus/sdk/expose/marshall.py
57 58 59 60 61 62 |
|
__iter__()
Yield typ
headers specified in SEP-001 standard.
Returns:
Type | Description |
---|---|
Setting
|
The iterable media type settings |
Source code in nucleus/sdk/expose/marshall.py
43 44 45 46 47 48 |
|
__str__()
Return DAG-JOSE serialization as string.
Returns:
Type | Description |
---|---|
str
|
Source code in nucleus/sdk/expose/marshall.py
50 51 52 53 54 55 |
|
save_to(store)
Publishes DAG-JOSE into the local store.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
store |
Store
|
The Store function |
required |
Returns:
Type | Description |
---|---|
Object
|
Source code in nucleus/sdk/expose/marshall.py
76 77 78 79 80 81 82 83 84 85 86 |
|
update(jwt)
Acts as an observer, waiting for events triggered by any cryptographic operation. Encodes JWS/JWE to DAG-JOSE serialization when a cryptographic operation notifies.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
jwt |
JWT
|
The JWT implementation passed by the cryptographic operation. |
required |
Returns:
Type | Description |
---|---|
DagJose
|
The DAG-JOSE serialization format. |
Source code in nucleus/sdk/expose/marshall.py
64 65 66 67 68 69 70 71 72 73 74 |
|