/******************************************************************************
*
* (C) 2022 AhnLab Blockchain Company, Inc. All rights reserved.
* Any part of this source code can not be copied with any method without
* prior written permission from the author or authorized person.
*
******************************************************************************/
///
import EventEmitter from 'events';
import { ethers } from 'ethers';
import { NetworkModel, TxModel } from '../../main/transactions/interface';
export declare class ProviderConnectionManager extends EventEmitter {
connection: any;
query: any;
ethQuery: any;
ethersProvider: ethers.providers.Web3Provider;
connected: any;
web3: any;
chainId: any;
caver: any;
_providerProxy: any;
_blockTrackerProxy: any;
_provider: any;
_blockTracker: any;
web3Alchemy: any;
constructor();
initialize({ rpcUrl, chainId }: {
rpcUrl: any;
chainId: any;
}): void;
_setNetworkClient({ networkMiddleware, blockTracker }: {
networkMiddleware: any;
blockTracker: any;
}): void;
_setProviderAndBlockTracker({ provider, blockTracker }: {
provider: any;
blockTracker: any;
}): void;
getProviderAndBlockTracker(): {
provider: any;
blockTracker: any;
};
connect(network: NetworkModel, accToken?: string): Promise;
getGasPrice(): Promise;
broadcastTx(rawTx: string, txId: string | undefined, txModel: TxModel | undefined): Promise;
getTransactionCount(address: string): Promise;
getLatestBlock(): Promise;
getBalance(address: string): Promise;
getCode(to: string): Promise;
estimateGas(txMeta: any): Promise;
getTransactionReceipt(txHash: string): Promise;
getKlaytnTransactionReceipt(txHash: string): Promise;
getTokenDecimal(contractAddress: string): Promise;
getTokenSymbol(contractAddress: string): Promise;
getTokenBalance(contractAddress: string, ethAddress: string): Promise;
getTokenName(contractAddress: string): Promise;
getKlaytnTokenBalance(contractAddress: string, ethAddress: string): Promise;
}