Generating calldata from a proof and using your deployed contract
A npm package is under development to call your contract from the browser.
Once your groth16 contract is deployed and you have its address, you will need to call its main endpoint verify_groth16_proof_bn254, or verify_groth16_proof_bls12_381.
The Groth16 proof needs pre-processing and extra computation to allow efficient verification.
The Garaga CLI takes care of converting your proof to the correct calldata and calling your contract.
To do this, use the garaga verify-onchain command.
As for the verifying key, both Snarkjs and Gnark proof.json and public.json are supported out of the box. See the example in the Generate and deploy your verifier contract for Gnark export.
Alternatively, the --public-inputs parameter can be omitted if your proof include everything at once, as below.