1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//! # kwaai-trust — KwaaiNet Decentralized Trust Graph
//!
//! Implements the ToIP/DIF Decentralized Trust Graph (DTG) framework for
//! KwaaiNet, mapping the four-layer model onto the existing libp2p infrastructure.
//!
//! ## Layer 1 — Identity (already exists)
//! Each node's libp2p `PeerId` (Ed25519 keypair) is the trust anchor.
//! This crate exposes it as a `did:peer:` DID via [`did::peer_id_to_did`].
//!
//! ## Layer 2 — Trust Assertions (this crate)
//! Cryptographically signed [`VerifiableCredential`]s issued by trusted parties:
//! - `SummitAttendeeVC` — summit on-ramp server (Phase 1, active)
//! - `FiduciaryPledgeVC` — GliaNet Foundation (Phase 2)
//! - `VerifiedNodeVC` — Kwaai Foundation (Phase 2)
//! - `UptimeVC` / `ThroughputVC` — bootstrap servers / peers (Phase 3)
//! - `PeerEndorsementVC` — node-to-node (Phase 4)
//!
//! ## Layer 3 — Trust Scoring (this crate, Phase 2 baseline)
//! [`TrustScore`] computes a weighted, time-decayed score from stored VCs.
//! Full EigenTrust propagation over the endorsement graph comes in Phase 4.
//!
//! ## Layer 4 — Governance
//! Which issuers are trusted for which VC types, revocation policy, and
//! minimum trust thresholds are defined in the KwaaiNet governance docs.
// Convenient re-exports
pub use ;
pub use ;
pub use CredentialStore;
pub use TrustScore;
pub use ;