trusts

infix fun Did.trusts(credentialType: String): TrustAnchorBuilder

Infix operators for expressive trust DSL.

These operators make trust relationships read naturally and provide a beautiful, fluent syntax for trust management.

Example Usage:

trustWeave.trust {
// Natural language: "universityDid trusts EducationCredential"
universityDid trusts "EducationCredential" because {
description("Trusted university")
}

// Find trust path: "resolve(verifierDid trustsPath issuerDid)"
val path = resolve(verifierDid trustsPath issuerDid)
when (path) {
is TrustPath.Verified -> println("Path found: ${path.length} hops")
is TrustPath.NotFound -> println("No path found")
}
}

Infix operator to express trust relationship: did trusts credentialType.

Creates a trust anchor builder that can be configured with metadata.

Example:

trustWeave.trust {
universityDid trusts "EducationCredential" because {
description("Trusted university")
credentialTypes("EducationCredential", "DegreeCredential")
}
}

Return

TrustAnchorBuilder for configuring trust anchor metadata

Parameters

credentialType

The credential type this DID trusts


infix fun Did.trusts(credentialTypes: List<String>): TrustAnchorBuilder

Infix operator to express trust relationship for multiple credential types.

Example:

trustWeave.trust {
universityDid trusts listOf("EducationCredential", "DegreeCredential") because {
description("Trusted university")
}
}