@ecp.eth/sdk / indexer / FetchCommentOptions
Type Alias: FetchCommentOptions
type FetchCommentOptions = {
apiUrl?: string;
chainId: number | number[];
commentId: `0x${string}`;
commentType?: number;
mode?: "flat" | "nested";
retries?: number;
signal?: AbortSignal;
viewer?: `0x${string}`;
};
Defined in: packages/sdk/src/indexer/api.ts:72
Type declaration
apiUrl?
optional apiUrl: string;
URL on which /api/comments endpoint will be called
Default
"https://api.ethcomments.xyz"
chainId
chainId: number | number[];
Filter comments by chain ID(s)
commentId
commentId: `0x${string}` = HexSchema;
The ID of the comment to fetch
commentType?
optional commentType: number;
Filter comments by comment type
mode?
optional mode: "flat" | "nested";
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;
Number of times to retry the signing operation in case of failure.
Default
3
signal?
optional signal: AbortSignal;
The signal to abort the request
viewer?
optional viewer: `0x${string}`;
The viewer's address. This is useful when the content moderation is enabled on the indexer.