@twin.org/identity-connector-universal 0.0.1 → 0.0.2-next.10
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/README.md +1 -1
- package/dist/cjs/index.cjs +6 -6
- package/dist/esm/index.mjs +6 -6
- package/dist/types/universalResolverConnector.d.ts +1 -1
- package/docs/changelog.md +151 -0
- package/docs/reference/classes/UniversalResolverConnector.md +1 -5
- package/locales/en.json +0 -1
- package/package.json +25 -7
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ npm install @twin.org/identity-connector-universal
|
|
|
13
13
|
To test the universal resolver you will need to run the docker image.
|
|
14
14
|
|
|
15
15
|
```shell
|
|
16
|
-
docker run -d --name twin-identity-universal -e NETWORK=testnet -p
|
|
16
|
+
docker run -d --name twin-identity-universal -e NETWORK=testnet -p 8180:8080 iotaledger/uni-resolver-driver-iota:v0.2.0-alpha
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Examples
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -16,7 +16,7 @@ class UniversalResolverConnector {
|
|
|
16
16
|
/**
|
|
17
17
|
* Runtime name for the class.
|
|
18
18
|
*/
|
|
19
|
-
CLASS_NAME = "UniversalResolverConnector";
|
|
19
|
+
static CLASS_NAME = "UniversalResolverConnector";
|
|
20
20
|
/**
|
|
21
21
|
* The url for the resolver.
|
|
22
22
|
* @internal
|
|
@@ -27,9 +27,9 @@ class UniversalResolverConnector {
|
|
|
27
27
|
* @param options The options for the identity connector.
|
|
28
28
|
*/
|
|
29
29
|
constructor(options) {
|
|
30
|
-
core.Guards.object(
|
|
31
|
-
core.Guards.object(
|
|
32
|
-
core.Guards.stringValue(
|
|
30
|
+
core.Guards.object(UniversalResolverConnector.CLASS_NAME, "options", options);
|
|
31
|
+
core.Guards.object(UniversalResolverConnector.CLASS_NAME, "options.config", options.config);
|
|
32
|
+
core.Guards.stringValue(UniversalResolverConnector.CLASS_NAME, "options.config.endpoint", options.config.endpoint);
|
|
33
33
|
this._resolverEndpoint = options.config.endpoint;
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -40,11 +40,11 @@ class UniversalResolverConnector {
|
|
|
40
40
|
*/
|
|
41
41
|
async resolveDocument(documentId) {
|
|
42
42
|
try {
|
|
43
|
-
const result = await web.FetchHelper.fetchJson(
|
|
43
|
+
const result = await web.FetchHelper.fetchJson(UniversalResolverConnector.CLASS_NAME, `${core.StringHelper.trimTrailingSlashes(this._resolverEndpoint)}/1.0/identifiers/${encodeURIComponent(documentId)}`, web.HttpMethod.GET);
|
|
44
44
|
return result.didDocument;
|
|
45
45
|
}
|
|
46
46
|
catch (error) {
|
|
47
|
-
throw new core.GeneralError(
|
|
47
|
+
throw new core.GeneralError(UniversalResolverConnector.CLASS_NAME, "resolveDocumentFailed", { documentId }, error);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
}
|
package/dist/esm/index.mjs
CHANGED
|
@@ -14,7 +14,7 @@ class UniversalResolverConnector {
|
|
|
14
14
|
/**
|
|
15
15
|
* Runtime name for the class.
|
|
16
16
|
*/
|
|
17
|
-
CLASS_NAME = "UniversalResolverConnector";
|
|
17
|
+
static CLASS_NAME = "UniversalResolverConnector";
|
|
18
18
|
/**
|
|
19
19
|
* The url for the resolver.
|
|
20
20
|
* @internal
|
|
@@ -25,9 +25,9 @@ class UniversalResolverConnector {
|
|
|
25
25
|
* @param options The options for the identity connector.
|
|
26
26
|
*/
|
|
27
27
|
constructor(options) {
|
|
28
|
-
Guards.object(
|
|
29
|
-
Guards.object(
|
|
30
|
-
Guards.stringValue(
|
|
28
|
+
Guards.object(UniversalResolverConnector.CLASS_NAME, "options", options);
|
|
29
|
+
Guards.object(UniversalResolverConnector.CLASS_NAME, "options.config", options.config);
|
|
30
|
+
Guards.stringValue(UniversalResolverConnector.CLASS_NAME, "options.config.endpoint", options.config.endpoint);
|
|
31
31
|
this._resolverEndpoint = options.config.endpoint;
|
|
32
32
|
}
|
|
33
33
|
/**
|
|
@@ -38,11 +38,11 @@ class UniversalResolverConnector {
|
|
|
38
38
|
*/
|
|
39
39
|
async resolveDocument(documentId) {
|
|
40
40
|
try {
|
|
41
|
-
const result = await FetchHelper.fetchJson(
|
|
41
|
+
const result = await FetchHelper.fetchJson(UniversalResolverConnector.CLASS_NAME, `${StringHelper.trimTrailingSlashes(this._resolverEndpoint)}/1.0/identifiers/${encodeURIComponent(documentId)}`, HttpMethod.GET);
|
|
42
42
|
return result.didDocument;
|
|
43
43
|
}
|
|
44
44
|
catch (error) {
|
|
45
|
-
throw new GeneralError(
|
|
45
|
+
throw new GeneralError(UniversalResolverConnector.CLASS_NAME, "resolveDocumentFailed", { documentId }, error);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -12,7 +12,7 @@ export declare class UniversalResolverConnector implements IIdentityResolverConn
|
|
|
12
12
|
/**
|
|
13
13
|
* Runtime name for the class.
|
|
14
14
|
*/
|
|
15
|
-
readonly CLASS_NAME: string;
|
|
15
|
+
static readonly CLASS_NAME: string;
|
|
16
16
|
/**
|
|
17
17
|
* Create a new instance of UniversalResolverConnector.
|
|
18
18
|
* @param options The options for the identity connector.
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,156 @@
|
|
|
1
1
|
# @twin.org/identity-connector-Universal - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.9...identity-connector-universal-v0.0.2-next.10) (2025-10-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Dependencies
|
|
12
|
+
|
|
13
|
+
* The following workspace dependencies were updated
|
|
14
|
+
* dependencies
|
|
15
|
+
* @twin.org/identity-models bumped from 0.0.2-next.9 to 0.0.2-next.10
|
|
16
|
+
|
|
17
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.8...identity-connector-universal-v0.0.2-next.9) (2025-10-09)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add validate-locales ([04d74b4](https://github.com/twinfoundation/identity/commit/04d74b4d1ebe42672e8ca75a7bdb8e3556afd0be))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Dependencies
|
|
26
|
+
|
|
27
|
+
* The following workspace dependencies were updated
|
|
28
|
+
* dependencies
|
|
29
|
+
* @twin.org/identity-models bumped from 0.0.2-next.8 to 0.0.2-next.9
|
|
30
|
+
|
|
31
|
+
## [0.0.2-next.8](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.7...identity-connector-universal-v0.0.2-next.8) (2025-09-25)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Miscellaneous Chores
|
|
35
|
+
|
|
36
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
### Dependencies
|
|
40
|
+
|
|
41
|
+
* The following workspace dependencies were updated
|
|
42
|
+
* dependencies
|
|
43
|
+
* @twin.org/identity-models bumped from 0.0.2-next.7 to 0.0.2-next.8
|
|
44
|
+
|
|
45
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.6...identity-connector-universal-v0.0.2-next.7) (2025-09-23)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Miscellaneous Chores
|
|
49
|
+
|
|
50
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
### Dependencies
|
|
54
|
+
|
|
55
|
+
* The following workspace dependencies were updated
|
|
56
|
+
* dependencies
|
|
57
|
+
* @twin.org/identity-models bumped from 0.0.2-next.6 to 0.0.2-next.7
|
|
58
|
+
|
|
59
|
+
## [0.0.2-next.6](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.5...identity-connector-universal-v0.0.2-next.6) (2025-09-23)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Miscellaneous Chores
|
|
63
|
+
|
|
64
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
### Dependencies
|
|
68
|
+
|
|
69
|
+
* The following workspace dependencies were updated
|
|
70
|
+
* dependencies
|
|
71
|
+
* @twin.org/identity-models bumped from 0.0.2-next.5 to 0.0.2-next.6
|
|
72
|
+
|
|
73
|
+
## [0.0.2-next.5](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.4...identity-connector-universal-v0.0.2-next.5) (2025-09-15)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Miscellaneous Chores
|
|
77
|
+
|
|
78
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
### Dependencies
|
|
82
|
+
|
|
83
|
+
* The following workspace dependencies were updated
|
|
84
|
+
* dependencies
|
|
85
|
+
* @twin.org/identity-models bumped from 0.0.2-next.4 to 0.0.2-next.5
|
|
86
|
+
|
|
87
|
+
## [0.0.2-next.4](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.3...identity-connector-universal-v0.0.2-next.4) (2025-09-12)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### Miscellaneous Chores
|
|
91
|
+
|
|
92
|
+
* **identity-connector-universal:** Synchronize repo versions
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
### Dependencies
|
|
96
|
+
|
|
97
|
+
* The following workspace dependencies were updated
|
|
98
|
+
* dependencies
|
|
99
|
+
* @twin.org/identity-models bumped from 0.0.2-next.3 to 0.0.2-next.4
|
|
100
|
+
|
|
101
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.2...identity-connector-universal-v0.0.2-next.3) (2025-08-29)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
### Features
|
|
105
|
+
|
|
106
|
+
* eslint migration to flat config ([fd6246d](https://github.com/twinfoundation/identity/commit/fd6246d566280b6d5d10a108eb1e92c4b510f2f2))
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
### Dependencies
|
|
110
|
+
|
|
111
|
+
* The following workspace dependencies were updated
|
|
112
|
+
* dependencies
|
|
113
|
+
* @twin.org/identity-models bumped from 0.0.2-next.2 to 0.0.2-next.3
|
|
114
|
+
|
|
115
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.1...identity-connector-universal-v0.0.2-next.2) (2025-08-20)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* update framework core ([c824497](https://github.com/twinfoundation/identity/commit/c82449709af0215eb7af496cf687c93fb30b5ae0))
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
### Dependencies
|
|
124
|
+
|
|
125
|
+
* The following workspace dependencies were updated
|
|
126
|
+
* dependencies
|
|
127
|
+
* @twin.org/identity-models bumped from 0.0.2-next.1 to 0.0.2-next.2
|
|
128
|
+
|
|
129
|
+
## [0.0.2-next.1](https://github.com/twinfoundation/identity/compare/identity-connector-universal-v0.0.2-next.0...identity-connector-universal-v0.0.2-next.1) (2025-08-18)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Features
|
|
133
|
+
|
|
134
|
+
* add mainnet support ([af56a38](https://github.com/twinfoundation/identity/commit/af56a382837896cd4e13d5814c0924c46658b99c))
|
|
135
|
+
* identity key separator use slash ([1319d0d](https://github.com/twinfoundation/identity/commit/1319d0d07164a36b3ec279e6421b8835ffefc3d3))
|
|
136
|
+
* improve url construction ([544a435](https://github.com/twinfoundation/identity/commit/544a435dadb90b9e29533f4a4ce09725268d04bd))
|
|
137
|
+
* re-use vault keys if available ([5a848d7](https://github.com/twinfoundation/identity/commit/5a848d7520829d9c891ec889fd773fbc0ee77ba5))
|
|
138
|
+
* update comment ([436e030](https://github.com/twinfoundation/identity/commit/436e030e9480bdc4e35b44ad7199a5ccc7a7b31e))
|
|
139
|
+
* use shared store mechanism ([#27](https://github.com/twinfoundation/identity/issues/27)) ([ce41f3f](https://github.com/twinfoundation/identity/commit/ce41f3fc3da1b206ec06da7ea5b2c968f788804d))
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
### Bug Fixes
|
|
143
|
+
|
|
144
|
+
* Import path and bump version ([#21](https://github.com/twinfoundation/identity/issues/21)) ([ccea845](https://github.com/twinfoundation/identity/commit/ccea845bf32562267280bc1b3dde1c9af1a00360))
|
|
145
|
+
* Install sdk-wasm ([#20](https://github.com/twinfoundation/identity/issues/20)) ([75ec14e](https://github.com/twinfoundation/identity/commit/75ec14e072f8c219863a1c028a3b0783802086e9))
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
### Dependencies
|
|
149
|
+
|
|
150
|
+
* The following workspace dependencies were updated
|
|
151
|
+
* dependencies
|
|
152
|
+
* @twin.org/identity-models bumped from 0.0.2-next.0 to 0.0.2-next.1
|
|
153
|
+
|
|
3
154
|
## 0.0.1 (2025-07-08)
|
|
4
155
|
|
|
5
156
|
|
|
@@ -38,14 +38,10 @@ The namespace supported by the identity connector.
|
|
|
38
38
|
|
|
39
39
|
### CLASS\_NAME
|
|
40
40
|
|
|
41
|
-
> `readonly` **CLASS\_NAME**: `string`
|
|
41
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
42
42
|
|
|
43
43
|
Runtime name for the class.
|
|
44
44
|
|
|
45
|
-
#### Implementation of
|
|
46
|
-
|
|
47
|
-
`IIdentityResolverConnector.CLASS_NAME`
|
|
48
|
-
|
|
49
45
|
## Methods
|
|
50
46
|
|
|
51
47
|
### resolveDocument()
|
package/locales/en.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/identity-connector-universal",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-next.10",
|
|
4
4
|
"description": "Identity connector implementation using universal resolver",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"node": ">=20.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/identity-models": "
|
|
19
|
-
"@twin.org/nameof": "
|
|
20
|
-
"@twin.org/standards-w3c-did": "
|
|
21
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/core": "next",
|
|
18
|
+
"@twin.org/identity-models": "0.0.2-next.10",
|
|
19
|
+
"@twin.org/nameof": "next",
|
|
20
|
+
"@twin.org/standards-w3c-did": "next",
|
|
21
|
+
"@twin.org/web": "next"
|
|
22
22
|
},
|
|
23
23
|
"main": "./dist/cjs/index.cjs",
|
|
24
24
|
"module": "./dist/esm/index.mjs",
|
|
@@ -37,5 +37,23 @@
|
|
|
37
37
|
"dist/types",
|
|
38
38
|
"locales",
|
|
39
39
|
"docs"
|
|
40
|
-
]
|
|
40
|
+
],
|
|
41
|
+
"keywords": [
|
|
42
|
+
"twin",
|
|
43
|
+
"trade",
|
|
44
|
+
"iota",
|
|
45
|
+
"framework",
|
|
46
|
+
"blockchain",
|
|
47
|
+
"identity",
|
|
48
|
+
"did",
|
|
49
|
+
"credentials",
|
|
50
|
+
"authentication",
|
|
51
|
+
"connector",
|
|
52
|
+
"adapter",
|
|
53
|
+
"integration"
|
|
54
|
+
],
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "git+https://github.com/twinfoundation/identity/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://twindev.org"
|
|
41
59
|
}
|