Skip to content

Commit

Permalink
wip: impl Prove for Vector
Browse files Browse the repository at this point in the history
  • Loading branch information
ralexstokes committed Mar 29, 2024
1 parent 9128f39 commit 4ab6043
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions ssz-rs/src/vector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -278,6 +280,15 @@ where
}
}

impl<T, const N: usize> Prove for Vector<T, N>
where
T: SimpleSerialize + GeneralizedIndexable + Prove,
{
fn prove(&mut self, index: GeneralizedIndex) -> Result<ProofAndWitness, MerkleizationError> {
//
}
}

#[cfg(feature = "serde")]
struct VectorVisitor<T: Serializable>(PhantomData<Vec<T>>);

Expand Down

0 comments on commit 4ab6043

Please sign in to comment.