trusts
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")
}
}Content copied to clipboard
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")
}
}Content copied to clipboard
Return
TrustAnchorBuilder for configuring trust anchor metadata
Parameters
credentialType
The credential type this DID trusts
Infix operator to express trust relationship for multiple credential types.
Example:
trustWeave.trust {
universityDid trusts listOf("EducationCredential", "DegreeCredential") because {
description("Trusted university")
}
}Content copied to clipboard