decent-sdk
Version:
SDK for the Decent API
21 lines (20 loc) • 905 B
TypeScript
import { SupportedChainId } from '../../core/types/Chains';
import { Comment } from '../../core/types/Discussion';
import { Address } from '../../core/types/Common';
import { QueryReturn } from '../types';
type FetchCommentsParams = {
chainId?: SupportedChainId;
address?: Address;
slug?: string;
};
/**
* React hook to fetch all comments for a specific proposal.
*
* @param {FetchCommentsParams} params - Object containing chainId, address, and slug.
* @param {SupportedChainId} params.chainId - The EIP155 chain ID
* @param {Address} params.address - The contract address of the proposal
* @param {string} params.slug - Unique identifier for the specific proposal
* @returns {QueryReturn<Comment[]>} Object with { data: Comment[], isLoading: boolean, error: Error | null }
*/
export declare const useFetchComments: (params: FetchCommentsParams) => QueryReturn<Comment[]>;
export {};