@twin.org/identity-connector-entity-storage 0.9.2 → 0.9.3-next.1
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/dist/es/entityStorageIdentityConnector.js +207 -138
- package/dist/es/entityStorageIdentityConnector.js.map +1 -1
- package/dist/es/index.js +1 -0
- package/dist/es/index.js.map +1 -1
- package/dist/es/models/IEntityStorageIdentityConnectorConfig.js +4 -0
- package/dist/es/models/IEntityStorageIdentityConnectorConfig.js.map +1 -0
- package/dist/es/models/IEntityStorageIdentityConnectorConstructorOptions.js.map +1 -1
- package/dist/types/entityStorageIdentityConnector.d.ts +11 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/models/IEntityStorageIdentityConnectorConfig.d.ts +26 -0
- package/dist/types/models/IEntityStorageIdentityConnectorConstructorOptions.d.ts +5 -0
- package/docs/changelog.md +55 -0
- package/docs/reference/classes/EntityStorageIdentityConnector.md +36 -1
- package/docs/reference/index.md +1 -0
- package/docs/reference/interfaces/IEntityStorageIdentityConnectorConfig.md +46 -0
- package/docs/reference/interfaces/IEntityStorageIdentityConnectorConstructorOptions.md +8 -0
- package/locales/en.json +1 -0
- package/package.json +11 -11
package/dist/types/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from "./entities/identityProfile.js";
|
|
|
3
3
|
export * from "./entityStorageIdentityConnector.js";
|
|
4
4
|
export * from "./entityStorageIdentityProfileConnector.js";
|
|
5
5
|
export * from "./entityStorageIdentityResolverConnector.js";
|
|
6
|
+
export * from "./models/IEntityStorageIdentityConnectorConfig.js";
|
|
6
7
|
export * from "./models/IEntityStorageIdentityConnectorConstructorOptions.js";
|
|
7
8
|
export * from "./models/IEntityStorageIdentityProfileConnectorConstructorOptions.js";
|
|
8
9
|
export * from "./models/IEntityStorageIdentityResolverConnectorConstructorOptions.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for the Entity Storage Identity Connector.
|
|
3
|
+
*/
|
|
4
|
+
export interface IEntityStorageIdentityConnectorConfig {
|
|
5
|
+
/**
|
|
6
|
+
* TTL in ms for caching DID documents resolved for the connector's own sign/mutate
|
|
7
|
+
* operations (create/update/revoke on an identity this connector controls). 0 disables
|
|
8
|
+
* caching. Does not affect proof or credential verification of third-party claims, which
|
|
9
|
+
* is never cached by this connector. Refreshed by every mutation made through this
|
|
10
|
+
* connector instance; a mutation made through a different instance or out-of-band is not
|
|
11
|
+
* observed until the entry's TTL expires.
|
|
12
|
+
* @default 30000
|
|
13
|
+
*/
|
|
14
|
+
didResolutionCacheTtlMs?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum number of DID documents kept in the own-DID resolution cache.
|
|
17
|
+
* Only used when didResolutionCacheTtlMs > 0.
|
|
18
|
+
* @default 1000
|
|
19
|
+
*/
|
|
20
|
+
didResolutionCacheCapacity?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Maximum time in milliseconds to wait for own-DID cache getOrSet mutex acquisition.
|
|
23
|
+
* Only used when didResolutionCacheTtlMs > 0.
|
|
24
|
+
*/
|
|
25
|
+
didResolutionCacheMutexTimeoutMs?: number;
|
|
26
|
+
}
|
|
@@ -1,6 +1,11 @@
|
|
|
1
|
+
import type { IEntityStorageIdentityConnectorConfig } from "./IEntityStorageIdentityConnectorConfig.js";
|
|
1
2
|
import type { IEntityStorageIdentityResolverConnectorConstructorOptions } from "./IEntityStorageIdentityResolverConnectorConstructorOptions.js";
|
|
2
3
|
/**
|
|
3
4
|
* Options for the entity storage identity connector constructor.
|
|
4
5
|
*/
|
|
5
6
|
export interface IEntityStorageIdentityConnectorConstructorOptions extends IEntityStorageIdentityResolverConnectorConstructorOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Configuration for the connector.
|
|
9
|
+
*/
|
|
10
|
+
config?: IEntityStorageIdentityConnectorConfig;
|
|
6
11
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,60 @@
|
|
|
1
1
|
# @twin.org/identity-connector-entity-storage- Changelog
|
|
2
2
|
|
|
3
|
+
## [0.9.3-next.1](https://github.com/iotaledger/twin-identity/compare/identity-connector-entity-storage-v0.9.3-next.0...identity-connector-entity-storage-v0.9.3-next.1) (2026-08-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add addAlsoKnownAs to identity connector ([#117](https://github.com/iotaledger/twin-identity/issues/117)) ([aa27cff](https://github.com/iotaledger/twin-identity/commit/aa27cff88e61e7c8c6e32aeb437fb01c6ee9f57a))
|
|
9
|
+
* add context id features ([#62](https://github.com/iotaledger/twin-identity/issues/62)) ([e02ecca](https://github.com/iotaledger/twin-identity/commit/e02ecca9c45a849104bfbf7bc18a1f44e6eea8a1))
|
|
10
|
+
* add expiration date option to vc creation ([73e05e1](https://github.com/iotaledger/twin-identity/commit/73e05e1ae61112c7e056889969751f4ff82d9f29))
|
|
11
|
+
* add identity remove ([eebc13f](https://github.com/iotaledger/twin-identity/commit/eebc13f4c2cd994d2d9cce4da2128fb346c80ba7))
|
|
12
|
+
* add optional jwt payload and headers to vc and vp tokens ([#135](https://github.com/iotaledger/twin-identity/issues/135)) ([aa1de0f](https://github.com/iotaledger/twin-identity/commit/aa1de0f63be95ff62bae3c699aabc85ea93d74c2))
|
|
13
|
+
* add own-DID resolution caching to EntityStorageIdentityConnector ([#216](https://github.com/iotaledger/twin-identity/issues/216)) ([a4c170b](https://github.com/iotaledger/twin-identity/commit/a4c170be83d00f2bf53d70056321d53a3b22f940))
|
|
14
|
+
* add proof to vc in entity storage connector ([2a968a1](https://github.com/iotaledger/twin-identity/commit/2a968a1a011cbafb8a0997234e069c91c4eaa793))
|
|
15
|
+
* add proof to vcs and verify vs documents ([#103](https://github.com/iotaledger/twin-identity/issues/103)) ([b60bf0c](https://github.com/iotaledger/twin-identity/commit/b60bf0cb7d453d67574c5c0e4f769e67cf7cd6d1))
|
|
16
|
+
* add validate-locales ([04d74b4](https://github.com/iotaledger/twin-identity/commit/04d74b4d1ebe42672e8ca75a7bdb8e3556afd0be))
|
|
17
|
+
* add vault signing ([#153](https://github.com/iotaledger/twin-identity/issues/153)) ([9458e4c](https://github.com/iotaledger/twin-identity/commit/9458e4c96ce19e0fc704905dfb3aac04dc6cf237))
|
|
18
|
+
* common connector tests ([4f9642c](https://github.com/iotaledger/twin-identity/commit/4f9642ceb09843870909fc6819bf69fb20ef952a))
|
|
19
|
+
* ensure credential subject exists ([3847e82](https://github.com/iotaledger/twin-identity/commit/3847e8250ac5abd1fffcd1a72d3157f32d08478c))
|
|
20
|
+
* eslint migration to flat config ([fd6246d](https://github.com/iotaledger/twin-identity/commit/fd6246d566280b6d5d10a108eb1e92c4b510f2f2))
|
|
21
|
+
* expanded cli methods ([#121](https://github.com/iotaledger/twin-identity/issues/121)) ([80a52b7](https://github.com/iotaledger/twin-identity/commit/80a52b779237cd633d1f2813fa976585cef6e551))
|
|
22
|
+
* health and key removal ([#191](https://github.com/iotaledger/twin-identity/issues/191)) ([8504101](https://github.com/iotaledger/twin-identity/commit/8504101a7a08b2a042a4e59f666c245308527088))
|
|
23
|
+
* identity key separator use slash ([1319d0d](https://github.com/iotaledger/twin-identity/commit/1319d0d07164a36b3ec279e6421b8835ffefc3d3))
|
|
24
|
+
* implement async proof signing with vault security ([#110](https://github.com/iotaledger/twin-identity/issues/110)) ([9651c24](https://github.com/iotaledger/twin-identity/commit/9651c2492d63eca6545735f5638d3191e25bd185))
|
|
25
|
+
* increase resolve timeout ([523e5b6](https://github.com/iotaledger/twin-identity/commit/523e5b6375dbac06278d309bec8ca383a8e81807))
|
|
26
|
+
* re-use vault keys if available ([5a848d7](https://github.com/iotaledger/twin-identity/commit/5a848d7520829d9c891ec889fd773fbc0ee77ba5))
|
|
27
|
+
* remove auth generator ([#98](https://github.com/iotaledger/twin-identity/issues/98)) ([a8969e8](https://github.com/iotaledger/twin-identity/commit/a8969e85a5a2804abfc787406e2d12eb168dd978))
|
|
28
|
+
* typescript 6 update ([e8806ad](https://github.com/iotaledger/twin-identity/commit/e8806ad6858c37be3c0f54c41cf654023773bef3))
|
|
29
|
+
* update contexts ([#100](https://github.com/iotaledger/twin-identity/issues/100)) ([7c17f98](https://github.com/iotaledger/twin-identity/commit/7c17f983110b2fc5db1b19531d0b2a7c53e02aaa))
|
|
30
|
+
* update framework core ([c824497](https://github.com/iotaledger/twin-identity/commit/c82449709af0215eb7af496cf687c93fb30b5ae0))
|
|
31
|
+
* update namespaces and contexts ([#90](https://github.com/iotaledger/twin-identity/issues/90)) ([0c34d64](https://github.com/iotaledger/twin-identity/commit/0c34d64add8cca77856fa2d0357e774d72fbbfc1))
|
|
32
|
+
* use new generateKid method ([f0fe779](https://github.com/iotaledger/twin-identity/commit/f0fe779323b675575bb9f80aa74f1957dc57a094))
|
|
33
|
+
* use shared store mechanism ([#27](https://github.com/iotaledger/twin-identity/issues/27)) ([ce41f3f](https://github.com/iotaledger/twin-identity/commit/ce41f3fc3da1b206ec06da7ea5b2c968f788804d))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* add exp to jwt payload in entity storage vc ([41f0fbd](https://github.com/iotaledger/twin-identity/commit/41f0fbd641b4fd1fe3b23f1a16f4748e09b31f50))
|
|
39
|
+
* associate vault keys with document not controller ([#86](https://github.com/iotaledger/twin-identity/issues/86)) ([6430f4b](https://github.com/iotaledger/twin-identity/commit/6430f4b559315a1fe99b60c6db1c661d317bc243))
|
|
40
|
+
* enforce credentialStatus, validity period and assertionMethod scope on object-form verification ([#215](https://github.com/iotaledger/twin-identity/issues/215)) ([8e6eb92](https://github.com/iotaledger/twin-identity/commit/8e6eb920564e0fe4ebdc984bdf682b7779f747d0))
|
|
41
|
+
* identity subject type property ([#146](https://github.com/iotaledger/twin-identity/issues/146)) ([fe71dc6](https://github.com/iotaledger/twin-identity/commit/fe71dc66972120b42f1ff0e1dc8732cb48e1dd2a))
|
|
42
|
+
* Import path and bump version ([#21](https://github.com/iotaledger/twin-identity/issues/21)) ([ccea845](https://github.com/iotaledger/twin-identity/commit/ccea845bf32562267280bc1b3dde1c9af1a00360))
|
|
43
|
+
* Install sdk-wasm ([#20](https://github.com/iotaledger/twin-identity/issues/20)) ([75ec14e](https://github.com/iotaledger/twin-identity/commit/75ec14e072f8c219863a1c028a3b0783802086e9))
|
|
44
|
+
* linting ([08dd93e](https://github.com/iotaledger/twin-identity/commit/08dd93e7b6ba3877c9cd051533f08aff39733a5b))
|
|
45
|
+
* proof verification ([#186](https://github.com/iotaledger/twin-identity/issues/186)) ([6e926be](https://github.com/iotaledger/twin-identity/commit/6e926be25c333ea7df6ead503a9b99e4e46286fe))
|
|
46
|
+
* update vault key naming convention to use document ID prefix ([#94](https://github.com/iotaledger/twin-identity/issues/94)) ([ab125c1](https://github.com/iotaledger/twin-identity/commit/ab125c1b7eb189b5dceaddc69e5e53e33a0886db))
|
|
47
|
+
* use async getStore in tests ([cfc0d87](https://github.com/iotaledger/twin-identity/commit/cfc0d873532e8ab2010f86f05bffaad3bbaf5786))
|
|
48
|
+
* use async getStore in tests ([3424c81](https://github.com/iotaledger/twin-identity/commit/3424c81cf7407ede4a89a026072720d52bf689b2))
|
|
49
|
+
* use nameof for property guards ([9d571cf](https://github.com/iotaledger/twin-identity/commit/9d571cffae8838035fcbca8966795783013e1a99))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Dependencies
|
|
53
|
+
|
|
54
|
+
* The following workspace dependencies were updated
|
|
55
|
+
* dependencies
|
|
56
|
+
* @twin.org/identity-models bumped from 0.9.3-next.0 to 0.9.3-next.1
|
|
57
|
+
|
|
3
58
|
## [0.9.2](https://github.com/iotaledger/twin-identity/compare/identity-connector-entity-storage-v0.9.2...identity-connector-entity-storage-v0.9.2) (2026-08-24)
|
|
4
59
|
|
|
5
60
|
|
|
@@ -62,6 +62,33 @@ The class name of the component.
|
|
|
62
62
|
|
|
63
63
|
***
|
|
64
64
|
|
|
65
|
+
### stop() {#stop}
|
|
66
|
+
|
|
67
|
+
> **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
68
|
+
|
|
69
|
+
Stop the service.
|
|
70
|
+
Destroys in-memory resources owned by this component.
|
|
71
|
+
|
|
72
|
+
#### Parameters
|
|
73
|
+
|
|
74
|
+
##### nodeLoggingComponentType?
|
|
75
|
+
|
|
76
|
+
`string`
|
|
77
|
+
|
|
78
|
+
The node logging component type.
|
|
79
|
+
|
|
80
|
+
#### Returns
|
|
81
|
+
|
|
82
|
+
`Promise`\<`void`\>
|
|
83
|
+
|
|
84
|
+
A promise that resolves when the service has stopped.
|
|
85
|
+
|
|
86
|
+
#### Implementation of
|
|
87
|
+
|
|
88
|
+
`IIdentityConnector.stop`
|
|
89
|
+
|
|
90
|
+
***
|
|
91
|
+
|
|
65
92
|
### createDocument() {#createdocument}
|
|
66
93
|
|
|
67
94
|
> **createDocument**(`controller`): `Promise`\<`IDidDocument`\>
|
|
@@ -704,7 +731,7 @@ The presentation stored in the jwt and the revocation status.
|
|
|
704
731
|
|
|
705
732
|
### createProof() {#createproof}
|
|
706
733
|
|
|
707
|
-
> **createProof**(`controller`, `verificationMethodId`, `proofType`, `unsecureDocument`): `Promise`\<`IProof`\>
|
|
734
|
+
> **createProof**(`controller`, `verificationMethodId`, `proofType`, `unsecureDocument`, `resolvedDocument?`): `Promise`\<`IProof`\>
|
|
708
735
|
|
|
709
736
|
Create a proof for arbitrary data with the specified verification method.
|
|
710
737
|
This method uses async signing to ensure the private key never leaves the vault,
|
|
@@ -736,6 +763,14 @@ The type of proof to create.
|
|
|
736
763
|
|
|
737
764
|
The unsecure document to create the proof for.
|
|
738
765
|
|
|
766
|
+
##### resolvedDocument?
|
|
767
|
+
|
|
768
|
+
`IDidDocument`
|
|
769
|
+
|
|
770
|
+
Optional already-resolved document for the DID, so a caller that
|
|
771
|
+
just resolved it (e.g. createVerifiableCredential) skips a redundant re-resolve. Resolves
|
|
772
|
+
it itself if omitted.
|
|
773
|
+
|
|
739
774
|
#### Returns
|
|
740
775
|
|
|
741
776
|
`Promise`\<`IProof`\>
|
package/docs/reference/index.md
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## Interfaces
|
|
12
12
|
|
|
13
|
+
- [IEntityStorageIdentityConnectorConfig](interfaces/IEntityStorageIdentityConnectorConfig.md)
|
|
13
14
|
- [IEntityStorageIdentityConnectorConstructorOptions](interfaces/IEntityStorageIdentityConnectorConstructorOptions.md)
|
|
14
15
|
- [IEntityStorageIdentityProfileConnectorConstructorOptions](interfaces/IEntityStorageIdentityProfileConnectorConstructorOptions.md)
|
|
15
16
|
- [IEntityStorageIdentityResolverConnectorConstructorOptions](interfaces/IEntityStorageIdentityResolverConnectorConstructorOptions.md)
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Interface: IEntityStorageIdentityConnectorConfig
|
|
2
|
+
|
|
3
|
+
Configuration for the Entity Storage Identity Connector.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
### didResolutionCacheTtlMs? {#didresolutioncachettlms}
|
|
8
|
+
|
|
9
|
+
> `optional` **didResolutionCacheTtlMs?**: `number`
|
|
10
|
+
|
|
11
|
+
TTL in ms for caching DID documents resolved for the connector's own sign/mutate
|
|
12
|
+
operations (create/update/revoke on an identity this connector controls). 0 disables
|
|
13
|
+
caching. Does not affect proof or credential verification of third-party claims, which
|
|
14
|
+
is never cached by this connector. Refreshed by every mutation made through this
|
|
15
|
+
connector instance; a mutation made through a different instance or out-of-band is not
|
|
16
|
+
observed until the entry's TTL expires.
|
|
17
|
+
|
|
18
|
+
#### Default
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
30000
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
***
|
|
25
|
+
|
|
26
|
+
### didResolutionCacheCapacity? {#didresolutioncachecapacity}
|
|
27
|
+
|
|
28
|
+
> `optional` **didResolutionCacheCapacity?**: `number`
|
|
29
|
+
|
|
30
|
+
Maximum number of DID documents kept in the own-DID resolution cache.
|
|
31
|
+
Only used when didResolutionCacheTtlMs > 0.
|
|
32
|
+
|
|
33
|
+
#### Default
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
1000
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### didResolutionCacheMutexTimeoutMs? {#didresolutioncachemutextimeoutms}
|
|
42
|
+
|
|
43
|
+
> `optional` **didResolutionCacheMutexTimeoutMs?**: `number`
|
|
44
|
+
|
|
45
|
+
Maximum time in milliseconds to wait for own-DID cache getOrSet mutex acquisition.
|
|
46
|
+
Only used when didResolutionCacheTtlMs > 0.
|
|
@@ -8,6 +8,14 @@ Options for the entity storage identity connector constructor.
|
|
|
8
8
|
|
|
9
9
|
## Properties
|
|
10
10
|
|
|
11
|
+
### config? {#config}
|
|
12
|
+
|
|
13
|
+
> `optional` **config?**: [`IEntityStorageIdentityConnectorConfig`](IEntityStorageIdentityConnectorConfig.md)
|
|
14
|
+
|
|
15
|
+
Configuration for the connector.
|
|
16
|
+
|
|
17
|
+
***
|
|
18
|
+
|
|
11
19
|
### didDocumentEntityStorageType? {#diddocumententitystoragetype}
|
|
12
20
|
|
|
13
21
|
> `optional` **didDocumentEntityStorageType?**: `string`
|
package/locales/en.json
CHANGED
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
"createVerifiablePresentationFailed": "Creating the verifiable presentation failed",
|
|
18
18
|
"documentNotFound": "The document could not be found \"{notFoundId}\"",
|
|
19
19
|
"invalidAlias": "The alias is invalid it must be a Url or Urn, it is \"{alias}\"",
|
|
20
|
+
"issuerMismatch": "The credential issuer \"{issuer}\" does not match the DID of the proof verification method \"{method}\"",
|
|
20
21
|
"jwkSignatureFailed": "The signature on the JWK failed verification",
|
|
21
22
|
"methodMissing": "The verification method specified does not exist \"{method}\"",
|
|
22
23
|
"missingDid": "The full id including DID is required",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/identity-connector-entity-storage",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3-next.1",
|
|
4
4
|
"description": "Entity storage connector for persisting and retrieving identity records through a consistent data layer.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
"node": ">=24.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@twin.org/core": "
|
|
18
|
-
"@twin.org/data-core": "
|
|
19
|
-
"@twin.org/data-json-ld": "
|
|
20
|
-
"@twin.org/entity": "
|
|
21
|
-
"@twin.org/entity-storage-models": "
|
|
22
|
-
"@twin.org/identity-models": "
|
|
23
|
-
"@twin.org/nameof": "
|
|
24
|
-
"@twin.org/standards-w3c-did": "
|
|
25
|
-
"@twin.org/vault-models": "
|
|
26
|
-
"@twin.org/web": "
|
|
17
|
+
"@twin.org/core": "next",
|
|
18
|
+
"@twin.org/data-core": "next",
|
|
19
|
+
"@twin.org/data-json-ld": "next",
|
|
20
|
+
"@twin.org/entity": "next",
|
|
21
|
+
"@twin.org/entity-storage-models": "next",
|
|
22
|
+
"@twin.org/identity-models": "0.9.3-next.1",
|
|
23
|
+
"@twin.org/nameof": "next",
|
|
24
|
+
"@twin.org/standards-w3c-did": "next",
|
|
25
|
+
"@twin.org/vault-models": "next",
|
|
26
|
+
"@twin.org/web": "next"
|
|
27
27
|
},
|
|
28
28
|
"main": "./dist/es/index.js",
|
|
29
29
|
"types": "./dist/types/index.d.ts",
|