UNPKG

@fairmint/canton-node-sdk

Version:
39 lines 2 kB
import { NetworkType, ProviderType, ClientConfig } from '../types'; export interface EnvLoaderOptions { currentNetwork?: NetworkType; currentProvider?: ProviderType; } /** Singleton class for managing environment variables and configuration */ export declare class EnvLoader { private static instance; private env; private options; private constructor(); static getInstance(options?: EnvLoaderOptions): EnvLoader; static resetInstance(): void; /** * Get configuration for a specific API type from environment variables * @param apiType The API type to get configuration for * @param options Optional network and provider to use instead of reading from env * @returns ClientConfig with only the specified API configured */ static getConfig(apiType: string, options?: { network?: NetworkType; provider?: ProviderType; }): ClientConfig; getNodeEnv(): 'development' | 'production' | 'test'; getCurrentNetwork(): NetworkType; getCurrentProvider(): ProviderType; getApiUri(apiType: string, network?: NetworkType, provider?: ProviderType): string | undefined; getApiClientId(apiType: string, network?: NetworkType, provider?: ProviderType): string | undefined; getApiClientSecret(apiType: string, network?: NetworkType, provider?: ProviderType): string | undefined; getApiUsername(apiType: string, network?: NetworkType, provider?: ProviderType): string | undefined; getApiPassword(apiType: string, network?: NetworkType, provider?: ProviderType): string | undefined; getAuthUrl(network?: NetworkType, provider?: ProviderType): string; getPartyId(network?: NetworkType, provider?: ProviderType): string; getUserId(network?: NetworkType, provider?: ProviderType): string | undefined; getDatabaseUrl(network?: NetworkType): string; getManagedParties(network?: NetworkType, provider?: ProviderType): string[]; private loadApiConfig; } //# sourceMappingURL=EnvLoader.d.ts.map