Open sborrazas opened 1 year ago
As we have discussed over the past days as well, maybe we can unify in the future to find one structure for each "entity" and always return that to be more consistent.
I think as devs of that api we are aware of how this came to be, but for consumers this can be painful
As we have discussed over the past days as well, maybe we can unify in the future to find one structure for each "entity" and always return that to be more consistent.
I think as devs of that api we are aware of how this came to be, but for consumers this can be painful
Agreed, even though the Mdw was practically rebuilt we need a next step of reviewing response/payload structures including in the v3 endpoints discussion also how to deliver websocket data.
~Right now, the websocket tx object contains less data than the /txs list endpoint, which doesn't allow the frontend to render the new txs without making additional requests.~
The data displayed on some of the requests not always comes from (or is serialized by) the middleware. We need to have a way to specify the clients where the data comes from: either the mdw or the node.
Regarding websockets this is done here in terms of synching time (when node or mdw has synced) but all data is serialized by the Node: https://github.com/aeternity/ae_mdw/blob/4b69441dfeb5425ec63bef8e63d1c44dfa90fd42/lib/ae_mdw_web/websocket/broadcaster.ex#L186-L187 https://github.com/aeternity/ae_mdw/blob/4b69441dfeb5425ec63bef8e63d1c44dfa90fd42/lib/ae_mdw_web/websocket/broadcaster.ex#L167-L168
Would we be able to serialize that data ourselves and include the additional information that the node doesn't include?
Would we be able to serialize that data ourselves and include the additional information that the node doesn't include?
I think it's possible and if we wanna avoid breaking changes the formatting can be part of the subscription.
Right now, the websocket tx object contains less data than the /txs list endpoint, which doesn't allow the frontend to render the new txs without making additional requests.The data displayed on some of the requests not always comes from (or is serialized by) the middleware. We need to have a way to specify the clients where the data comes from: either the mdw or the node.