@ecp.eth/sdk / indexer / FetchNotificationsOptions
Type Alias: FetchNotificationsOptions
type FetchNotificationsOptions = {
after?: string;
apiUrl?: string;
app?: | Hex
| Hex[];
appSecretKey: string;
before?: string;
limit?: number;
parentId?: Hex;
retries?: number;
seen?: boolean;
signal?: AbortSignal;
type?: | IndexerAPINotificationTypeSchemaType
| IndexerAPINotificationTypeSchemaType[];
user: Hex | string;
};
Defined in: packages/sdk/src/indexer/api.ts:1199
The options for fetchNotifications()
Properties
after?
optional after: string;
Defined in: packages/sdk/src/indexer/api.ts:1232
After cursor to fetch notifications from (older notifications)
apiUrl?
optional apiUrl: string;
Defined in: packages/sdk/src/indexer/api.ts:1205
URL on which /api/notifications endpoint will be called
Default
"https://api.ethcomments.xyz"
app?
optional app:
| Hex
| Hex[];
Defined in: packages/sdk/src/indexer/api.ts:1218
The app signers to fetch notifications for
appSecretKey
appSecretKey: string;
Defined in: packages/sdk/src/indexer/api.ts:1210
App secret key to authenticate the request. Can be found in the https://dashboard.ethcomments.xyz after creating an app.
before?
optional before: string;
Defined in: packages/sdk/src/indexer/api.ts:1228
Before cursor to fetch notifications from (newer notifications)
limit?
optional limit: number;
Defined in: packages/sdk/src/indexer/api.ts:1248
The number of notifications to fetch
Default
10
parentId?
optional parentId: Hex;
Defined in: packages/sdk/src/indexer/api.ts:1236
Fetch notifications for a specific parent id
retries?
optional retries: number;
Defined in: packages/sdk/src/indexer/api.ts:1254
Number of times to retry the request in case of failure (non‑parsing/network errors).
Default
3
seen?
optional seen: boolean;
Defined in: packages/sdk/src/indexer/api.ts:1242
Whether to fetch only seen or unseen notifications
Default
undefined - fetches all notifications
signal?
optional signal: AbortSignal;
Defined in: packages/sdk/src/indexer/api.ts:1258
The signal to abort the request
type?
optional type:
| IndexerAPINotificationTypeSchemaType
| IndexerAPINotificationTypeSchemaType[];
Defined in: packages/sdk/src/indexer/api.ts:1222
The types of notifications to fetch
user
user: Hex | string;
Defined in: packages/sdk/src/indexer/api.ts:1214
The user to fetch notifications for, either ETH address or ENS name