@magiceden/magiceden-sdk
Version:
A TypeScript SDK for interacting with Magic Eden's API across multiple chains.
28 lines (27 loc) • 750 B
TypeScript
import { ChainType } from '../../types';
import { ApiManager, ApiOptions } from '../utils/apiManager';
/**
* Common interface for all API clients
*/
export interface ApiClient {
/**
* Get the API client for the given chain
*/
getBaseUrl(): string;
}
export interface ApiClientOptions extends ApiOptions {
chain: ChainType;
}
/**
* Base class for API clients with common implementation
* T is the type of operations enum used by the specific API client
*/
export declare abstract class BaseApiClient implements ApiClient {
readonly api: ApiManager;
readonly chain: ChainType;
constructor(options: ApiClientOptions);
/**
* Get the base URL for the API client
*/
abstract getBaseUrl(): string;
}