@eqty/risc-zero-verifier-react
v0.2.1
Published
Verifier for RISC Zero receipts. See also risc-zero-verifier for a package with no UI component.
Downloads
4
Keywords
Readme
RISC Zero Verifier
This is a verifier for RISC Zero zkVM execution receipts.
There is also a component with no UI available.
Usage
Basic usage with defaults:
import { Verifier } from "@eqty/risc-zero-verifier-react";
<Verifier />
Enable the journal parser. See the main repo for more details on the journal parser.
<Verifier enableJournalParser={true} />
Then journal parser registry can be changed, and a different IPFS gateway can be set.
<Verifier
enableJournalParser={true}
onStatus={onVerifierStatus}
registryUrl="http://localhost:3000/registry.json"
ipfsGateway="http://localhost:8080"
/>
A callback function can be passed in to receive status changes and use the status elsewhere on the page:
const onVerifierStatus = (result) => {
// result is either null or an object like this:
// {
// verified: true/false,
// error: "an error message"
// }
};
<Verifier
enableJournalParser={true}
onStatus={onVerifierStatus}
/>
Styling
The component is unstyled, but has CSS classes defined, including dynamic CSS classes for verification state.
For more info see https://github.com/eqtylab/risc-zero-verifier