Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,4 +696,10 @@ export function putAccountDataSettings(
})
}

export function getIndexingStatus(chainId: string) {
return getEndpoint(baseUrl, '/v1/chains/{chainId}/about/indexing', {
path: { chainId },
})
}

/* eslint-enable @typescript-eslint/explicit-module-boundary-types */
23 changes: 22 additions & 1 deletion src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import type {
NoncesResponse,
} from './transactions'
import type { SafeInfo, SafeOverview } from './safe-info'
import type { ChainListResponse, ChainInfo } from './chains'
import type { ChainListResponse, ChainInfo, ChainIndexingStatus } from './chains'
import type { SafeAppsResponse } from './safe-apps'
import type { AnyConfirmationView, DecodedDataRequest, DecodedDataResponse } from './decoded-data'
import type { MasterCopyReponse } from './master-copies'
Expand Down Expand Up @@ -429,6 +429,14 @@ export interface paths extends PathRegistry {
}
}
}
'/v1/chains/{chainId}/about/indexing': {
get: operations['get_indexing']
parameters: {
path: {
chainId: string
}
}
}
'/v1/subscriptions': {
delete: operations['unsubscribe_single']
parameters: {
Expand Down Expand Up @@ -1180,6 +1188,19 @@ export interface operations {
}
}
}
get_indexing: {
parameters: {
path: {
chainId: string
}
}

responses: {
200: {
schema: ChainIndexingStatus
}
}
}
unsubscribe_single: {
parameters: {
query: {
Expand Down
5 changes: 5 additions & 0 deletions src/types/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,8 @@ export type ChainInfo = {
}

export type ChainListResponse = Page<ChainInfo>

export type ChainIndexingStatus = {
lastSync: number
synced: boolean
}
Loading