Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/reinkrul/java-did-resolvers
Set of DID resolvers in Java with minimal dependencies
https://github.com/reinkrul/java-did-resolvers
Last synced: about 2 months ago
JSON representation
Set of DID resolvers in Java with minimal dependencies
- Host: GitHub
- URL: https://github.com/reinkrul/java-did-resolvers
- Owner: reinkrul
- License: mit
- Created: 2023-08-12T08:47:12.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-06T05:44:58.000Z (2 months ago)
- Last Synced: 2024-11-06T06:29:25.084Z (2 months ago)
- Language: Java
- Size: 85 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - reinkrul/java-did-resolvers - Set of DID resolvers in Java with minimal dependencies (Java)
README
# java-did-resolvers
![Build Status](https://github.com/reinkrul/java-did-resolvers/actions/workflows/maven.yml/badge.svg?branch=main)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/nl.reinkrul.did/did-resolvers/badge.svg?style=flat)](https://search.maven.org/artifact/nl.reinkrul.did/did-resolvers)A set of DID resolvers in Java with minimal dependencies.
# Supported DID methods
## [Web DID Method (did:web)](https://w3c-ccg.github.io/did-method-web/)
Maven dependency:
```xmlnl.reinkrul.did
did-web-resolver
0.1.0```
## [JWK DID Method (did:jwk)](https://github.com/quartzjer/did-jwk/blob/main/spec.md)
Maven dependency:
```xmlnl.reinkrul.did
did-jwk-resolver
0.1.0```
# Usage
You can resolve the DID document, yields the parsed DID document:
```java
// this populates didDocument, does not populate didDocumentBytes and contentType
var result = new WebResolver().Resolve(new URI("did:web:example.com"));
System.out.println(result.getDIDDocument().getId());
```If you want the raw data as `byte[]` (as specified by the DID core specification), you resolve the presentation:
```java
// this populates didDocumentBytes and contentType, does not populate didDocument
var result = new WebResolver().ResolvePresentation(new URI("did:web:example.com"));
var data = result.getDIDDocumentBytes();
// do something with the raw data
```## JSON-LD
The library supports JSON-LD documents: they will be unmarshalled, but no further JSON-LD processing will be performed.
# Compliancy
This library's API follows [W3C DID Core specification v1.0](https://www.w3.org/TR/2022/REC-did-core-20220719/).