trusthub ledger

Query the append-only trust ledger, verify its hash chain, compute trust scores, and generate Merkle inclusion proofs for individual entries.

Commands

CommandDescription
trusthub ledger listList ledger entries with optional type filter
trusthub ledger verifyVerify the ledger hash chain integrity
trusthub ledger scoreCompute and display the trust score for a DID
trusthub ledger proofGenerate a Merkle inclusion proof for an entry

Usage

# List all entries (default limit 20)
trusthub ledger list

# Filter by entry type
trusthub ledger list --type TRUST_PROOF --limit 50

# Verify the full chain
trusthub ledger verify

# Compute trust score for a DID
trusthub ledger score did:trusthub:acme:abc123...

# Generate Merkle inclusion proof
trusthub ledger proof entry-id-here

Options

OptionApplies ToDescription
--typelistFilter by entry type (e.g. TRUST_PROOF, CREDENTIAL_ISSUED)
--limitlistMaximum entries to display (default 20)

Trust Score Output

The score command shows the composite trust score and its individual components computed from ledger entries.

Trust Score for did:trusthub:acme:abc123...
  Score: 0.8542
  identity_verification: 0.9000
  credential_history: 0.8200
  interaction_frequency: 0.8425
  Based on 37 ledger entries

Merkle Proof Output

The proof command generates a cryptographic inclusion proof that can be independently verified.

Merkle Proof
  Leaf hash:  a3f9c1...
  Root hash:  7b2e4d...
  Leaf index: 12
  Tree size:  64
  Proof path: 6 hashes