decent-sdk
Version:
SDK for the Decent API
21 lines (20 loc) • 907 B
TypeScript
import { SupportedChainId } from '../../core/types/Chains';
import { Proposal } from '../../core/types/Proposal';
import { Address } from '../../core/types/Common';
import { QueryReturn } from '../types';
type FetchProposalParams = {
chainId?: SupportedChainId;
address?: Address;
slug?: string;
};
/**
* 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 {};