MCPcopy Create free account
hub / github.com/Lightprotocol/light-protocol-v1 / get_proof_from_bytes

Function get_proof_from_bytes

program/tests/test_utils/mod.rs:81–94  ·  view source on GitHub ↗
(
        proof_bytes: &Vec<u8>,
    )

Source from the content-addressed store, hash-verified

79 }
80
81 pub fn get_proof_from_bytes(
82 proof_bytes: &Vec<u8>,
83 ) -> ark_groth16::data_structures::Proof<ark_ec::models::bn::Bn<ark_bn254::Parameters>> {
84 let proof_a = parse_x_group_affine_from_bytes(&proof_bytes[0..64].to_vec());
85 let proof_b = parse_proof_b_from_bytes(&proof_bytes[64..192].to_vec());
86 let proof_c = parse_x_group_affine_from_bytes(&proof_bytes[192..256].to_vec());
87 let proof =
88 ark_groth16::data_structures::Proof::<ark_ec::models::bn::Bn<ark_bn254::Parameters>> {
89 a: proof_a,
90 b: proof_b,
91 c: proof_c,
92 };
93 proof
94 }
95
96 pub fn get_public_inputs_from_bytes(
97 public_inputs_bytes: &Vec<u8>,

Callers 2

get_mock_stateFunction · 0.85
get_ref_valueFunction · 0.85

Calls 2

parse_proof_b_from_bytesFunction · 0.85

Tested by

no test coverage detected