/** Configuration for teleport behavior including expiration, retry attempts, and flood delay. */ export interface TeleportConfig { /** Max teleport retry attempts (default: 3). */ attempts?: number; /** Teleport data expiration in seconds (default: 300). */ expiration?: number; /** Delay when teleport is flooded in seconds (default: 5). */ flood_delay?: number; /** Delay between retries in seconds (default: 1). */ retry_delay?: number; } /** Configures teleport behavior (expiration, retry, flood delay). */ export declare function configureTeleport(config: TeleportConfig): void; /** Configures the secret used for teleport hash verification. */ export declare function configureTeleportSecret(secret: string): void; /** Reasons why a teleport may be considered invalid. */ export declare enum TeleportReason { TeleportInvalidData = 0, TeleportInvalidHash = 1, TeleportOldHash = 2 } /** Defines the structure for teleport data that can be serialized and sent with a teleport. */ export interface PossibleTeleportData { /** A hash value used to verify the integrity of the teleport data. */ hash: string; /** A timestamp indicating when the teleport data was generated. */ stamp: number; } /** * Serializes teleport data into a TeleportOptions object, adding a hash and timestamp for security. * * @param data - The teleport data to serialize. It should not include `hash` or `stamp`. * @returns A TeleportOptions object with serialized data, hash, and timestamp. */ export declare function serializeTeleportData(data: Omit): TeleportOptions; /** * Validates the teleport data received by a player upon joining a game instance. * * @param player - The player whose teleport data needs to be validated. * @param logInvalid - Whether it should log invalid teleports. * @returns An object indicating the success of the validation and the validity of the hash and * expiration status. */ export declare function isValidTeleport(player: Player, logInvalid?: boolean): { format?: string; success: boolean; unexpired?: boolean; validData?: boolean; validHash?: boolean; }; /** * Teleports a group of players to a specified place, retrying upon failure. * * @param placeId - The ID of the target place. * @param players - An array of players to teleport. * @param options - Optional TeleportOptions to include with the teleport request. * @returns A promise resolving to a tuple indicating success and the result of the teleport * attempt. */ export declare function teleport(placeId: number, players: Array, options?: TeleportOptions): Promise<[success: false, result: unknown] | [success: true, result: TeleportAsyncResult]>;