As part of the CDP processor design/brainstorm, we all agreed that there's benefit in creating low level helper functions that users can call to get the specific field/data for their needs.
There is a draft PR that relates to the low level helper functions. Note: placed randomly in stellar-etl for convenience
Things to decide/discuss:
Where should these helper functions live? New package, ingest, go/xdr?
Which fields should we target first? (keep initial scope low but enough to be useful)
Ideally we could have functions for every field/data
Even if we only target ledgers, transactions, and operations the number of fields is still quite large
Is it possible to leverage XDR <> JSON functions at all to help this?
Should we define a standard interface/template for these low level helper functions?
Should we return go data types or the xdr types like xdr.Uint32?
I'd lean go types
What should happen if there are similarly named fields?
Low code function to return account - which account (buyer/seller)
Examples and cases to consider:
Simple case: easy traversing through LCM and returning a simple type
As part of the CDP processor design/brainstorm, we all agreed that there's benefit in creating low level helper functions that users can call to get the specific field/data for their needs.
There is a draft PR that relates to the low level helper functions. Note: placed randomly in stellar-etl for convenience
Things to decide/discuss:
xdr.Uint32
?Examples and cases to consider: Simple case: easy traversing through LCM and returning a simple type
Cases with V# xdr structs
Cases where the return type could be more subjective like with
xdr.ScVal
relates to: https://github.com/stellar/go/issues/5476 blocks: https://github.com/stellar/go/issues/5477, https://stellarorg.atlassian.net/browse/HUBBLE-231