• Generate a ZK-SNARK proof for identity attestation

    Parameters

    • providerId: string

      Provider identifier (e.g., "github:12345")

    • secret: string

      User's secret value

    • context: string

      Context string for this attestation

    • merkleProof: MerkleProof

      Merkle proof from node RPC

    • merkleRoot: string

      Current Merkle root from node RPC

    Returns Promise<ProofGenerationResult>

    Proof and public signals

    const result = await ProofGenerator.generateIdentityProof(
    "github:12345",
    "secret123",
    "dao_vote_123",
    merkleProof,
    merkleRoot
    )
    // result: { proof: {...}, publicSignals: [nullifier, merkleRoot, context] }