For certain use cases, like MPT nodes, the type of an RLP payload is not known in advance, but depends on its structure.
This PR adds functionality that extracts the payload structure without having to specify its type.
This fixes #17.
Solution
This PR adds Header::decode_raw for this, which returns the following typed enum, that can then be used to determine the payload components and then recursively decode them:
Motivation
For certain use cases, like MPT nodes, the type of an RLP payload is not known in advance, but depends on its structure. This PR adds functionality that extracts the payload structure without having to specify its type. This fixes #17.
Solution
This PR adds
Header::decode_raw
for this, which returns the following typed enum, that can then be used to determine the payload components and then recursively decode them:PR Checklist