p-sdk-wallet
Version:
A comprehensive wallet SDK for React Native (pwc), supporting multi-chain and multi-account features.
47 lines (46 loc) • 1.5 kB
TypeScript
/**
* Environment configuration for PWC Wallet SDK
* Centralizes all environment variables and provides type-safe access
*/
export interface EnvironmentConfig {
/** RPC URLs for different chains */
rpcUrls: {
[chainId: string]: string;
};
/** Explorer URLs for different chains */
explorerUrls: {
[chainId: string]: string;
};
/** Gas configuration overrides */
gas: {
maxFeePerGas?: bigint;
maxPriorityFeePerGas?: bigint;
gasLimit?: number;
};
/** Network configuration */
network: {
defaultChainId: string;
supportedChains: string[];
};
/** Feature flags */
features: {
enableEIP1559: boolean;
enableBatchProcessing: boolean;
enableGasEstimation: boolean;
};
}
/**
* Get environment configuration with defaults
*/
export declare function getEnvironmentConfig(): EnvironmentConfig;
/**
* Validate environment configuration
*/
export declare function validateEnvironmentConfig(config: EnvironmentConfig): string[];
/**
* Get environment variable with type conversion
*/
export declare function getEnvVar(key: string, defaultValue?: string): string | undefined;
export declare function getEnvVarNumber(key: string, defaultValue?: number): number | undefined;
export declare function getEnvVarBigInt(key: string, defaultValue?: bigint): bigint | undefined;
export declare function getEnvVarBoolean(key: string, defaultValue?: boolean): boolean | undefined;