Skip to content

Commit 73a2ad7

Browse files
authored
Merge pull request #10 from filip26/feat/r091
0.9.2
2 parents 4b0172d + 43eea7f commit 73a2ad7

44 files changed

Lines changed: 889 additions & 916 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/codacy-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up JDK 8
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: 1.8
20+
java-version: 8
2121
distribution: 'temurin'
2222
- name: Build with Maven
2323
run: mvn -B package jacoco:report

.github/workflows/codeql.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

.github/workflows/java8-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Set up JDK 8
1818
uses: actions/setup-java@v4
1919
with:
20-
java-version: 1.8
20+
java-version: 8
2121
distribution: 'temurin'
2222
- name: Build with Maven
2323
run: mvn package
Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: Publish JRE8 to the Maven Central
2+
23
on:
34
release:
45
types: [created]
@@ -11,20 +12,22 @@ jobs:
1112
environment: maven-central
1213
steps:
1314
- uses: actions/checkout@v4
14-
- name: Set up JDK 17
15+
- name: Set up JDK 8
1516
uses: actions/setup-java@v4
1617
with:
17-
java-version: '17'
18+
java-version: 8
1819
distribution: 'temurin'
1920
cache: 'maven'
20-
server-id: ossrh
21-
server-username: OSSRH_USERNAME
22-
server-password: OSSRH_TOKEN
21+
server-id: central
22+
server-username: CENTRAL_TOKEN_ID
23+
server-password: CENTRAL_TOKEN_SECRET
2324
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2425
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2526
- name: Publish package
2627
run: mvn -B -Pmaven-central deploy
2728
env:
28-
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
29-
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
29+
CENTRAL_TOKEN_ID: ${{ secrets.CENTRAL_TOKEN_ID }}
30+
CENTRAL_TOKEN_SECRET: ${{ secrets.CENTRAL_TOKEN_SECRET }}
3031
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
32+
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
33+

README.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,86 @@
11
# Carbon DID Key Method
2+
3+
An implementation of the [`did:key`](https://w3c-ccg.github.io/did-key-spec) method for static cryptographic keys in Java.
4+
5+
[![Java 8 CI](https://github.com/filip26/carbon-did-key/actions/workflows/java8-build.yml/badge.svg)](https://github.com/filip26/carbon-did-key/actions/workflows/java8-build.yml)
6+
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/7f783f2e5d0b4fc6a08094d312a58309)](https://app.codacy.com/gh/filip26/carbon-did-key/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
7+
[![Maven Central](https://img.shields.io/maven-central/v/com.apicatalog/carbon-did-key.svg?label=Maven%20Central)](https://search.maven.org/artifact/com.apicatalog/carbon-did-key)
8+
[![javadoc](https://javadoc.io/badge2/com.apicatalog/carbon-did-key/javadoc.svg)](https://javadoc.io/doc/com.apicatalog/carbon-did-key)
9+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
10+
11+
12+
## Features
13+
14+
- **DidKey API & Resolver** – work with `did:key` identifiers programmatically.
15+
- **Verification Methods**
16+
- Multikey
17+
- JSON Web Key (JWK):
18+
- Ed25519
19+
- Bls12381G1, Bls12381G2
20+
- P-256 (secp256r1)
21+
- P-384 (secp384r1)
22+
- secp256k1
23+
24+
## Examples
25+
26+
```javascript
27+
28+
DidKeyResolver resolver = DidKeyResolver
29+
.with(codecs)
30+
.multikey()
31+
.build();
32+
33+
// Parse an existing `did:key`
34+
var didKey = Did.of("did:key:z6MkvG5D...", ...);
35+
36+
var didDoc = resolver.resolve(didKey);
37+
38+
System.out.println(didDoc.document().id());
39+
didDooc.document().verification().forEach(vm -> System.out.println(vm.id()));
40+
```
41+
42+
## Installation
43+
44+
### Maven
45+
46+
```xml
47+
<dependency>
48+
<groupId>com.apicatalog</groupId>
49+
<artifactId>carbon-did-key</artifactId>
50+
<version>0.9.2</version>
51+
</dependency>
52+
53+
```
54+
55+
56+
## Contributing
57+
58+
All PR's welcome!
59+
60+
61+
### Building
62+
63+
Fork and clone the project repository.
64+
65+
```bash
66+
> cd carbon-did-key
67+
> mvn clean package
68+
```
69+
70+
## Resources
71+
72+
- [The did:key Method v0.7](https://w3c-ccg.github.io/did-key-spec)
73+
- [W3C Controlled Identifiers v1.0](https://www.w3.org/TR/cid-1.0/)
74+
- [W3C Decentralized Identifiers (DIDs) v1.0](https://www.w3.org/TR/did-core/)
75+
- [Carbon DID Core](https://github.com/filip26/carbon-did-core)
76+
- [Carbon Controlled Identifiers](https://github.com/filip26/carbon-cid)
77+
78+
## Sponsors
79+
80+
<a href="https://github.com/digitalbazaar">
81+
<img src="https://avatars.githubusercontent.com/u/167436?s=200&v=4" width="40" />
82+
</a>
83+
84+
## Commercial Support
85+
Commercial support is available at filip26@gmail.com
86+

SECURITY.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,16 @@
22

33
## Supported Versions
44

5-
| Version | Supported |
6-
| ------- |:------------------:|
7-
| 0.x.x ||
5+
| Version | Supported |
6+
| ------- |:---------:|
7+
| 0.x.x | ✅ Supported |
8+
| 1.x.x | ❌ Not supported |
89

910
## Reporting a Vulnerability
1011

11-
Please report security vulnerabilities to [Filip Kolarik](mailto:filip26@gmail.com). Thank you!
12+
If you discover a security vulnerability, please report it responsibly by contacting:
13+
14+
**Filip Kolarik**
15+
📧 [filip26@gmail.com](mailto:filip26@gmail.com)
16+
17+
We will investigate promptly and work with you to address the issue. Thank you for helping keep the project secure!

pom.xml

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.apicatalog</groupId>
88
<artifactId>carbon-did-key</artifactId>
99

10-
<version>0.9.1-SNAPSHOT</version>
10+
<version>0.9.2</version>
1111
<packaging>jar</packaging>
1212

1313
<url>https://github.com/filip26/carbon-did-key</url>
@@ -20,7 +20,8 @@
2020
<name>Carbon DID Key Method</name>
2121

2222
<description>
23-
A DID Method for Static Cryptographic Keys. Multikey, JsonWebKey support.
23+
An implementation of the W3C DID Method "did:key" for static cryptographic keys.
24+
Supports Multikey and JsonWebKey representations (Ed25519, Bls12381, P-256, P-384, secp256k1).
2425
</description>
2526

2627
<licenses>
@@ -57,7 +58,7 @@
5758
<maven.compiler.target>1.8</maven.compiler.target>
5859
<maven.compiler.source>1.8</maven.compiler.source>
5960

60-
<carbon.did.version>0.9.1-SNAPSHOT</carbon.did.version>
61+
<carbon.did.version>0.9.2</carbon.did.version>
6162

6263
<copper.multicodec.version>2.1.0</copper.multicodec.version>
6364
<copper.multibase.version>4.0.0</copper.multibase.version>
@@ -167,7 +168,7 @@
167168
<plugin>
168169
<groupId>org.apache.maven.plugins</groupId>
169170
<artifactId>maven-gpg-plugin</artifactId>
170-
<version>3.2.7</version>
171+
<version>3.2.8</version>
171172
<executions>
172173
<execution>
173174
<id>sign-artifacts</id>
@@ -179,24 +180,17 @@
179180
</executions>
180181
</plugin>
181182
<plugin>
182-
<groupId>org.sonatype.plugins</groupId>
183-
<artifactId>nexus-staging-maven-plugin</artifactId>
184-
<version>1.7.0</version>
183+
<groupId>org.sonatype.central</groupId>
184+
<artifactId>central-publishing-maven-plugin</artifactId>
185+
<version>0.8.0</version>
185186
<extensions>true</extensions>
186187
<configuration>
187-
<serverId>ossrh</serverId>
188-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
189-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
188+
<publishingServerId>central</publishingServerId>
189+
<autoPublish>true</autoPublish>
190190
</configuration>
191191
</plugin>
192192
</plugins>
193193
</build>
194-
<distributionManagement>
195-
<snapshotRepository>
196-
<id>ossrh</id>
197-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
198-
</snapshotRepository>
199-
</distributionManagement>
200194
</profile>
201195
</profiles>
202196
</project>

0 commit comments

Comments
 (0)