UNPKG

hector-rubic-sdk

Version:
34 lines (33 loc) 1.21 kB
import { BlockchainName } from '../../core/blockchain/models/blockchain-name'; import BigNumber from 'bignumber.js'; import { HttpClient } from '../models/http-client'; export declare class GasPriceApi { private readonly httpClient; /** * Gas price request interval in seconds. */ private static readonly requestInterval; constructor(httpClient: HttpClient); /** * Gas price in Wei for selected blockchain. * @param blockchain Blockchain to get gas price from. * @return Promise<BigNumber> Average gas price in Wei. */ getGasPrice(blockchain: BlockchainName): Promise<string>; /** * Gas price in Eth units for selected blockchain. * @param blockchain Blockchain to get gas price from. * @return Promise<BigNumber> Average gas price in Eth units. */ getGasPriceInEthUnits(blockchain: BlockchainName): Promise<BigNumber>; /** * Gets Ethereum gas price from different APIs, sorted by priority. * @return Promise<BigNumber> Average gas price in Wei. */ private fetchEthGas; /** * Gets Avalanche gas price. * @return Promise<BigNumber> Average gas price in Wei. */ private fetchGas; }