@ecp.eth/sdk / indexer / FetchCommentOptions
Type Alias: FetchCommentOptions
type FetchCommentOptions = {
apiUrl?: string;
chainId: number | number[];
commentId: Hex;
commentType?: number;
isReplyDeleted?: boolean;
mode?: IndexerAPICommentListModeSchemaType;
retries?: number;
signal?: AbortSignal;
viewer?: Hex;
};
Defined in: packages/sdk/src/indexer/api.ts:42
Properties
apiUrl?
optional apiUrl: string;
Defined in: packages/sdk/src/indexer/api.ts:76
URL on which /api/comments endpoint will be called
Default
"https://api.ethcomments.xyz"
chainId
chainId: number | number[];
Defined in: packages/sdk/src/indexer/api.ts:50
Filter comments by chain ID(s)
commentId
commentId: Hex;
Defined in: packages/sdk/src/indexer/api.ts:46
The ID of the comment to fetch
commentType?
optional commentType: number;
Defined in: packages/sdk/src/indexer/api.ts:70
Filter comments by comment type
isReplyDeleted?
optional isReplyDeleted: boolean;
Defined in: packages/sdk/src/indexer/api.ts:66
Whether to return only deleted replies or only undeleted replies. If omitted it will return both deleted and undeleted replies.
mode?
optional mode: IndexerAPICommentListModeSchemaType;
Defined in: packages/sdk/src/indexer/api.ts:61
The mode to fetch comments in by default it returns only the first level of comments. If flat is used it will return all comments sorted by timestamp in descending order.
Default
"nested"
retries?
optional retries: number;
Defined in: packages/sdk/src/indexer/api.ts:86
Number of times to retry the signing operation in case of failure.
Default
3
signal?
optional signal: AbortSignal;
Defined in: packages/sdk/src/indexer/api.ts:80
The signal to abort the request
viewer?
optional viewer: Hex;
Defined in: packages/sdk/src/indexer/api.ts:54
The viewer's address. This is useful when the content moderation is enabled on the indexer.