User-Defined Types (UDTs)
What is a UDT?
A User-Defined Type (UDT) is a custom data model that represents the claims within a credential. UDTs allow for flexibility in defining the structure of credential claims, ensuring that each credential follows a specific schema.
Benefits of UDTs
UDTs enable enhanced type safety and ensure that errors related to data types are caught during the credential lifecycle, including creation, updating, issuance, and validation. These types are particularly useful when credentials need to be tailored for different use cases such as personal identification, birth certificates, or other types of documents.
The use of UDTs ensures that:
- Credential claims are well-structured.
- Schema validation is enforced.
- Credentials can be linked or nested, improving interoperability.
For details on how to define and implement UDTs, refer to the Define credential schemas guide.