TrustPath
Trust path from verifier to issuer.
Represents a verified path through the trust graph from a verifier to an issuer. This is a first-class type that makes trust relationships explicit and verifiable.
Example Usage:
import org.trustweave.did.identifiers.Did
import org.trustweave.trust.types.TrustPath
import org.trustweave.trust.types.IssuerIdentity
import org.trustweave.trust.types.VerifierIdentity
val verifier = VerifierIdentity(Did("did:key:verifier"))
val issuer = IssuerIdentity(Did("did:key:issuer"))
when (val path = trustWeave.findTrustPath(verifier, issuer)) {
is TrustPath.Verified -> {
println("Trusted via path: ${path.anchors.map { it.did }}")
println("Path length: ${path.length}")
println("Verified at: ${path.verifiedAt}")
}
is TrustPath.NotFound -> {
println("No trust path found: ${path.reason}")
}
}Content copied to clipboard
Inheritors
Types
Link copied to clipboard
data class NotConfigured(val reason: String = "Trust registry is not configured. Configure it in TrustWeave.build { trust { ... } }") : TrustPath
Trust registry is not configured.
Link copied to clipboard
data class NotFound(val from: VerifierIdentity, val to: IssuerIdentity, val reason: String? = null) : TrustPath
No trust path found between verifier and issuer.
Link copied to clipboard
data class Verified(val from: VerifierIdentity, val to: IssuerIdentity, val anchors: List<TrustAnchor>, val verified: Boolean = true, val verifiedAt: Instant, val trustScore: Double = 1.0) : TrustPath
Verified trust path from verifier to issuer.