When using the Python script:
timestamp = ScaleDecoder.get_decoder_class('Timestamp', ScaleBytes(timestamp_bytes_array)).decode()
it seems that the decoder expects the size of the array to be exactly equal to the object to be decoded. This is equivalent to the behavior of the DecodeAll
trait in rust, where the remaining bytes after decoding must be zero.
How can I, in Python, do whatever is equivalent to Decode
trait in rust, where the number of remaining bytes, after decoding, can be > 0, so that I can decode a stream?