Description
Currently the LidoInstruction
enum uses a generated borsh serializer. This makes it difficult to know for any external non-Rust program to parse the instruction bytes, which is an obstacle for e.g. block explorers to integrate.
It is possible to select a discriminant explicitly for each of the enum variants. This is a good idea anyway to have a stable interface across versions. At the moment it is only possible for enum variants without fields, and LidoInstruction
does have a few variants with fields. However, from Rust 1.56 onwards this should be possible. We should investigate whether it’s possible to use that. Or maybe we should just write serializers by hand, or generate the enum with some IDL that can also generate serializers for other languages (similar to what Anchor does).