RAILGUN Reloaded
    Preparing search index...

    Groth16 proving backend that the consumer passes to RailgunClient.create().

    type Groth16Prover = {
        fullProve(
            inputs: unknown,
            wasm: Uint8Array,
            zkey: Uint8Array,
        ): Promise<{ proof: Groth16Proof; publicSignals: string[] }>;
        verify(
            vkVerifier: unknown,
            publicSignals: string[],
            proof: Groth16Proof,
        ): Promise<boolean>;
    }
    Index
    • Generate a Groth16 proof for one circuit.

      Parameters

      • inputs: unknown

        Circuit input signals.

      • wasm: Uint8Array

        Witness calculator WASM bytes of the circuit.

      • zkey: Uint8Array

        Proving key bytes of the circuit.

      Returns Promise<{ proof: Groth16Proof; publicSignals: string[] }>

      The proof and the public signals.

    • Verify a Groth16 proof against the verification key of a circuit.

      Parameters

      • vkVerifier: unknown

        Verification key of the circuit, parsed from JSON.

      • publicSignals: string[]

        Public signals as decimal strings, in circuit order.

      • proof: Groth16Proof

        Groth16 proof points.

      Returns Promise<boolean>

      True when the proof is valid.