use crate::merkle::{
hasher::Hasher,
mmr::{Error, Family, Location, Proof},
storage::Storage,
};
use commonware_cryptography::Digest;
use core::ops::Range;
pub type ProofStore<D> = crate::merkle::verification::ProofStore<Family, D>;
pub async fn range_proof<
D: Digest,
H: Hasher<Family, Digest = D>,
S: Storage<Family, Digest = D>,
>(
hasher: &H,
mmr: &S,
range: Range<Location>,
) -> Result<Proof<D>, Error> {
crate::merkle::verification::range_proof(hasher, mmr, range).await
}
pub async fn historical_range_proof<
D: Digest,
H: Hasher<Family, Digest = D>,
S: Storage<Family, Digest = D>,
>(
hasher: &H,
mmr: &S,
leaves: Location,
range: Range<Location>,
) -> Result<Proof<D>, Error> {
crate::merkle::verification::historical_range_proof(hasher, mmr, leaves, range).await
}
pub async fn multi_proof<D: Digest, S: Storage<Family, Digest = D>>(
mmr: &S,
locations: &[Location],
) -> Result<Proof<D>, Error> {
crate::merkle::verification::multi_proof(mmr, locations).await
}