The Github Page of EOSjs mention a keyProvider
to instantiate EOSjs. What is this? my private key?
Yes you need a private key. If you are doing a front-end where you need to use EOSjs and need user's private key, ask them to enable Scatter wallet instead and you simply get an eosjs object from Scatter instead.
Exactly, it provides private keys used to sign transactions.
Here the definition from the eosjs github page:
keyProvider [array|string|function]: Provides private keys used to sign transactions. If multiple private keys are found, the API get_required_keys is called to discover which signing keys to use. If a function is provided, this function is called for each transaction.
You just need to add it as the following (even if this is a fake private key):
keyProvider: ['5LLKiY1D3tCndrF5NW5tJa1enukCfrPNopUJwnkUmfErT8d11eN']