import type { Logger } from 'pino';
import type { ChainMap, ChainMetadata, ChainName, WarpCoreConfig } from '@hyperlane-xyz/sdk';
import { ChainAddresses, WarpRouteConfigMap } from '../types.js';
import { BaseRegistry } from './BaseRegistry.js';
import { ChainFiles, IRegistry, RegistryContent, RegistryType, UpdateChainParams, WarpRouteFilterParams } from './IRegistry.js';
export interface GithubRegistryOptions {
    uri?: string;
    proxyUrl?: string;
    branch?: string;
    authToken?: string;
    logger?: Logger;
}
type GithubRateResponse = {
    resources: {
        core: {
            limit: number;
            used: number;
            remaining: number;
            reset: number;
        };
    };
};
export declare const GITHUB_API_URL = "https://api.github.com";
/**
 * A registry that uses a github repository as its data source.
 * Reads are performed via the github API and github's raw content URLs.
 * Writes are not yet supported (TODO)
 */
export declare class GithubRegistry extends BaseRegistry implements IRegistry {
    readonly type = RegistryType.Github;
    readonly url: URL;
    readonly branch: string;
    readonly repoOwner: string;
    readonly repoName: string;
    readonly proxyUrl: string | undefined;
    constructor(options?: GithubRegistryOptions);
    getUri(itemPath?: string): string;
    listRegistryContent(): Promise<RegistryContent>;
    getChains(): Promise<Array<ChainName>>;
    getMetadata(): Promise<ChainMap<ChainMetadata>>;
    getChainMetadata(chainName: ChainName): Promise<ChainMetadata | null>;
    getAddresses(): Promise<ChainMap<ChainAddresses>>;
    getChainAddresses(chainName: ChainName): Promise<ChainAddresses | null>;
    addChain(_chains: UpdateChainParams): Promise<void>;
    updateChain(_chains: UpdateChainParams): Promise<void>;
    removeChain(_chains: ChainName): Promise<void>;
    getWarpRoute(routeId: string): Promise<WarpCoreConfig | null>;
    getWarpRoutes(filter?: WarpRouteFilterParams): Promise<WarpRouteConfigMap>;
    addWarpRoute(_config: WarpCoreConfig): Promise<void>;
    getApiUrl(): Promise<string>;
    getApiRateLimit(): Promise<GithubRateResponse['resources']['core']>;
    protected getRawContentUrl(path: string): string;
    protected fetchChainFile<T>(fileName: keyof ChainFiles, chainName: ChainName): Promise<T | null>;
    protected fetchYamlFiles<T>(urls: string[]): Promise<T[]>;
    protected fetchYamlFile<T>(url: string): Promise<T>;
    protected fetch(url: string): Promise<Response>;
}
export {};
