import type { ChainMetadata } from '@hyperlane-xyz/sdk/metadata/chainMetadataTypes'; import type { WarpRouteDeployConfig } from '@hyperlane-xyz/sdk/token/types'; import type { ChainMap, ChainName } from '@hyperlane-xyz/sdk/types'; import type { WarpCoreConfig } from '@hyperlane-xyz/sdk/warp/types'; import type { Logger } from 'pino'; import type { AddWarpRouteConfigOptions, ChainAddresses, MaybePromise, UpdateChainParams, WarpDeployConfigMap, WarpRouteFilterParams, WarpRouteId } from '../types.js'; import { WarpRouteConfigMap } from '../types.js'; import type { IRegistry, RegistryContent, RegistryType } from './IRegistry.js'; export declare abstract class BaseRegistry implements IRegistry { abstract type: RegistryType; readonly uri: string; protected readonly logger: Logger; protected listContentCache?: RegistryContent; protected metadataCache?: ChainMap; protected isMetadataCacheFull: boolean; protected addressCache?: ChainMap; protected isAddressCacheFull: boolean; protected warpRouteCache?: WarpRouteConfigMap; protected isWarpRouteCacheFull: boolean; constructor({ uri, logger }: { uri: string; logger?: Logger; }); getUri(itemPath?: string): string; protected getChainsPath(): string; protected getWarpRoutesPath(): string; /** * Generates a warp route ID from a warp core config. * * The function handles three main cases: * 1. If a warpRouteId is provided in options, it uses that directly * 2. If there is exactly one synthetic token, it uses that token's chain and symbol * 3. Otherwise, it uses all chains and requires a single symbol (either from options or tokens) */ static warpRouteConfigToId(config: WarpCoreConfig, options?: AddWarpRouteConfigOptions): WarpRouteId; protected getWarpRouteCoreConfigPath(config: WarpCoreConfig, options?: AddWarpRouteConfigOptions): string; /** * Generates a warp route ID based on the deploy config and options. * * @param config The warp route deployment config * @param options Additional config options for the warp route * @returns A string ID for the warp route * * If a warpRouteId is provided in options, use it directly. * Otherwise, the method attempts to generate an ID based on 1 synthetic chain, or defaults to all chains. */ static warpDeployConfigToId(config: WarpRouteDeployConfig, options: AddWarpRouteConfigOptions): string; protected getWarpRouteDeployConfigPath(config: WarpRouteDeployConfig, options: AddWarpRouteConfigOptions): string; abstract listRegistryContent(): MaybePromise; abstract getChains(): MaybePromise>; abstract getMetadata(): MaybePromise>; abstract getChainMetadata(chainName: ChainName): MaybePromise; abstract getAddresses(): MaybePromise>; abstract getChainAddresses(chainName: ChainName): MaybePromise; getChainLogoUri(chainName: ChainName): Promise; abstract addChain(chain: UpdateChainParams): MaybePromise; abstract updateChain(chain: UpdateChainParams): MaybePromise; abstract removeChain(chain: ChainName): MaybePromise; abstract getWarpRoute(routeId: string): MaybePromise; abstract getWarpRoutes(filter?: WarpRouteFilterParams): MaybePromise; abstract addWarpRoute(config: WarpCoreConfig): MaybePromise; abstract addWarpRouteConfig(warpConfig: WarpRouteDeployConfig, options: AddWarpRouteConfigOptions): MaybePromise; abstract getWarpDeployConfig(routeId: string): MaybePromise; abstract getWarpDeployConfigs(filter?: WarpRouteFilterParams): MaybePromise; merge(otherRegistry: IRegistry): IRegistry; }