Class Document
-
- All Implemented Interfaces:
public final class DocumentRepresentation of a DID Document.
A
Documentrepresents the full DID document, which is a set of data describing a DID subject, including public keys, authentication mechanisms, services, and more. This class provides functionality for converting the document to and from JSON format, as well as converting it to and from Rust core data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classDocument.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final List<String>contextprivate final List<String>controllerprivate final List<String>alsoKnownAsprivate final List<VerificationMethod>verificationMethodprivate final List<String>authenticationprivate final List<String>assertionMethodprivate final List<String>keyAgreementprivate final List<String>capabilityInvocationprivate final List<String>capabilityDelegationprivate final List<Service>servicepublic final static Document.CompanionCompanion
-
Constructor Summary
Constructors Constructor Description Document(String id, List<String> context, List<String> controller, List<String> alsoKnownAs, List<VerificationMethod> verificationMethod, List<String> authentication, List<String> assertionMethod, List<String> keyAgreement, List<String> capabilityInvocation, List<String> capabilityDelegation, List<Service> service)
-
Method Summary
Modifier and Type Method Description final StringgetId()The DID URI representing the subject of the DID document. final List<String>getContext()A list of URIs defining the schema version used in the document (optional). final List<String>getController()A list of entities authorized to make changes to the DID document (optional). final List<String>getAlsoKnownAs()A list of alternative identifiers for the DID subject (optional). final List<VerificationMethod>getVerificationMethod()A list of cryptographic public keys for authentication and authorization. final List<String>getAuthentication()Methods for authenticating the DID subject (optional). final List<String>getAssertionMethod()Methods for expressing claims, such as issuing Verifiable Credentials (optional). final List<String>getKeyAgreement()Methods for establishing secure communication channels (optional). final List<String>getCapabilityInvocation()Methods used by the DID subject to invoke cryptographic capabilities (optional). final List<String>getCapabilityDelegation()Methods used by the DID subject to delegate cryptographic capabilities (optional). final List<Service>getService()A list of services provided by the DID subject (optional). final StringtoJsonString()Converts the Documentobject to a JSON string.-
-
Constructor Detail
-
Document
Document(String id, List<String> context, List<String> controller, List<String> alsoKnownAs, List<VerificationMethod> verificationMethod, List<String> authentication, List<String> assertionMethod, List<String> keyAgreement, List<String> capabilityInvocation, List<String> capabilityDelegation, List<Service> service)
-
-
Method Detail
-
getContext
final List<String> getContext()
A list of URIs defining the schema version used in the document (optional).
-
getController
final List<String> getController()
A list of entities authorized to make changes to the DID document (optional).
-
getAlsoKnownAs
final List<String> getAlsoKnownAs()
A list of alternative identifiers for the DID subject (optional).
-
getVerificationMethod
final List<VerificationMethod> getVerificationMethod()
A list of cryptographic public keys for authentication and authorization.
-
getAuthentication
final List<String> getAuthentication()
Methods for authenticating the DID subject (optional).
-
getAssertionMethod
final List<String> getAssertionMethod()
Methods for expressing claims, such as issuing Verifiable Credentials (optional).
-
getKeyAgreement
final List<String> getKeyAgreement()
Methods for establishing secure communication channels (optional).
-
getCapabilityInvocation
final List<String> getCapabilityInvocation()
Methods used by the DID subject to invoke cryptographic capabilities (optional).
-
getCapabilityDelegation
final List<String> getCapabilityDelegation()
Methods used by the DID subject to delegate cryptographic capabilities (optional).
-
getService
final List<Service> getService()
A list of services provided by the DID subject (optional).
-
toJsonString
final String toJsonString()
Converts the
Documentobject to a JSON string.This method serializes the
Documentinstance into a JSON string using Rust core functionality.- Returns:
The JSON string representing the DID document.
-
-
-
-