Cashtab has powerful parsing functions for tx history that is useful for wallet devs. This logic should be made standardized and portable. In this way we could have a standard way of updating app parsing.
Right now, Right now,ecash-herald and cashtab both have distinct and custom parsing methods. ecash-herald and cashtab both have distinct and custom parsing methodsThey rely on the comparatively obsolete (compared to `ecash-lib`) `ecash-script` lib.
If we could standardize parsing and keep it in a single libApp devs should have a standard way of parsing ecash txs. Ideally, they should not have to do with low-level methods like `getStackArray` or `consumeNextPush`. However, it would be easier to add full support to all apps.we need these building blocks to complete parsing logic (like what we have in Cashtab's `parseTx`), New wallet devs would be able to have out-of-the-box tx parsing instead of engineering their ownand we need to recreate them in `ecash-lib` so that we can deprecate `ecash-script` without breaking Cashtab or `ecash-herald`.
There are some complexities involved in making this portable, so it is not possible to "one-shot" pull all the parsing logic out of Cashtab. Instead, we start with a re-implementation of simple OP_RETURN parsing currently performed by the legacy module `ecash-script`. We will probably move past `getStackArray` and use simpler routines. But, for now, this will allow us to deprecate `ecash-script` and have a CI-ready starting point for expanding portable parsing. The goal is to remove all parsing logic and tests from Cashtab, have them live here, and implement this same parsing in both Cashtab and ecash-herald. Eventually would like this level of parsing in the explorer as well; may not happen from this lib if the explorer stays in rust.So, But still should have a single reference point for parsing app actions and OP_RETURN specsthis is a first step toward the end goal.