casper-network / casper-sidecar

Apache License 2.0
2 stars 8 forks source link

Entity envelope in rest api #252

Closed zajko closed 7 months ago

zajko commented 7 months ago

Changed REST API endpoint so that they don't return simply the stored event. Instead we wrap the sse events in an envelope which looks like: { "header": { "api_version": "2.0.0", "network_name": "casper" }, "payload": {(...)} }

Events in endpoints that return lists (like signatures for block) will also have each individual element of the list wrapped in such envelope.
In the above the header fields:
zacshowa commented 7 months ago

LGTM