import Web3 from 'web3'; import { Composable, Options, Contracts } from './types'; import { TransactionOptions } from './types/options'; import ErrorWrapper from './errors/ErrorWrapper'; export default abstract class extends ErrorWrapper implements Composable { private _contractAddresses; private _composed; private _currentNetworkId; protected _contracts: Contracts; blockchainApi: Web3; constructor(blockchainApi: Web3 | any, options?: Options); /** * Detects current network and intantiates the contracts based on that network or in the addresses provided in the constructor. * * @throws NO_ADDRESSES_PROVIDED if the network is not RSK Mainnet or RSK Testnet and the options parameter was not provided in the constructor - KB005. */ private _detectNetwork; protected getTxGas(contractMethod: any, sender?: string): Promise; protected getTxOptions(contractMethod: any, customOptions?: TransactionOptions): Promise; protected estimateGasAndSendTransaction(contractMethod: any, customOptions?: TransactionOptions): Promise; /** * Detects the current network and instances the contracts. * * @throws NO_ADDRESSES_PROVIDED if the network is not RSK Mainnet or RSK Testnet and the options parameter was not provided in the constructor - KB005. */ compose(): Promise; /** * Returns the current networkId * * @throws LIBRARY_NOT_COMPOSED if the library was not previously composed with compose method - KB004. */ get currentNetworkId(): number; }