/** * The latest version of the AMNet API this library supports */ declare const AMNET_API_VERSION = 1; interface AMCardInRequest { cardId: string; } interface AMServerInfoResponse { serverAddress: string; serverName: string; apiVersion: number; gameId: string; } /** * Performs the card-in request to the specified server * @param serverAddress The origin address of the server to perform the request against * @param request The card-in request to send * @param signal The abort signal to use for the request */ declare function performCardIn(serverAddress: string, request: AMCardInRequest, signal: AbortSignal): Promise; /** * Attempts to connect to the specified server and fetch its info * @param serverAddress The origin address of the server to connect to * @param abort The abort signal to use for the request (for cancellation) */ declare function fetchServerInfo(serverAddress: string, abort: AbortSignal): Promise; declare const CARD_ID_REGEX: RegExp; declare function generateCardNumber(): string; /** * Validates the provided card id by known parameters * @param id The card id to validate */ declare function validateCardId(id: string): boolean; declare enum GameIds { /** * Initial D The Arcade */ IDAC = "SDGT", /** * Chunithm (Paradise Lost) */ Chuni = "SDBT", /** * Chunithm NEW onwards */ Chusan = "SDHD", ONGEKI = "SDDT", maimaiDX = "SDEZ", DivaFT = "SBZV" } export { type AMCardInRequest, AMNET_API_VERSION, type AMServerInfoResponse, CARD_ID_REGEX, GameIds, fetchServerInfo, generateCardNumber, performCardIn, validateCardId };