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

    // Generate a private key
    const keyPair = await generateKeyPair('secp256k1')

    const key = {
      publicKey: keyPair.publicKey.raw,
      privateKey: keyPair.raw
    }

    await addKey(id, key)

    return keyPair
  }
Creates a key pair and stores it to the keystore.
@param {string} id An id of the [Identity]{@link module:Identities~Identity} to generate the key pair for.
@throws id needed to create a key if no id is specified.
@memberof module:KeyStore~KeyStore
@async
@instance