Open kalouo opened 4 years ago
@okalouti
IMHO, total number of txns should be returned from this and any pageable list API endpoint. So yes, I think it belongs on this endpoint.
It might also make sense to include txn count in other API endpoints as well, depending on context...
Regarding list API endpoints see this project here: https://github.com/swimlane/ngx-datatable/blob/master/src/app/paging/paging-server.component.ts#L33-L35
For paging: page number, page size and total number of elements are often standard.
swimlane/ngx-datatable - is a pretty good example of working with list API endpoints. It allows for paging, filtering and sorting. And it allows for this to be done on client or server-side (bigger datasets done server-side, smaller ones client side).
Open question whether we implement this on an existing endpoint (
transaction.all
) or a new one.It would mainly be to enable the block explorer use case of showing transactions for a given address.
Related to: https://github.com/omisego/blockexplorer/issues/149