verifyIdentity = async (identity) => {
    if (!isIdentity(identity)) {
      return false
    }

    const { id, publicKey, signatures } = identity

    const idSignatureVerified = await verify(signatures.id, publicKey, id)
    if (!idSignatureVerified) {
      return false
    }

    const verifiedIdentity = await verifiedIdentitiesCache.get(signatures.id)
    if (verifiedIdentity) {
      return isEqual(identity, verifiedIdentity)
    }

    const Provider = getIdentityProvider(identity.type)

    const identityVerified = await Provider.verifyIdentity(identity)
    if (identityVerified) {
      await verifiedIdentitiesCache.put(signatures.id, identity)
    }

    return identityVerified
  }
Verifies an identity using the identity's provider.
@param {module:Identities~Identity} identity The identity to verify.
@return {boolean} True the identity is valid, false otherwise.
@memberof module:Identities~Identities