UNPKG

decent-sdk

Version:

SDK for the Decent API

22 lines (21 loc) 1 kB
import { SupportedChainId } from '../../core/types/Chains'; import { Proposal } from '../../core/types/Proposal'; import { Address } from '../../core/types/Common'; import { QueryReturn, TanstackQueryOptions } from '../types'; type FetchProposalOptions = { chainId?: SupportedChainId; address?: Address; slug?: string; }; type FetchProposalParams = FetchProposalOptions & TanstackQueryOptions; /** * React hook to fetch a specific proposal by its slug. * * @param {FetchProposalParams} params - Object containing chainId, address, and slug. * @param {SupportedChainId} params.chainId - The chain ID of the blockchain * @param {Address} params.address - The contract address of the proposal * @param {string} params.slug - Unique identifier for the specific proposal * @returns {QueryReturn<Proposal>} Object with { data: Proposal, isLoading: boolean, error: Error | null } */ export declare const useFetchProposal: (params: FetchProposalParams) => QueryReturn<Proposal>; export {};