decent-sdk
Version:
SDK for the Decent API
20 lines (19 loc) • 810 B
TypeScript
import { Dao } from '../../core/types/Dao';
import { Address } from '../../core/types/Common';
import { SupportedChainId } from '../../core/types/Chains';
import { QueryReturn, TanstackQueryOptions } from '../types';
type FetchDaoOptions = {
chainId?: SupportedChainId;
address?: Address;
};
type FetchDaoParams = FetchDaoOptions & TanstackQueryOptions;
/**
* React hook to fetch a specific DAO.
*
* @param {FetchDaoParams} 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<Dao>} Object with { data: Dao, isLoading: boolean, error: Error | null }
*/
export declare const useFetchDao: (params: FetchDaoParams) => QueryReturn<Dao>;
export {};