const baseApiUrl = "https://api.rootdata.com/open"; export const searchURL = `${baseApiUrl}/ser_inv`; export const projectQueryURL = `${baseApiUrl}/get_item`; /** * Search Data: * - id (number): Unique identifier of the project or organization. * - type (number): Type of entity. 1 for project, 2 for organization. * - name (string): Name of the project or organization. * - logo (string): URL of the logo image. * - introduce (string): Brief introduction or description of the project or organization. * - rootdataurl (string): The corresponding RootData link for the project or organization. */ export interface SearchData { id: number; type: number; name: string; logo: string; introduce: string; rootdataurl: string; } export interface SearchResponse { data: SearchData[]; result: number; message?: string; } /** * Request Parameters: * - project_id (number, optional): The unique identifier of the project. If both `project_id` and `contract_address` are provided, `project_id` will take precedence. * - include_team (boolean, optional): Whether to include team member information; defaults to false. * - include_investors (boolean, optional): Whether to include investor information. Defaults to false. * - contract_address (string, optional): The Ethereum contract address. This parameter is optional, and will be used only if the `project_id` is not provided or applicable. Please note that if both `project_id` and `contract_address` are present, `project_id` has priority. */ export interface ProjectQueryRequest { project_id?: number; include_team?: boolean; include_investors?: boolean; contract_address?: string; } type SimilarProject = { project_id: number; brief_description: string; logo: string; project_name: string; }; type SocialMedia = { website?: string; discord?: string; gitbook?: string; X?: string; medium?: string; }; export interface ProjectQueryResponse { data?: ProjectData; message?: string; result: number; } interface Investor { name: string; logo: string; } /** * Represents detailed project data returned from a project query. * * @property project_id - Project ID (number) * @property project_name - Project name (string) * @property logo - URL of the Project logo (string) * @property token_symbol - Token symbol (string, optional) * @property establishment_date - Date of establishment (string) * @property one_liner - One sentence introduction (string) * @property description - Project description (string) * @property tags - Project tags (Array of tag names) * @property social_media - Social media links (SocialMedia object) * @property ecosystem - Ecosystem to which the project belongs (array of ecosystem names, no distinction between testnet and mainnet, optional) * @property investors - Investors' information (array of Investor objects, optional) * @property total_funding - Total funding (number, optional) * @property rootdataurl - RootData link for the project (string) * @property contract_address - Token contract address (string, optional) * @property fully_diluted_market_cap - Fully diluted market capitalization (string, optional) * @property market_cap - Market value in circulation (string, optional) * @property price - Price (string, optional) * @property event - Major project events (array of event objects, optional, PRO feature) * @property similar_project - Similar projects (array of SimilarProject objects, optional) * @property reports - Project news (array of report objects, optional, PRO feature) * @property team_members - Team members information (array of team member objects, optional, PRO feature) * @property token_launch_time - Token launch time, format: yyyy-MM (string, optional) * @property support_exchanges - Supported exchanges (array of exchange objects, optional) */ export interface ProjectData { project_id: number; project_name: string; logo: string; token_symbol?: string; establishment_date: string; one_liner: string; description: string; tags: string[]; social_media: SocialMedia; ecosystem?: string[]; investors?: Investor[]; total_funding?: number; rootdataurl: string; contract_address?: string; fully_diluted_market_cap?: string; market_cap?: string; price?: string; event?: { title: string; date: string; description?: string }[]; similar_project?: SimilarProject[]; reports?: { title: string; date: string; link: string }[]; team_members?: { name: string; role: string; photo_url?: string }[]; token_launch_time?: string; support_exchanges?: { name: string; logo: string }[]; }