Connector for ZK-Proof operations using Semaphore protocol

Constructors

Properties

credentialCache: Map<string, ZkProofCredential> = ...
groups: Map<string, Group> = ...
identityCache: Map<string, Identity> = ...

Methods

  • Add identity to a group

    Parameters

    • commitment: string
    • groupId: string = "default"

    Returns void

  • Clear all caches

    Returns void

  • Generate Gun credentials from ZK identity

    Parameters

    Returns Promise<ISEAPair>

  • Generate a new Semaphore identity

    Parameters

    • Optionalseed: string

    Returns Promise<ZkIdentityData>

  • Get or create a Semaphore group

    Parameters

    • groupId: string = "default"

    Returns Group

  • Restore identity from trapdoor

    Parameters

    • trapdoor: string

    Returns Promise<ZkIdentityData>