@@ -94,6 +94,7 @@ import type {
94
94
OptimismL2BatchTxs ,
95
95
OptimismL2BatchBlocks ,
96
96
} from 'types/api/optimisticL2' ;
97
+ import type { Pool , PoolsResponse } from 'types/api/pools' ;
97
98
import type { RawTracesResponse } from 'types/api/rawTrace' ;
98
99
import type {
99
100
RewardsConfigResponse ,
@@ -1128,6 +1129,22 @@ export const RESOURCES = {
1128
1129
path : '/api/v2/advanced-filters/csv' ,
1129
1130
} ,
1130
1131
1132
+ // POOLS
1133
+ pools : {
1134
+ path : '/api/v1/chains/:chainId/pools' ,
1135
+ pathParams : [ 'chainId' as const ] ,
1136
+ filterFields : [ 'query' as const ] ,
1137
+ endpoint : getFeaturePayload ( config . features . pools ) ?. api . endpoint ,
1138
+ basePath : getFeaturePayload ( config . features . pools ) ?. api . basePath ,
1139
+ } ,
1140
+
1141
+ pool : {
1142
+ path : '/api/v1/chains/:chainId/pools/:hash' ,
1143
+ pathParams : [ 'chainId' as const , 'hash' as const ] ,
1144
+ endpoint : getFeaturePayload ( config . features . pools ) ?. api . endpoint ,
1145
+ basePath : getFeaturePayload ( config . features . pools ) ?. api . basePath ,
1146
+ } ,
1147
+
1131
1148
// CONFIGS
1132
1149
config_backend_version : {
1133
1150
path : '/api/v2/config/backend-version' ,
@@ -1222,7 +1239,7 @@ export type PaginatedResources = 'blocks' | 'block_txs' | 'block_election_reward
1222
1239
'watchlist' | 'private_tags_address' | 'private_tags_tx' |
1223
1240
'domains_lookup' | 'addresses_lookup' | 'user_ops' | 'validators_stability' | 'validators_blackfort' | 'noves_address_history' |
1224
1241
'token_transfers_all' | 'scroll_l2_txn_batches' | 'scroll_l2_txn_batch_txs' | 'scroll_l2_txn_batch_blocks' |
1225
- 'scroll_l2_deposits' | 'scroll_l2_withdrawals' | 'advanced_filter' ;
1242
+ 'scroll_l2_deposits' | 'scroll_l2_withdrawals' | 'advanced_filter' | 'pools' ;
1226
1243
1227
1244
export type PaginatedResponse < Q extends PaginatedResources > = ResourcePayload < Q > ;
1228
1245
@@ -1416,6 +1433,8 @@ Q extends 'scroll_l2_withdrawals' ? ScrollL2MessagesResponse :
1416
1433
Q extends 'scroll_l2_withdrawals_count' ? number :
1417
1434
Q extends 'advanced_filter' ? AdvancedFilterResponse :
1418
1435
Q extends 'advanced_filter_methods' ? AdvancedFilterMethodsResponse :
1436
+ Q extends 'pools' ? PoolsResponse :
1437
+ Q extends 'pool' ? Pool :
1419
1438
never ;
1420
1439
/* eslint-enable @stylistic/indent */
1421
1440
@@ -1452,6 +1471,7 @@ Q extends 'address_mud_tables' ? AddressMudTablesFilter :
1452
1471
Q extends 'address_mud_records' ? AddressMudRecordsFilter :
1453
1472
Q extends 'token_transfers_all' ? TokenTransferFilters :
1454
1473
Q extends 'advanced_filter' ? AdvancedFilterParams :
1474
+ Q extends 'pools' ? { query : string } :
1455
1475
never ;
1456
1476
/* eslint-enable @stylistic/indent */
1457
1477
0 commit comments