MCPcopy Create free account
hub / github.com/BitVM/BitVM / to_raw

Method to_raw

bitvm/src/chunk/g16_runner_core.rs:33–56  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

31
32impl InputProof {
33 pub(crate) fn to_raw(&self) -> InputProofRaw {
34 let p2x = self.p2.x.into_bigint();
35 let p2y = self.p2.y.into_bigint();
36 let p4x = self.p4.x.into_bigint();
37 let p4y = self.p4.y.into_bigint();
38 let q4x0 = self.q4.x.c0.into_bigint();
39 let q4x1 = self.q4.x.c1.into_bigint();
40 let q4y0 = self.q4.y.c0.into_bigint();
41 let q4y1 = self.q4.y.c1.into_bigint();
42 let c: Vec<ark_ff::BigInt<4>> = self
43 .c
44 .to_base_prime_field_elements()
45 .map(|f| f.into_bigint())
46 .collect();
47 let ks: Vec<ark_ff::BigInt<4>> = self.ks.iter().map(|f| f.into_bigint()).collect();
48
49 InputProofRaw {
50 p2: [p2x, p2y],
51 p4: [p4x, p4y],
52 q4: [q4x0, q4x1, q4y0, q4y1],
53 c: c.try_into().unwrap(),
54 ks: ks.try_into().unwrap(),
55 }
56 }
57}
58
59#[derive(Debug)]

Callers 3

test_groth16Function · 0.80

Calls

no outgoing calls

Tested by 1

test_groth16Function · 0.64