Function retrievePaginatedEntity

  • Type Parameters

    • T

      type of entity that will be returned (note: Type of a single entity, not a list)

    • V extends RawGtv

      type of data returned from the blockchain

    • R extends PagedResponse<V> = PagedResponse<V>

    Parameters

    • queryable: Queryable

      to use to make queries to blockchain

    • query: QueryObject<R, DictPair>

      the query to perform

    • dataMapper: ((arg) => T[])

      function that transforms data from the type returned by backend to the type returned to caller

        • (arg): T[]
        • Parameters

          • arg: V[]

          Returns T[]

    Returns Promise<PaginatedEntity<T>>

    an object that contains a method to fetch a page from a paginated endpoint