This section of the documentation explains how to create a W3bstream ZK prover using Risc Zero as the ZK framework.

1. Rust language

Ensure you have the Rust compiler correctly installed

2. Cargo

Ensure you have cargo 1.72.0 or higher:
update cargo with:

3. rustzero toolchain

Build the prover code

Clone the W3bstream repository

Start by cloning the W3bstream repository, where you can start from a template prover:
Open the folder in a code editor and make the required modifications based on your actual data message.
Learn more about developing Risc Zero provers:→ Go to the official Risc Zero documentation

Build the prover logic

The prover bytecode is saved in a file named methods.rs inside the release folder. The correct path is logged at the end of the build:
The method.rs file also includes the image ID of the prover that is needed by the verifier when verifying a proof:
-> Go to the Create a W3bstream Project section to create a W3bstream configuration file based on this prover.
→ See the On-chain Verification section to learn how to verify W3bstream proofs in your Dapp