Trust Scoring
Trust scores are computed as a weighted sum of trust signals from the ledger, normalized to 0.0-1.0.
Components
| Component | Default Weight | Source |
|---|---|---|
| Verification | 0.4 | Trust proof count / saturation |
| Credential | 0.3 | Active credential count / saturation |
| Delegation | 0.2 | Delegation count / saturation |
| Revocation Penalty | 0.1 | Revocation count (subtracted) |
Time Decay
When enabled, older entries contribute less to the score using exponential decay:
factor = 2^(-age_days / half_life_days)from trusthub import TrustScorer, TrustScoringConfig
config = TrustScoringConfig(
time_decay_enabled=True,
decay_half_life_days=30,
saturation_proofs=10,
)
scorer = TrustScorer(store, config=config)
score = scorer.compute_score(agent.did)
print(f"Score: {score.score}")
print(f"Components: {score.components}")Cross-Org Scoring
# Scale score by org trust factor
cross_org = scorer.compute_cross_org_score(
agent.did, org_trust_factor=0.8
)