From a1a51be4d8c7e50347c3eda3b441e35d371cd296 Mon Sep 17 00:00:00 2001 From: Alex Stokes Date: Thu, 28 Mar 2024 17:30:24 -0600 Subject: [PATCH] wip: impl Prove for Vector --- ssz-rs/src/vector.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/ssz-rs/src/vector.rs b/ssz-rs/src/vector.rs index 2fac0f93..3cc5bfbb 100644 --- a/ssz-rs/src/vector.rs +++ b/ssz-rs/src/vector.rs @@ -3,8 +3,10 @@ use crate::{ error::{Error, InstanceError, TypeError}, lib::*, merkleization::{ - elements_to_chunks, get_power_of_two_ceil, merkleize, pack, GeneralizedIndex, - GeneralizedIndexable, HashTreeRoot, MerkleizationError, Node, Path, PathElement, + elements_to_chunks, get_power_of_two_ceil, merkleize, pack, + proofs::{ProofAndWitness, Prove}, + GeneralizedIndex, GeneralizedIndexable, HashTreeRoot, MerkleizationError, Node, Path, + PathElement, }, ser::{Serialize, SerializeError, Serializer}, Serializable, SimpleSerialize, @@ -278,6 +280,15 @@ where } } +impl Prove for Vector +where + T: SimpleSerialize + GeneralizedIndexable + Prove, +{ + fn prove(&mut self, index: GeneralizedIndex) -> Result { + todo!() + } +} + #[cfg(feature = "serde")] struct VectorVisitor(PhantomData>);