LogoLogo
NEBRA HomeGithub
  • Introduction
    • What is NEBRA UPA?
    • How it works
    • Quickstart
  • Developer Guide
    • Setup
    • Registering applications
    • Submission and verification
    • Proof explorer
    • Gas costs on L1s
    • Gas Costs on L2s
    • Testing workflow
    • Frontend integration
    • Deployments
    • Off-chain verification
  • UPA protocol specification
  • Integrating with zkVMs
    • Integrating with SP1
  • Security and Transparency
Powered by GitBook
On this page
  • Verification using the upatool
  • Install the tool
  • Specify a verification service endpoint
  • Verifying proofs in snarkjs format
  • Verify proofs in gnark format
  • Verifying proofs in UPA format
  • Verification using the SDK

Was this helpful?

  1. Developer Guide

Off-chain verification

Verification of proofs via an off-chain verification service

Proofs can be submitted to a verification service for checking. In order to use a verification service, an endpoint must be obtained from Nebra. (TODO: link)

Proofs can be submitted using the upa command line tool, or programmatically with the Typescript SDK.

Verification using the upatool

Install the tool

The standalone upatool can be installed with:

$ npm install --global @nebrazkp/upa

It should then be available in the shell:

$ upa version
2.0.3

Specify a verification service endpoint

The --verify-endpointflag, or the VERIFY_ENDPOINTenv var can be used to specify the URL of the verification service to be queried. It is often convenient to use a .envfile:

VERIFY_ENDPOINT=<endpoint>

Verifying proofs in snarkjs format

Use the upa off-chain verify-snarkjscommand:

$ upa off-chain verify-snarkjs vk.json proof.json

(Use --helpfor the full list of arguments)

Verify proofs in gnark format

Use the upa off-chain verify-gnarkcommand:

$ upa off-chain verify-gnark vk.json proof.json inputs.json

Verifying proofs in UPA format

Verification using the SDK

In your Typescript project, add the SDK:

$ yarn add @nebrazkp/upa

The VerifierClientclass can then be used to submit proofs for verification:

import VerifierClient from "@nebrazkp/sdk/offChainVerify";

const client = new VerifierClient("<ENDPOINT>");
const valid = await client.verify([vkProofInputs]);

PreviousDeploymentsNextUPA protocol specification

Last updated 5 months ago

Was this helpful?

Export the VK, proof and inputs to JSON as described .

If proofs have already been converted to the UPA format (in particular the AppVkProofInputs format - see the ) they can be submitted individually or in batches using the upa off-chain verify command.

Note that vkProofInputsmust be of type `AppVkProofInputs`. See for information about converting vk and proof formats into instances of this type.

here
section about proof formats
here