We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee4dfdf commit 1ad320aCopy full SHA for 1ad320a
1 file changed
examples/circom/src/get_vk_commitment.rs
@@ -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