Building Powerful Applications
Validity Rollups & L2 Solutions
How It Works
Example: Cross-Chain Bridge
use garaga::groth16::{Groth16Proof, verify_groth16_proof};
#[starknet::contract]
mod Bridge {
#[storage]
struct Storage {
processed_proofs: LegacyMap<felt252, bool>,
}
#[external(v0)]
fn process_deposit(
ref self: ContractState,
proof_with_hints: Span<felt252>,
deposit_hash: felt252,
) -> Result<(), felt252> {
// Verify the proof that a deposit occurred on the source chain
let public_inputs = verify_groth16_proof(proof_with_hints)?;
// Check the deposit hash matches
assert(*public_inputs.at(0) == deposit_hash, 'Invalid deposit');
// Process the deposit...
Result::Ok(())
}
}Privacy-Preserving Applications
Use Cases
Application
What's Proven
What's Hidden
Implementation with Noir
Verifiable Randomness (drand)
Why drand?
Example: On-Chain Lottery
Signature Verification at Scale
Supported Signature Schemes
Scheme
Curves
Use Case
Example: Multi-Chain Message Verification
zkVM Proof Verification
Architecture
Getting Started
Time-Lock Encryption (Coming Soon)
Use Cases
Build Your Own
Combination
Application
Last updated
Was this helpful?