decent-sdk
Version:
SDK for the Decent API
20 lines (19 loc) • 896 B
TypeScript
import { SupportedChainId } from '../../core/types/Chains';
import { Proposal } from '../../core/types/Proposal';
import { Address } from '../../core/types/Common';
import { QueryReturn, TanstackQueryOptions } from '../types';
type FetchProposalsOptions = {
chainId?: SupportedChainId;
address?: Address;
};
type FetchProposalsParams = FetchProposalsOptions & TanstackQueryOptions;
/**
* React hook to fetch all proposals for a specific DAO.
*
* @param {FetchProposalsParams} params - Object containing chainId and address.
* @param {SupportedChainId} params.chainId - The EIP155 chain ID
* @param {Address} params.address - The contract address of the DAO
* @returns {QueryReturn<Proposal[]>} Object with { data: Proposal[], isLoading: boolean, error: Error | null }
*/
export declare const useFetchProposals: (params: FetchProposalsParams) => QueryReturn<Proposal[]>;
export {};