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