Skip to content

Commit 1ad320a

Browse files
committed
feat: compute vk commitment script
1 parent ee4dfdf commit 1ad320a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
use aligned_sdk::common::types::ProvingSystemId;
2+
use alloy::{hex, primitives::Keccak256};
3+
4+
fn main() {
5+
let vk_bytes =
6+
std::fs::read("circuits/verification_key.json").expect("verification key to be created");
7+
8+
let mut hasher = Keccak256::new();
9+
hasher.update(vk_bytes);
10+
hasher.update([ProvingSystemId::CircomGroth16Bn256 as u8]);
11+
let vk_commitment = hasher.finalize().0;
12+
13+
println!("VK COMMITMENT IS: `0x{}`", hex::encode(vk_commitment));
14+
}

0 commit comments

Comments
 (0)