Events

[INDEXER] Get a range of BlockEvents

Changed on

/events/blocks allows the caller to query a sequence of BlockEvents indicating which blocks were added and removed from storage to reach the current state. Following BlockEvents allows lightweight clients to update their state without needing to implement their own syncing logic (like finding the common parent in a reorg).

/events/blocks is considered an "indexer" endpoint and Rosetta implementations are not required to complete it to adhere to the Rosetta spec. However, any Rosetta "indexer" MUST support this endpoint.

post/events/blocks

Request

  • The document declares no server URL.
  • Auth: none declared

Request body

network_identifierNetworkIdentifier required(unresolved $ref)
offsetinteger

offset is the offset into the event stream to sync events from. If this field is not populated, we return the limit events backwards from tip. If this is set to 0, we start from the beginning.

limitinteger

limit is the maximum number of events to fetch in one call. The implementation may return <= limit events.

Response

Expected response to a valid request

max_sequenceinteger required

max_sequence is the maximum available sequence number to fetch.

eventsBlockEvent[] required(unresolved $ref)

events is an array of BlockEvents indicating the order to add and remove blocks to maintain a canonical view of blockchain state. Lightweight clients can use this event stream to update state without implementing their own block syncing logic.

Changes

    • breaking

      added the new required request property

    • breaking

      the request's body type changed from no type to object

    • breaking

      the response's body type changed from no type to object for status

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      endpoint added