UNPKG

@lunch-money/ethereum-to-lunch-money

Version:

A wrapper around Ethereum APIs for enabling Lunch Money to gather information about a user's wallet.

35 lines (34 loc) 1.12 kB
import type { ProviderInfo, EthereumWalletClient } from './client.js'; export interface EthereumIntegrationType { initialized: boolean; walletClient: EthereumWalletClient; serviceProviderInfo: ProviderInfo[]; walletProviderInfo: ProviderInfo[]; [key: string]: unknown; } export interface INTEGRATIONS { ethereum: EthereumIntegrationType; [key: string]: unknown; } declare class EthereumInitializationService { private integrations; private logDebug; private initialized; private ethereumIntegration; constructor(integrations: INTEGRATIONS, logDebug: (message: string) => void); initialize(): Promise<EthereumIntegrationType>; private validateAPIKeys; private processResults; private handleError; private testProvider; private testApiKey; private getCleanErrorMessage; private maskKey; private warnAboutLegacyKeys; private getPrivateProviders; private getWalletTokenApiKeyTestInfo; private handleMoralisResponse; private handleEtherscanResponse; private getErrorMessage; } export default EthereumInitializationService;