/** * Type definitions for dynamically generated API methods * These types provide TypeScript support for all API methods */ export type ApiCallback = (err: Error | null, result?: T) => void; type ApiMethodWithParams = (...args: unknown[]) => Promise | void; type ApiMethodNoParams = (callback?: ApiCallback) => Promise | void; type ApiMethodWith = (options: Record, callback?: ApiCallback) => Promise | void; type ApiMethodAsync = (...args: TParams) => Promise; type ApiMethodWithAsync = (options: Record) => Promise; /** * Type definitions for all API methods * This interface provides type safety for dynamically generated methods */ export interface ApiMethodSignatures { getAccounts(accounts: string[], callback?: ApiCallback): Promise | void; getAccountsAsync(accounts: string[]): Promise; getAccountsWith(options: { names: string[]; }, callback?: ApiCallback): Promise | void; getAccountsWithAsync(options: { names: string[]; }): Promise; getAccountHistory(account: string, from: number, limit: number, callback?: ApiCallback): Promise | void; getAccountHistoryAsync(account: string, from: number, limit: number): Promise; getAccountHistoryWith(options: { account: string; from: number; limit: number; }, callback?: ApiCallback): Promise | void; getAccountHistoryWithAsync(options: { account: string; from: number; limit: number; }): Promise; getDynamicGlobalProperties(callback?: ApiCallback): Promise | void; getDynamicGlobalPropertiesAsync(): Promise; getDynamicGlobalPropertiesWith(options: Record, callback?: ApiCallback): Promise | void; getDynamicGlobalPropertiesWithAsync(options: Record): Promise; getContent(author: string, permlink: string, callback?: ApiCallback): Promise | void; getContentAsync(author: string, permlink: string): Promise; getContentWith(options: { author: string; permlink: string; }, callback?: ApiCallback): Promise | void; getContentWithAsync(options: { author: string; permlink: string; }): Promise; getFollowers(following: string, startFollower: string, followType: string, limit: number, callback?: ApiCallback): Promise | void; getFollowersAsync(following: string, startFollower: string, followType: string, limit: number): Promise; getFollowersWith(options: { following: string; startFollower: string; followType: string; limit: number; }, callback?: ApiCallback): Promise | void; getFollowersWithAsync(options: { following: string; startFollower: string; followType: string; limit: number; }): Promise; getBlock(blockNum: number, callback?: ApiCallback): Promise | void; getBlockAsync(blockNum: number): Promise; getBlockWith(options: { blockNum: number; }, callback?: ApiCallback): Promise | void; getBlockWithAsync(options: { blockNum: number; }): Promise; getConfig(callback?: ApiCallback): Promise | void; getConfigAsync(): Promise; getConfigWith(options: Record, callback?: ApiCallback): Promise | void; getConfigWithAsync(options: Record): Promise; [methodName: string]: ApiMethodWithParams | ApiMethodNoParams | ApiMethodWith | ApiMethodAsync | ApiMethodWithAsync | unknown; } export {};