import { Status } from '../pb/index.js'; import type { RelayReservation, ServerReservationStoreInit } from '../index.js'; import type { Limit } from '../pb/index.js'; import type { ComponentLogger, Metrics, PeerId } from '@libp2p/interface'; import type { PeerMap } from '@libp2p/peer-collections'; import type { Multiaddr } from '@multiformats/multiaddr'; export type ReservationStatus = Status.OK | Status.PERMISSION_DENIED | Status.RESERVATION_REFUSED; export interface ReservationStoreComponents { logger: ComponentLogger; metrics?: Metrics; } export declare class ReservationStore { readonly reservations: PeerMap; private readonly maxReservations; private readonly applyDefaultLimit; private readonly reservationTtl; private readonly defaultDurationLimit; private readonly defaultDataLimit; private readonly log; constructor(components: ReservationStoreComponents, init?: ServerReservationStoreInit); reserve(peer: PeerId, addr: Multiaddr, limit?: Limit): { status: ReservationStatus; expire?: number; }; removeReservation(peer: PeerId): void; get(peer: PeerId): RelayReservation | undefined; clear(): void; } //# sourceMappingURL=reservation-store.d.ts.map