As Dev Null Productions continues to expand our XLM support and services, we've been encountering some issues due to the intricacy of XLM transactions. As many of you know XLM transactions are sent across the wire in JSON format with various fields such as envelope, result, result_meta, and fee_meta serialized in the XDR format. Extracting these fields using the StellarSDK and converting them to JSON using the json-xdr library results in a complete JSON representation of the transaction.
The issues we've been encountering with this relate to performance due to the many levels of nested objects that reside in the fully expanded format and the requirement that we need to traverse them in a generic way. We started brainstorming ways to mitigate this and came up with the idea of simplifying the transaction objects as much as we can to ease the processing burden.
This has lead us to developing a new experimental library dubbed ezxlm to address this use case. This library transforms the XLM transaction format as received on the wire in a simpler format by applying various transformation rules. Some fields are deleted, some 'sub' objects are merged into parent objects, and various fields are transformed (such as ed25519 keys and assetCodes). See the README documentation in the project for complete details and a before/after example.
This library is still in development and most likely will change in the future but we'd like to share it w/ the XLM community in the hopes of receiving thoughts and feedback.
Happy hacking!