@iden3/js-jwz
Version:
JS implementation of JWZ
22 lines (21 loc) • 915 B
TypeScript
import { Id } from '@iden3/js-iden3-core';
import { ProvingMethod, ProvingMethodAlg, ZKProof } from './proving';
import { Hash } from '@iden3/js-merkletree';
export interface AuthV2PubSignals {
userID: Id;
challenge: bigint;
GISTRoot: Hash;
}
export declare const AuthV2Groth16Alg: ProvingMethodAlg;
export declare class ProvingMethodGroth16AuthV2 implements ProvingMethod {
readonly methodAlg: ProvingMethodAlg;
private static readonly curveName;
constructor(methodAlg: ProvingMethodAlg);
get alg(): string;
get circuitId(): string;
verify(messageHash: Uint8Array, proof: ZKProof, verificationKey: Uint8Array): Promise<boolean>;
prove(inputs: Uint8Array, provingKey: Uint8Array, wasm: Uint8Array): Promise<ZKProof>;
private terminateCurve;
unmarshall(pubSignals: string[]): AuthV2PubSignals;
}
export declare const provingMethodGroth16AuthV2Instance: ProvingMethod;