@lit-protocol/e2e
Version:
Lit Protocol E2E testing package for running comprehensive integration tests
44 lines (43 loc) • 1.77 kB
TypeScript
/**
* Health Check Initialization Module
*
* This module provides a lightweight initialization for health checks that minimizes
* chain interactions. Unlike the full e2e init, this only creates a single test person
* using EOA authentication and reuses it across all endpoint tests.
*
* Design Philosophy:
* - Minimal chain interactions (only what's necessary for testing endpoints)
* - Single person setup to reduce overhead
* - Fast execution for frequent health monitoring
* - Reusable auth context across all tests
*/
import { z } from 'zod';
import { PKPData, AuthData } from '@lit-protocol/schemas';
import { AuthContext, AuthManagerInstance, LitClientInstance, ViemAccount } from '../types';
declare const SupportedNetworkSchema: z.ZodEnum<["naga-dev", "naga-test"]>;
type SupportedNetwork = z.infer<typeof SupportedNetworkSchema>;
declare const LogLevelSchema: z.ZodEnum<["silent", "info", "debug"]>;
type LogLevel = z.infer<typeof LogLevelSchema>;
/**
* Initialize the health check environment with minimal setup
*
* This function:
* 1. Creates a single test account (Alice)
* 2. Funds it minimally
* 3. Creates one PKP for testing
* 4. Sets up auth context for endpoint testing
*
* @param network - The network to run health checks on (naga-dev or naga-test)
* @param logLevel - Logging level for the health check run
* @returns Initialized components needed for health checks
*/
export declare const initHealthCheck: (network?: SupportedNetwork, logLevel?: LogLevel) => Promise<{
litClient: LitClientInstance;
authManager: AuthManagerInstance;
aliceViemAccount: ViemAccount;
aliceViemAccountAuthData: AuthData;
aliceViemAccountPkp: PKPData;
aliceEoaAuthContext: AuthContext;
networkName: string;
}>;
export {};