Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor @web5/dids to support first class Key Management #393

Merged
merged 39 commits into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
073c0f3
Update Web5 Test Vectors to latest
frankhinek Jan 10, 2024
22c001f
Fix issue with c8 not reporting code coverage and bump version
frankhinek Jan 10, 2024
e17d5e8
Remove unnecessary option in crypto tsconfig and enable strict mode f…
frankhinek Jan 10, 2024
09083b2
Add JWK Set to crypto package
frankhinek Jan 12, 2024
7b51b76
Add did:jwk and did:web implementations
frankhinek Jan 12, 2024
1187a09
Add utility type to @web5/common
frankhinek Jan 15, 2024
b8cd77e
Improve DID Utility functions
frankhinek Jan 15, 2024
b79dfff
Add FixedLengthArray utility type
frankhinek Jan 21, 2024
42bae59
Add support for Base32Z to Convert utility
frankhinek Jan 21, 2024
197181c
Improve JWK type
frankhinek Jan 21, 2024
2da26ee
Add InferKeyGeneratorAlgorithm utility type
frankhinek Jan 21, 2024
cf4cb33
Remove did-resolver dependency
frankhinek Jan 21, 2024
80ae0bd
Temporarily disable old implementations
frankhinek Jan 21, 2024
de2cf33
Update DID JWK and DHT implementations
frankhinek Jan 22, 2024
6eff583
Rename createFromKeys to fromKeys and change default publishing behavior
frankhinek Jan 22, 2024
fcc2796
Update JWK and DHT implementations
frankhinek Jan 24, 2024
0b0693f
Rename DidKeySet to PortableDid and add uri
frankhinek Jan 25, 2024
be13b71
Reorganize tests and reintroduce DidResolver
frankhinek Jan 25, 2024
d14076a
Update package-lock.json
frankhinek Jan 25, 2024
4148742
Rename P256 to Secp256r1 and add minimal tests
frankhinek Jan 25, 2024
53aa79b
Add docs for undocumented methods
frankhinek Jan 25, 2024
00700f7
Finish reintroducing DID resolvers
frankhinek Jan 25, 2024
cfb8a44
Support secp256k1 as an algorithm identifier for generateKey()
frankhinek Jan 26, 2024
43f2507
Improve support for secp256r1
frankhinek Jan 26, 2024
0bfbc5b
Rename to LocalKeyManager & AwsKeyManager and improve docs
frankhinek Jan 26, 2024
b7b8d79
Fix Ed25519.validatePublicKey method signature
frankhinek Jan 27, 2024
11b69ed
Refactor of DID Key
frankhinek Jan 27, 2024
7ec833e
Complete implementation of DID Key
frankhinek Jan 29, 2024
29a27ab
Add KeyCompressor type to @web5/crypto
frankhinek Jan 31, 2024
64120f0
Complete refactor of DidIon
frankhinek Jan 31, 2024
4464e53
Complete adding secp256r1 test vectors
frankhinek Jan 31, 2024
2ebbd77
Remove old dependencies and bump versions
frankhinek Jan 31, 2024
6cb1abb
Resolve package dependency issue
frankhinek Jan 31, 2024
c26d27e
Remove old test-vectors directory
frankhinek Jan 31, 2024
38ba056
Remove references to tags in the XChaCha20Poly1305 comments
frankhinek Jan 31, 2024
258446c
Remove duplication from DidDhtUtils.identifierToIdentityKey()
frankhinek Jan 31, 2024
53b6712
Correct typo in comments
frankhinek Jan 31, 2024
0a97f05
Update crypto README
frankhinek Feb 1, 2024
a3e4448
Correct typo, add DHT test, and remove unused file
frankhinek Feb 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5,302 changes: 1,766 additions & 3,536 deletions package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions packages/agent/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"esbuild": "0.19.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/api/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
2 changes: 1 addition & 1 deletion packages/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"esbuild": "0.19.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/common/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"esbuild": "0.19.8",
Expand Down
8 changes: 4 additions & 4 deletions packages/credentials/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
2 changes: 1 addition & 1 deletion packages/credentials/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"esbuild": "0.19.8",
"eslint": "8.47.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/crypto-aws-kms/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto-aws-kms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"@web5/common": "0.2.2",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"eslint": "8.47.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"esbuild": "0.19.8",
Expand Down
16 changes: 16 additions & 0 deletions packages/crypto/src/jose/jwk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,22 @@ export type JwkKeyPair = {
*/
export type Jwk = PrivateKeyJwk | PublicKeyJwk;

/**
* JSON Web Key Set ({@link https://datatracker.ietf.org/doc/html/rfc7517 | JWK Set})
*
* @remarks
* A JWK Set is a JSON object that represents a set of JWKs. The JSON object MUST have a "keys"
* member, with its value being an array of JWKs.
*
* Additional members can be present in the JWK Set but member names MUST be unique. If not
* understood by implementations encountering them, they MUST be ignored. Parameters for
* representing additional properties of JWK Sets should either be registered in the IANA
* "JSON Web Key Set Parameters" registry or be a value that contains a Collision-Resistant Name.
*/
export interface JwkSet {
keys: Jwk[]
}

/**
* Computes the thumbprint of a JSON Web Key (JWK) using the method
* specified in RFC 7638. This function accepts RSA, EC, OKP, and oct keys
Expand Down
1 change: 0 additions & 1 deletion packages/crypto/tests/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"compilerOptions": {
"outDir": "compiled",
"declarationDir": "compiled/types",
"resolveJsonModule": true,
"sourceMap": true
},
"include": [
Expand Down
8 changes: 4 additions & 4 deletions packages/dids/.c8rc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
".js"
],
"include": [
"tests/compiled/src/**"
"tests/compiled/**/src/**"
],
"exclude": [
"tests/compiled/src/index.js",
"tests/compiled/src/types.js",
"tests/compiled/src/types/**"
"tests/compiled/**/src/index.js",
"tests/compiled/**/src/types.js",
"tests/compiled/**/src/types/**"
],
"reporter": [
"cobertura",
Expand Down
6 changes: 3 additions & 3 deletions packages/dids/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@web5/dids",
"version": "0.2.4",
"version": "0.3.0",
"description": "TBD DIDs library",
"type": "module",
"main": "./dist/cjs/index.js",
Expand Down Expand Up @@ -78,7 +78,7 @@
"@decentralized-identity/ion-pow-sdk": "1.0.17",
"@decentralized-identity/ion-sdk": "1.0.1",
"@web5/common": "0.2.2",
"@web5/crypto": "0.2.2",
"@web5/crypto": "0.3.0",
"did-resolver": "4.1.0",
"dns-packet": "5.6.1",
"level": "8.0.0",
Expand All @@ -98,7 +98,7 @@
"@typescript-eslint/parser": "6.4.0",
"@web/test-runner": "0.18.0",
"@web/test-runner-playwright": "0.11.0",
"c8": "8.0.1",
"c8": "9.0.0",
"chai": "4.3.10",
"chai-as-promised": "7.1.1",
"esbuild": "0.19.8",
Expand Down
Loading