All Projects → decentralized-identity → did-common-java

decentralized-identity / did-common-java

Licence: Apache-2.0 License
Shared DID Java library.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to did-common-java

universal-registrar
Universal Registrar implementation and drivers.
Stars: ✭ 47 (+67.86%)
Mutual labels:  decentralized-identifiers, wg-id
universal-resolver-frontend
Frontend web UI for Universal Resolver.
Stars: ✭ 19 (-32.14%)
Mutual labels:  decentralized-identifiers, wg-id
verifiable-data
Open Source Decentralized Identifiers and Verifiable Credentials Infrastructure and Tooling
Stars: ✭ 18 (-35.71%)
Mutual labels:  decentralized-identifiers
fuzzy-encryption
A variant of a Fuzzy Vault cryptographic scheme designed for encrypting data with better human recovery features.
Stars: ✭ 39 (+39.29%)
Mutual labels:  wg-id
DeFiDefender
基于分布式身份的微贷联合风控平台
Stars: ✭ 25 (-10.71%)
Mutual labels:  decentralized-identifiers
orb
A DID method implementation that extends the Sidetree protocol into a Fediverse of interconnected nodes and witnessed using certificate transparency. Spec: https://trustbloc.github.io/did-method-orb/
Stars: ✭ 25 (-10.71%)
Mutual labels:  decentralized-identifiers
awesome-self-sovereign-identity
An awesome list of self-sovereign identity resources.
Stars: ✭ 161 (+475%)
Mutual labels:  decentralized-identifiers
.well-known
Specs and documentation for all DID-related /.well-known resources
Stars: ✭ 44 (+57.14%)
Mutual labels:  wg-id
sandbox
Demonstration environments
Stars: ✭ 20 (-28.57%)
Mutual labels:  decentralized-identifiers
did-key.rs
Rust implementation of the did:key method
Stars: ✭ 40 (+42.86%)
Mutual labels:  wg-id

did-common-java

Information

This is an implementation of the DID Core specification:

Maven

Build:

mvn clean install

Dependency:

<repositories>
	<repository>
		<id>danubetech-maven-public</id>
		<url>https://repo.danubetech.com/repository/maven-public/</url>
	</repository>
</repositories>

<dependency>
	<groupId>decentralized-identity</groupId>
	<artifactId>did-common-java</artifactId>
	<version>1.0.0</version>
</dependency>

Example

Example code:

URI did = URI.create("did:ex:1234");

Service service = Service.builder()
        .type("ServiceEndpointProxyService")
        .serviceEndpoint("https://myservice.com/myendpoint")
        .build();

VerificationMethod verificationMethod = VerificationMethod.builder()
        .id(URI.create(did + "#key-1"))
        .type("Ed25519VerificationKey2018")
        .publicKeyBase58("FyfKP2HvTKqDZQzvyL38yXH7bExmwofxHf2NR5BrcGf1")
        .build();

DIDDocument diddoc = DIDDocument.builder()
        .id(did)
        .service(service)
        .verificationMethod(verificationMethod)
        .build();

System.out.println(diddoc.toJson(true));

Example DID document:

{
  "@context" : "https://www.w3.org/ns/did/v1",
  "id" : "did:ex:1234",
  "verificationMethod" : {
    "type" : "Ed25519VerificationKey2018",
    "id" : "did:ex:1234#key-1",
    "publicKeyBase58" : "FyfKP2HvTKqDZQzvyL38yXH7bExmwofxHf2NR5BrcGf1"
  },
  "service" : {
    "type" : "ServiceEndpointProxyService",
    "serviceEndpoint" : "https://myservice.com/myendpoint"
  }
}

About

Decentralized Identity Foundation - https://identity.foundation/


Supported by ESSIF-Lab, which is made possible with financial support from the European Commission's Next Generation Internet programme.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].