You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 11, 2022. It is now read-only.
where NestedBufferList could be any nested composition of buffers and arrays such as Buffer, or Buffer[], or [Buffer, Buffer[]], etc. (haven't tried expressing this in TS).
Currently the decode method has the following definitions:
Second def. takes a Buffer[]. Is this to support decoding multiple serialized items simultaneously? the code doesn't seem to do that. I suggest we remove this
The last two take Input as argument. I imagine this is for backwards-compatibility. I suggest we tighten the API and only accept a Buffer
On the stream flag: we could keep it, or add a new function decodeStreaming.
Thinking abstractly about
decodeI'd expect a function signature such as:where
NestedBufferListcould be any nested composition of buffers and arrays such asBuffer, orBuffer[], or[Buffer, Buffer[]], etc. (haven't tried expressing this in TS).Currently the
decodemethod has the following definitions:rlp/src/index.ts
Lines 60 to 63 in f06a96f
Bufferand returns aBuffer. Not sure why, it could very well be that the decoding is aNestedBufferList. This was also the problem stated in Encoding and Decoding RLP lists when part of a buffer #77Buffer[]. Is this to support decoding multiple serialized items simultaneously? the code doesn't seem to do that. I suggest we remove thisInputas argument. I imagine this is for backwards-compatibility. I suggest we tighten the API and only accept aBufferOn the
streamflag: we could keep it, or add a new functiondecodeStreaming.