Skip to main content

Crate auths_index

Crate auths_index 

Source
Expand description

SQLite-backed index for O(1) attestation, identity, and org member lookups.

This crate provides an index layer that enables fast queries on attestation metadata without iterating through all Git refs. The index is stored in a SQLite database (typically .auths-index.db in the repository root).

§Usage

use auths_index::{AttestationIndex, IndexedAttestation};
use std::path::Path;

// Open or create an index
let index = AttestationIndex::open_or_create(Path::new(".auths-index.db"))?;

// Query attestations by device
let attestations = index.query_by_device("did:key:z6Mk...")?;

// Get index statistics
let stats = index.stats()?;
println!("Total attestations: {}", stats.total_attestations);

Re-exports§

pub use error::IndexError;
pub use error::Result;
pub use index::AttestationIndex;
pub use index::IndexStats;
pub use index::IndexedAttestation;
pub use index::IndexedIdentity;
pub use index::IndexedOrgMember;
pub use rebuild::DEFAULT_ATTESTATION_PREFIX;
pub use rebuild::RebuildStats;
pub use rebuild::rebuild_attestations_from_git;

Modules§

error
index
rebuild