|
1 | 1 | import { Static, Type } from '@sinclair/typebox';
|
2 |
| -import { Nullable, OptionalNullable, PaginatedResponse } from '../util'; |
| 2 | +import { Nullable, OptionalNullable, PaginatedCursorResponse, PaginatedResponse } from '../util'; |
3 | 3 | import { MempoolStatsSchema } from '../entities/mempool-transactions';
|
4 | 4 | import { MempoolTransactionSchema, TransactionSchema } from '../entities/transactions';
|
5 | 5 | import { MicroblockSchema } from '../entities/microblock';
|
@@ -180,13 +180,5 @@ export const RunFaucetResponseSchema = Type.Object(
|
180 | 180 | );
|
181 | 181 | export type RunFaucetResponse = Static<typeof RunFaucetResponseSchema>;
|
182 | 182 |
|
183 |
| -export const BlockListV2ResponseSchema = Type.Object({ |
184 |
| - limit: Type.Integer({ examples: [20] }), |
185 |
| - offset: Type.Integer({ examples: [0] }), |
186 |
| - total: Type.Integer({ examples: [1] }), |
187 |
| - next_cursor: Nullable(Type.String({ description: 'Next page cursor' })), |
188 |
| - prev_cursor: Nullable(Type.String({ description: 'Previous page cursor' })), |
189 |
| - cursor: Nullable(Type.String({ description: 'Current page cursor' })), |
190 |
| - results: Type.Array(NakamotoBlockSchema), |
191 |
| -}); |
| 183 | +export const BlockListV2ResponseSchema = PaginatedCursorResponse(NakamotoBlockSchema); |
192 | 184 | export type BlockListV2Response = Static<typeof BlockListV2ResponseSchema>;
|
0 commit comments