File tree Expand file tree Collapse file tree 5 files changed +187
-152
lines changed Expand file tree Collapse file tree 5 files changed +187
-152
lines changed Original file line number Diff line number Diff line change
1
+ # The ORGiD DID Resolver App
2
+
3
+ ## Flow
4
+
5
+ ``` mermaid
6
+ graph LR
7
+ REQUEST[Resolution<br>request] -->|DID<br>request options| IS_CACHED{DID<br>in cache}
8
+ IS_CACHED -->|No| QUEUE[Resolution<br>queue]
9
+ QUEUE -->|Resolution<br>task| RESOLUTION[DID<br>resolution]
10
+ IS_CACHED -->|Yes| DID_REPORT[Resolution<br>report]
11
+ RESOLUTION -->|DID<br>Resolution<br>result| DID_REPORT
12
+ RESOLUTION -->|request<br>options| IS_HIERARCHY{Hierarchy<br>parser<br>enabled}
13
+ RESOLUTION -->|request<br>options| IS_CREDENTIALS{Credentials<br>verification<br>enabled}
14
+ IS_HIERARCHY -->|Yes| HIERARCHY_PARSER[Parse<br>organization<br>hierarchy]
15
+ IS_HIERARCHY -->|No| DID_REPORT
16
+ IS_CREDENTIALS -->|Yes| CREDENTIALS_VERIFICATION[Credentials<br>verification]
17
+ IS_CREDENTIALS -->|No| DID_REPORT
18
+ HIERARCHY_PARSER -->|Organization<br>hierarchy<br>report| DID_REPORT
19
+ CREDENTIALS_VERIFICATION -->|Credentials<br>verification<br>report| DID_REPORT
20
+ ```
Original file line number Diff line number Diff line change @@ -159,3 +159,7 @@ console.log(didResponse);
159
159
// }
160
160
// }
161
161
```
162
+
163
+ ## TODO
164
+
165
+ - Create a utility for verification of verifiable credentials and add to the resolver the feature of automatic VC verification
Original file line number Diff line number Diff line change 33
33
},
34
34
"dependencies" : {
35
35
"@windingtree/org.id" : " 3.0.0-beta.6" ,
36
- "@windingtree/org.id-auth" : " 1.0.0-beta.27 " ,
37
- "@windingtree/org.id-core" : " 1.0.0-beta.27 " ,
36
+ "@windingtree/org.id-auth" : " 1.0.0-beta.28 " ,
37
+ "@windingtree/org.id-core" : " 1.0.0-beta.28 " ,
38
38
"@windingtree/org.id-utils" : " 1.0.0-beta.26" ,
39
- "@windingtree/org.json-schema" : " 1.0.0-beta.5 " ,
40
- "ethers" : " 5.5.1 " ,
39
+ "@windingtree/org.json-schema" : " 1.0.0-beta.8 " ,
40
+ "ethers" : " 5.5.2 " ,
41
41
"luxon" : " 2.1.1"
42
42
},
43
43
"devDependencies" : {
44
- "@istanbuljs/nyc-config-typescript" : " 1.0.1 " ,
45
- "@nomiclabs/hardhat-ethers" : " 2.0.2 " ,
46
- "@types/chai" : " 4.2.22 " ,
44
+ "@istanbuljs/nyc-config-typescript" : " 1.0.2 " ,
45
+ "@nomiclabs/hardhat-ethers" : " 2.0.3 " ,
46
+ "@types/chai" : " 4.3.0 " ,
47
47
"@types/chai-as-promised" : " 7.1.4" ,
48
48
"@types/luxon" : " 2.0.7" ,
49
49
"@types/mocha" : " 9.0.0" ,
50
- "@windingtree/org.id-test-setup" : " 1.0.0-beta.27 " ,
50
+ "@windingtree/org.id-test-setup" : " 1.0.0-beta.28 " ,
51
51
"chai" : " 4.3.4" ,
52
52
"chai-as-promised" : " 7.1.1" ,
53
- "eslint" : " 8.3.0 " ,
53
+ "eslint" : " 8.4.1 " ,
54
54
"hardhat" : " 2.7.0" ,
55
55
"nyc" : " 15.1.0" ,
56
56
"ts-node" : " 10.4.0" ,
Original file line number Diff line number Diff line change @@ -166,6 +166,7 @@ export const setupFetchers = (fetchers: FetcherConfig[]): Fetchers =>
166
166
) ;
167
167
168
168
// Parse raw DID and extract its parts
169
+ // @todo Move `parseDid` to SDK utils
169
170
export const parseDid = ( did : string ) : ParsedDid => {
170
171
const groupedCheck = regexp . didGrouped . exec ( did ) as DidGroupedCheckResult ;
171
172
@@ -192,6 +193,7 @@ export const parseDid = (did: string): ParsedDid => {
192
193
} ;
193
194
194
195
// Parse raw ORG.JSON uri and extract an uri type
196
+ // @todo Move `parseUri` to SDK utils
195
197
export const parseUri = ( uri : string ) : ParsedUri => {
196
198
let parsedUri : string ;
197
199
let type : string ;
@@ -424,9 +426,6 @@ export const OrgIdResolver = (options: ResolverOptions): OrgIdResolverAPI => {
424
426
case 'EcdsaSecp256k1RecoveryMethod2020' :
425
427
case 'JsonWebKey2020' :
426
428
case 'EcdsaSecp256k1VerificationKey2019' :
427
- // case 'Ed25519VerificationKey2018':
428
- // case 'RsaVerificationKey2018':
429
- // case 'X25519KeyAgreementKey2019':
430
429
431
430
const publicKey =
432
431
verificationMethod . blockchainAccountId ||
You can’t perform that action at this time.
0 commit comments