static fun decodeBytes(source: Bytes): Bytes
(source)
Read a SSZ encoded bytes from a Bytes value. Note: prefer to use #decodeBytes(Bytes, int)
instead, especially when reading untrusted data.
source
- the SSZ encoded bytes
InvalidSSZTypeException
- if the next SSZ value is not a byte array, or is too large (greater than 2^32 bytes)
EndOfSSZException
- if there are no more SSZ values to read
Return
the bytes
static fun decodeBytes(source: Bytes, limit: Int): Bytes
(source)
Read a SSZ encoded bytes from a Bytes value.
source
- the SSZ encoded bytes
limit
- the maximum number of bytes to read
InvalidSSZTypeException
- if the next SSZ value is not a byte array, or would exceed the limit
EndOfSSZException
- if there are no more SSZ values to read
Return
the bytes