(entity-history
    [db eid sort-order]
    [db eid sort-order {:keys [with-docs?
                               with-corrections?
                               start-valid-time
                               end-valid-time
                               start-tx-time
                               end-tx-time
                               start-tx-id
                               end-tx-id]}]
    "Eagerly retrieves entity history for the given entity.
    Options:
    * `sort-order`: `#{:asc :desc}`
    * `:with-docs?` (boolean, default false): specifies whether to include documents in the entries under the `::xt/doc` key
    * `:with-corrections?` (boolean, default false): specifies whether to include bitemporal corrections in the sequence, sorted first by valid-time, then tx-id
    * `:start-valid-time` (inclusive, default unbounded)
    * `:start-tx`: (map, all keys optional)
      - `:xtdb.api/tx-time` (Date, inclusive, default unbounded)
      - `:xtdb.api/tx-id` (Long, inclusive, default unbounded)
    * `:end-valid-time` (exclusive, default unbounded)
    * `:end-tx`: (map, all keys optional)
      - `:xtdb.api/tx-time` (Date, exclusive, default unbounded)
      - `:xtdb.api/tx-id` (Long, exclusive, default unbounded)
    No matter what `start-*` and `end-*` parameters you specify, you won't receive results later than the valid-time and tx-id of this DB value.
    Each entry in the result contains the following keys:
    * `::xt/valid-time`,
    * `::xt/tx-time`,
    * `::xt/tx-id`,
    * `::xt/content-hash`
    * `::xt/doc` (see `with-docs?`).")