import type { NetworkClient } from '@sudobility/types'; export interface IndexerGraphQLConfig { indexerBackendUrl: string; networkClient: NetworkClient; } export interface GraphQLResponse { data?: T; errors?: Array<{ message: string; locations?: Array<{ line: number; column: number; }>; path?: string[]; }>; } export interface IndexerMail { id: string; chainId: number; contractAddress: string; from: string; to: string; subject: string; body: string; timestamp: string; blockNumber: string; transactionHash: string; logIndex: number; gasUsed?: string; gasPrice?: string; } export interface IndexerPreparedMail { id: string; chainId: number; contractAddress: string; from: string; to: string; mailId: string; timestamp: string; blockNumber: string; transactionHash: string; logIndex: number; gasUsed?: string; gasPrice?: string; } export interface IndexerDelegation { id: string; chainId: number; contractAddress: string; delegator: string; delegate: string; isActive: boolean; timestamp: string; blockNumber: string; transactionHash: string; logIndex: number; gasUsed?: string; gasPrice?: string; } export interface IndexerUserStatistics { id: string; chainId: number; address: string; mailsSent: number; mailsReceived: number; preparedMailsSent: number; preparedMailsReceived: number; delegationsGiven: number; delegationsReceived: number; totalGasUsed: string; averageGasPrice: string; firstMailTimestamp?: string; lastMailTimestamp?: string; } export interface IndexerChainStatistics { id: string; totalChains: number; totalMails: number; totalPreparedMails: number; totalDelegations: number; totalUsers: number; totalGasUsed: string; averageGasPrice: string; } export interface IndexerEventLog { id: string; chainId: number; eventName: string; contractAddress: string; eventData: string; timestamp: string; blockNumber: string; transactionHash: string; logIndex: number; } export interface PaginationInput { first?: number; skip?: number; orderBy?: string; orderDirection?: 'asc' | 'desc'; } export interface WhereInput { chainId?: number; chainId_in?: number[]; from?: string; to?: string; address?: string; contractAddress?: string; timestamp_gte?: string; timestamp_lte?: string; isActive?: boolean; } export declare class IndexerGraphQLHelper { private config; private client; constructor(config: IndexerGraphQLConfig); query(query: string, variables?: Record): Promise; getMails(where?: WhereInput, pagination?: PaginationInput): Promise<{ mails: { items: IndexerMail[]; }; }>; getPreparedMails(where?: WhereInput, pagination?: PaginationInput): Promise<{ preparedMails: { items: IndexerPreparedMail[]; }; }>; getDelegations(where?: WhereInput, pagination?: PaginationInput): Promise<{ delegations: { items: IndexerDelegation[]; }; }>; getUserStatistics(address: string, chainId?: number): Promise<{ userStatistics: { items: IndexerUserStatistics[]; }; }>; getChainStatistics(): Promise<{ chainStatistics: IndexerChainStatistics; }>; getEventLogs(where?: WhereInput, pagination?: PaginationInput): Promise<{ eventLogs: { items: IndexerEventLog[]; }; }>; getMailsFromAddress(fromAddress: string, chainId?: number, pagination?: PaginationInput): Promise; getMailsToAddress(toAddress: string, chainId?: number, pagination?: PaginationInput): Promise; getActiveDelegationsFromAddress(delegatorAddress: string, chainId?: number): Promise; getActiveDelegationsToAddress(delegateAddress: string, chainId?: number): Promise; } export declare const createIndexerGraphQLHelper: (indexerBackendUrl: string, networkClient: NetworkClient) => IndexerGraphQLHelper; //# sourceMappingURL=indexer-graphql.d.ts.map