Full sample code

The DID Java SDK source repository contains complete example codes related to the one in this document, which can help you learn and use the DID SDK. These sample codes can be obtained here:

The following main examples are included in the sample code:

  • DIDURLSample.java - usage example of DIDURL

  • RootIdentitySample.java - usage example of Root Identity

  • RestoreFrommnemonic.java - example of restoring Root Identity and DIDs from Mnemonic

  • InitializeDID.java - example of how the application initializes DID

  • IssueCredential.java - example of creating verifiable credentials

  • CreatePresentation.java - example of packaging verifiable credentials into verifiable expressions

  • PresentationInJWT.java - how to package verifiable expressions into JWT

  • ParseJWT.java - how to parse JWT

  • AssistDIDAdapter.java - reference implementation of DID Adapter based on Assist API

  • Web3Adapter.java - reference implementation of DID Adapter based on Web3 API

Last updated