Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Identity

Index

Constructors

  • new Identity(identityOrMessage?: string): Identity
  • Initializes the class attributes based on the strategy passed as parameter.

    Parameters

    • Optional identityOrMessage: string

      Additional data needed to create identity for given strategy.

    Returns Identity

Properties

_nullifier: bigint
_trapdoor: bigint

Methods

  • generateCommitment(): bigint
  • Generates the identity commitment from trapdoor and nullifier.

    Returns bigint

    identity commitment

  • getNullifier(): bigint
  • Returns the identity nullifier.

    Returns bigint

    The identity nullifier.

  • getTrapdoor(): bigint
  • Returns the identity trapdoor.

    Returns bigint

    The identity trapdoor.

  • toString(): string
  • Returns a JSON string with trapdoor and nullifier. It can be used to export the identity and reuse it later.

    Returns string

    The string representation of the identity.

Generated using TypeDoc