src/index.js
function SignerProvider(path, options) {
  if (!(this instanceof SignerProvider)) { throw new Error('[ethjs-provider-signer] the SignerProvider instance requires the "new" flag in order to function normally (e.g. `const eth = new Eth(new SignerProvider(...));`).'); }
  if (typeof options !== 'object') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'privateKey' property specified, you provided type ${typeof options}.`); }
  if (typeof options.signTransaction !== 'function') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'signTransaction' property specified, you provided type ${typeof options.privateKey} (e.g. 'const eth = new Eth(new SignerProvider("http://ropsten.infura.io", { privateKey: (account, cb) => cb(null, 'some private key') }));').`); }

  const self = this;
  self.options = Object.assign({
    provider: HTTPProvider,
  }, options);
  self.timeout = options.timeout || 0;
  self.provider = new self.options.provider(path, self.timeout); // eslint-disable-line
  self.rpc = new EthRPC(self.provider);
}
function SignerProvider(path, options) {
  if (!(this instanceof SignerProvider)) { throw new Error('[ethjs-provider-signer] the SignerProvider instance requires the "new" flag in order to function normally (e.g. `const eth = new Eth(new SignerProvider(...));`).'); }
  if (typeof options !== 'object') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'privateKey' property specified, you provided type ${typeof options}.`); }
  if (typeof options.signTransaction !== 'function') { throw new Error(`[ethjs-provider-signer] the SignerProvider requires an options object be provided with the 'signTransaction' property specified, you provided type ${typeof options.privateKey} (e.g. 'const eth = new Eth(new SignerProvider("http://ropsten.infura.io", { privateKey: (account, cb) => cb(null, 'some private key') }));').`); }

  const self = this;
  self.options = Object.assign({
    provider: HTTPProvider,
  }, options);
  self.timeout = options.timeout || 0;
  self.provider = new self.options.provider(path, self.timeout); // eslint-disable-line
  self.rpc = new EthRPC(self.provider);
}
function SignerProvider ( path , options ) { if ( ! ( this instanceof SignerProvider ) ) { throw new Error ( '[ethjs-provider-signer] the SignerProvider instance requires the "new" flag in order to function normally (e.g. `const eth = new Eth(new SignerProvider(...));`).' ) ; } if ( typeof options !== 'object' ) { throw new Error ( ` ${ typeof options } ` ) ; } if ( typeof options . signTransaction !== 'function' ) { throw new Error ( ` ${ typeof options . privateKey } ` ) ; } const self = this ; self . options = Object . assign ( { provider : HTTPProvider , } , options ) ; self . timeout = options . timeout || 0 ; self . provider = new self . options . provider ( path , self . timeout ) ; // eslint-disable-line self . rpc = new EthRPC ( self . provider ) ; }
Signer provider constructor

@method SignerProvider
@param {String} path the input data payload
@param {Object} options the send async callback
@returns {Object} provider instance
Signer provider constructor