We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 991803e commit d73f5a2Copy full SHA for d73f5a2
pycardano/serialization.py
@@ -461,14 +461,14 @@ def to_cbor_hex(self) -> str:
461
return self.to_cbor().hex()
462
463
@classmethod
464
- def from_cbor(cls, payload: Union[str, bytes]) -> CBORSerializable:
+ def from_cbor(cls: Type[CBORBase], payload: Union[str, bytes]) -> CBORBase:
465
"""Restore a CBORSerializable object from a CBOR.
466
467
Args:
468
payload (Union[str, bytes]): CBOR bytes or hex string to restore from.
469
470
Returns:
471
- CBORSerializable: Restored CBORSerializable object.
+ CBORBase: Restored CBORSerializable object of the specific subclass type.
472
473
Examples:
474
0 commit comments