@twin.org/identity-connector-universal 0.0.3-next.9 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/examples.md CHANGED
@@ -1 +1,32 @@
1
- # @twin.org/identity-connector-universal - Examples
1
+ # Identity Connector Universal Examples
2
+
3
+ Use these snippets when you need to resolve DIDs through a universal resolver endpoint in application code or service handlers.
4
+
5
+ ## UniversalResolverConnector
6
+
7
+ ```typescript
8
+ import { UniversalResolverConnector } from '@twin.org/identity-connector-universal';
9
+
10
+ const resolver = new UniversalResolverConnector({
11
+ config: {
12
+ endpoint: 'https://uniresolver.io'
13
+ }
14
+ });
15
+
16
+ const className = resolver.className();
17
+ console.log(className); // UniversalResolverConnector
18
+ ```
19
+
20
+ ```typescript
21
+ import { UniversalResolverConnector } from '@twin.org/identity-connector-universal';
22
+
23
+ const resolver = new UniversalResolverConnector({
24
+ config: {
25
+ endpoint: 'https://uniresolver.io'
26
+ }
27
+ });
28
+
29
+ const didDocument = await resolver.resolveDocument('did:web:example.com:user:123');
30
+
31
+ console.log(didDocument.id); // did:web:example.com:user:123
32
+ ```
@@ -28,7 +28,7 @@ The options for the identity connector.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### NAMESPACE
31
+ ### NAMESPACE {#namespace}
32
32
 
33
33
  > `readonly` `static` **NAMESPACE**: `string` = `"universal"`
34
34
 
@@ -36,7 +36,7 @@ The namespace supported by the identity connector.
36
36
 
37
37
  ***
38
38
 
39
- ### CLASS\_NAME
39
+ ### CLASS\_NAME {#class_name}
40
40
 
41
41
  > `readonly` `static` **CLASS\_NAME**: `string`
42
42
 
@@ -44,7 +44,7 @@ Runtime name for the class.
44
44
 
45
45
  ## Methods
46
46
 
47
- ### className()
47
+ ### className() {#classname}
48
48
 
49
49
  > **className**(): `string`
50
50
 
@@ -62,7 +62,25 @@ The class name of the component.
62
62
 
63
63
  ***
64
64
 
65
- ### resolveDocument()
65
+ ### health() {#health}
66
+
67
+ > **health**(): `Promise`\<`IHealth`[]\>
68
+
69
+ Returns the health status of the component.
70
+
71
+ #### Returns
72
+
73
+ `Promise`\<`IHealth`[]\>
74
+
75
+ The health status of the component.
76
+
77
+ #### Implementation of
78
+
79
+ `IIdentityResolverConnector.health`
80
+
81
+ ***
82
+
83
+ ### resolveDocument() {#resolvedocument}
66
84
 
67
85
  > **resolveDocument**(`documentId`): `Promise`\<`IDidDocument`\>
68
86
 
@@ -4,7 +4,7 @@ Configuration for the Universal Resolver Connector.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### endpoint
7
+ ### endpoint {#endpoint}
8
8
 
9
9
  > **endpoint**: `string`
10
10
 
@@ -4,7 +4,7 @@ Options for the Universal Resolver Connector constructor.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### config
7
+ ### config {#config}
8
8
 
9
9
  > **config**: [`IUniversalResolverConnectorConfig`](IUniversalResolverConnectorConfig.md)
10
10
 
package/locales/en.json CHANGED
@@ -1,4 +1,10 @@
1
1
  {
2
+ "health": {
3
+ "universalResolverConnector": {
4
+ "healthDescription": "Connectivity and availability of the universal resolver \"{endpoint}\"",
5
+ "resolverHealthCheckFailed": "Failed to check universal resolver health status \"{endpoint}\""
6
+ }
7
+ },
2
8
  "error": {
3
9
  "universalResolverConnector": {
4
10
  "resolveDocumentFailed": "Resolving the document failed \"{documentId}\""
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/identity-connector-universal",
3
- "version": "0.0.3-next.9",
4
- "description": "Identity connector implementation using universal resolver",
3
+ "version": "0.9.0",
4
+ "description": "Connector for resolving decentralised identifiers through the Universal Resolver ecosystem.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/identity.git",
7
+ "url": "git+https://github.com/iotaledger/twin-identity.git",
8
8
  "directory": "packages/identity-connector-universal"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,11 +14,11 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "next",
18
- "@twin.org/identity-models": "0.0.3-next.9",
19
- "@twin.org/nameof": "next",
20
- "@twin.org/standards-w3c-did": "next",
21
- "@twin.org/web": "next"
17
+ "@twin.org/core": "^0.9.0",
18
+ "@twin.org/identity-models": "^0.9.0",
19
+ "@twin.org/nameof": "^0.9.0",
20
+ "@twin.org/standards-w3c-did": "^0.9.0",
21
+ "@twin.org/web": "^0.9.0"
22
22
  },
23
23
  "main": "./dist/es/index.js",
24
24
  "types": "./dist/types/index.d.ts",
@@ -51,7 +51,7 @@
51
51
  "integration"
52
52
  ],
53
53
  "bugs": {
54
- "url": "git+https://github.com/twinfoundation/identity/issues"
54
+ "url": "git+https://github.com/iotaledger/twin-identity/issues"
55
55
  },
56
56
  "homepage": "https://twindev.org"
57
57
  }