decent-sdk
Version:
SDK for the Decent API
30 lines (29 loc) • 1.38 kB
TypeScript
import { Dao } from '../types/Dao';
import { User } from '../types/Api';
import { GetDaoParams, GetAllDaosFilterParams } from './common/params';
/**
* Fetches information for a specific DAO.
* @param params - The parameters for fetching DAO information.
* @param params.chainId - The ID of the chain.
* @param params.address - The address of the DAO.
* @param params.apiUrl - Optional API URL override.
* @returns {Promise<Dao>} A promise with the DAO information.
*/
export declare const getDao: (params: GetDaoParams) => Promise<Dao>;
/**
* Fetches all DAOs, optionally filtered by chain ID.
* @param params - The parameters for fetching all DAOs.
* @param params.chainId - Optional chain ID to filter by.
* @param params.apiUrl - Optional API URL override.
* @returns {Promise<Dao[]>} A promise with an array of DAOs.
*/
export declare const getAllDaos: (params?: GetAllDaosFilterParams) => Promise<Dao[]>;
/**
* Fetches the permissions for the current user within a specific DAO.
* @param params - The parameters for fetching DAO permissions.
* @param params.chainId - The ID of the chain.
* @param params.address - The address of the DAO.
* @param params.apiUrl - Optional API URL override.
* @returns {Promise<User>} A promise with the user's permissions in the DAO.
*/
export declare const getDaoPermissions: (params: GetDaoParams) => Promise<User>;