getKey = async (id) => {
    if (!id) {
      throw new Error('id needed to get a key')
    }

    let key = await keyCache.get(id)

    if (!key) {
      let storedKey
      try {
        storedKey = await storage.get('private_' + id)
      } catch (e) {
        // ignore ENOENT error
      }

      if (!storedKey) {
        return
      }

      key = privateKeyFromRaw(storedKey)

      await keyCache.put(id, key)
    }

    return key
  }
Gets a key from keystore.
@param {string} id An id of the [Identity]{@link module:Identities~Identity} whose key to retrieve.
@return {Uint8Array} The key specified by id.
@throws id needed to get a key if no id is specified.
@memberof module:KeyStore~KeyStore
@async
@instance