Skip to content

How to get intermediate signals while calling 'snarkjs.groth16.fullProve()' in javascript ? #522

@VictorECDSA

Description

@VictorECDSA

I am gonna write a circuit in circom, and call 'snarkjs.groth16.fullProve()' in javascript. I'd like to let javascript to get some intermediate signals of Circom, but I don't want those intermediate signals to be the output of Circom (so that reduce the size of the proof transaction when calling Solidity by reducing the public.json).

I've thought about adding some logs to circom, printing out the intermediate signal as log, and then javascript sends the last argument 'logger' when calling 'snarkjs.groth16.fullProve()', but I see that the 'logger' type is any, and I don't know how to construct this 'logger'. Is there a better way to implement my needs?

    function fullProve(
        _input: CircuitSignals,
        wasmFile: ZKArtifact,
        zkeyFileName: ZKArtifact,
        logger?: any,
    ): Promise<{
        proof: Groth16Proof;
        publicSignals: PublicSignals;
    }>;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions