src/index.js
function Eth(cprovider, options) {
  if (!(this instanceof Eth)) { throw new Error('[ethjs] the Eth object requires you construct it with the "new" flag (i.e. `const eth = new Eth(...);`).'); }
  const self = this;
  self.options = options || {};
  const query = new EthQuery(cprovider, self.options.query);
  Object.keys(Object.getPrototypeOf(query)).forEach((methodName) => {
    self[methodName] = (...args) => query[methodName].apply(query, args);
  });
  self.filter = new EthFilter(query, self.options.query);
  self.contract = new EthContract(query, self.options.query);
  self.currentProvider = query.rpc.currentProvider;
  self.setProvider = query.setProvider;
  self.getTransactionSuccess = getTransactionSuccess(self);
}
function Eth(cprovider, options) {
  if (!(this instanceof Eth)) { throw new Error('[ethjs] the Eth object requires you construct it with the "new" flag (i.e. `const eth = new Eth(...);`).'); }
  const self = this;
  self.options = options || {};
  const query = new EthQuery(cprovider, self.options.query);
  Object.keys(Object.getPrototypeOf(query)).forEach((methodName) => {
    self[methodName] = (...args) => query[methodName].apply(query, args);
  });
  self.filter = new EthFilter(query, self.options.query);
  self.contract = new EthContract(query, self.options.query);
  self.currentProvider = query.rpc.currentProvider;
  self.setProvider = query.setProvider;
  self.getTransactionSuccess = getTransactionSuccess(self);
}
function Eth ( cprovider , options ) { if ( ! ( this instanceof Eth ) ) { throw new Error ( '[ethjs] the Eth object requires you construct it with the "new" flag (i.e. `const eth = new Eth(...);`).' ) ; } const self = this ; self . options = options || { } ; const query = new EthQuery ( cprovider , self . options . query ) ; Object . keys ( Object . getPrototypeOf ( query ) ) . forEach ( ( methodName ) => { self [ methodName ] = ( ... args ) => query [ methodName ] . apply ( query , args ) ; } ) ; self . filter = new EthFilter ( query , self . options . query ) ; self . contract = new EthContract ( query , self . options . query ) ; self . currentProvider = query . rpc . currentProvider ; self . setProvider = query . setProvider ; self . getTransactionSuccess = getTransactionSuccess ( self ) ; }
Returns the ethjs Eth instance.

@method Eth
@param {Object} cprovider the web3 standard provider object
@param {Object} options the Eth options object
@returns {Object} eth Eth object instance
@throws if the new flag is not used in construction
Returns the ethjs Eth instance .