• Read an identity from the specified file or create a new one if the file does not exist.

    If and identity file does not exist it will create a file with a random identity. In contrast to readIdentityWithSecretsFileOrWriteRandom this will only generate a public identity file and not the secret one. This means that the secret information is only kept in memory, while the public information is written.

    Parameters

    • fileName: string

      The file rom which to read / to which to write the identity to.

    • Optionalurl: string

      commserver to include in the randomly generated identity.

    • OptionalpersonEmail: string

      The person email to use when a new identity is created. If not specified a random string is used.

    • OptionalinstanceName: string

      The instance name to use when a new identity is created. If not specified a random string is used.

    Returns Promise<Identity | IdentityWithSecrets>

    If an identity file exists, it will return an Identity, otherwise it will return an IdentityWithSecrets.