@berrywallet/core
Version: 
Berrywallet main Core for work with common cryptocurrencies like Bitcoin, Ethereum, Dash, Litecoin
26 lines (25 loc) • 1.5 kB
TypeScript
import BigNumber from 'bignumber.js';
import { AxiosInstance } from 'axios';
import { Coin, Wallet } from '../../';
import { TAdapterOption, Infura } from '../api';
import { NetworkClient, IEthereumNetworkClient, GasPrice } from './network-client';
import { ITrackerClient } from './tracker';
export declare class InfuraNetworkClient extends NetworkClient implements IEthereumNetworkClient {
    protected client: AxiosInstance;
    protected etherchainClient: AxiosInstance;
    protected etherscanClient: any;
    protected trackerClient: ITrackerClient;
    constructor(coin: Coin.CoinInterface, options: TAdapterOption);
    protected sendRequest(method: string, params?: any[], isPost?: boolean): Promise<Infura.JsonRPCResponse>;
    getTx(txid: string): Promise<Wallet.Entity.EtherTransaction | undefined>;
    getTxReceipt(txid: string): Promise<Infura.TransactionReceipt | undefined>;
    checkAndMapTxReceipt(tx: Wallet.Entity.EtherTransaction): Promise<Wallet.Entity.EtherTransaction>;
    getBlock(blockHash: string): Promise<Wallet.Entity.Block>;
    getBlockByNumber(blockNumber: number | string): Promise<Wallet.Entity.Block | undefined>;
    getGasPrice(): Promise<GasPrice>;
    estimateGas(address: Coin.Key.Address, value: BigNumber): Promise<BigNumber>;
    broadCastTransaction(transaction: Coin.Transaction.Transaction): Promise<string>;
    getAddressTxs(address: string): Promise<Wallet.Entity.EtherTransaction[]>;
    getTracker(): ITrackerClient;
    destruct(): void;
}