@@ -176,58 +176,6 @@ def json_deserialize_with_clvm_streamable(
176
176
return streamable_type .from_json_dict (json_dict )
177
177
178
178
179
- # def json_deserialize_with_clvm_streamable(
180
- # json_dict: Union[str, dict[str, Any]],
181
- # streamable_type: type[_T_Streamable],
182
- # translation_layer: Optional[TranslationLayer] = None,
183
- # ) -> _T_Streamable:
184
- # if isinstance(json_dict, str):
185
- # return byte_deserialize_clvm_streamable(
186
- # bytes.fromhex(json_dict), streamable_type, translation_layer=translation_layer
187
- # )
188
- # else:
189
- # if not hasattr(streamable_type, "streamable_fields"):
190
- # # This is a rust streamable and therefore cannot be a clvm_streamable
191
- # return streamable_type.from_json_dict(json_dict)
192
- # old_streamable_fields = streamable_type.streamable_fields()
193
- # new_streamable_fields = []
194
- # for old_field in old_streamable_fields:
195
- # if is_compound_type(old_field.type):
196
- # inner_types = get_args(old_field.type)
197
- # new_streamable_fields.append(
198
- # dataclasses.replace(
199
- # old_field,
200
- # convert_function=function_to_convert_one_item(
201
- # old_field.type,
202
- # [
203
- # functools.partial(
204
- # json_deserialize_with_clvm_streamable,
205
- # streamable_type=inner_type,
206
- # translation_layer=translation_layer,
207
- # )
208
- # for inner_type in inner_types
209
- # ],
210
- # ),
211
- # )
212
- # )
213
- # elif is_clvm_streamable_type(old_field.type):
214
- # new_streamable_fields.append(
215
- # dataclasses.replace(
216
- # old_field,
217
- # convert_function=functools.partial(
218
- # json_deserialize_with_clvm_streamable,
219
- # streamable_type=old_field.type,
220
- # translation_layer=translation_layer,
221
- # ),
222
- # )
223
- # )
224
- # else:
225
- # new_streamable_fields.append(old_field)
226
-
227
- # setattr(streamable_type, "_streamable_fields", tuple(new_streamable_fields))
228
- # return streamable_type.from_json_dict(json_dict)
229
-
230
-
231
179
_T_ClvmStreamable = TypeVar ("_T_ClvmStreamable" , bound = "Streamable" )
232
180
_T_TLClvmStreamable = TypeVar ("_T_TLClvmStreamable" , bound = "Streamable" )
233
181
0 commit comments