@twin.org/identity-models 0.0.2-next.1 → 0.0.2-next.11
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/contextIdHandlers/didContextIdHandler.js +34 -0
- package/dist/es/contextIdHandlers/didContextIdHandler.js.map +1 -0
- package/dist/es/factories/identityConnectorFactory.js +9 -0
- package/dist/es/factories/identityConnectorFactory.js.map +1 -0
- package/dist/es/factories/identityProfileConnectorFactory.js +9 -0
- package/dist/es/factories/identityProfileConnectorFactory.js.map +1 -0
- package/dist/es/factories/identityResolverConnectorFactory.js +9 -0
- package/dist/es/factories/identityResolverConnectorFactory.js.map +1 -0
- package/dist/es/index.js +49 -0
- package/dist/es/index.js.map +1 -0
- package/dist/es/models/IIdentityComponent.js +2 -0
- package/dist/es/models/IIdentityComponent.js.map +1 -0
- package/dist/es/models/IIdentityConnector.js +2 -0
- package/dist/es/models/IIdentityConnector.js.map +1 -0
- package/dist/es/models/IIdentityProfileComponent.js +2 -0
- package/dist/es/models/IIdentityProfileComponent.js.map +1 -0
- package/dist/es/models/IIdentityProfileConnector.js +2 -0
- package/dist/es/models/IIdentityProfileConnector.js.map +1 -0
- package/dist/es/models/IIdentityResolverComponent.js +2 -0
- package/dist/es/models/IIdentityResolverComponent.js.map +1 -0
- package/dist/es/models/IIdentityResolverConnector.js +2 -0
- package/dist/es/models/IIdentityResolverConnector.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityCreateRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityProofCreateRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityProofCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityProofCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityProofCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityProofVerifyRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityProofVerifyRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityProofVerifyResponse.js +4 -0
- package/dist/es/models/api/identity/IIdentityProofVerifyResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityRemoveRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityRemoveRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityServiceCreateRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityServiceCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityServiceCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityServiceCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityServiceRemoveRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityServiceRemoveRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialCreateRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialRevokeRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialRevokeRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialUnrevokeRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialUnrevokeRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiableCredentialVerifyResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationCreateRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerifiablePresentationVerifyResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodCreateRequest.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodCreateRequest.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodCreateResponse.js +2 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodCreateResponse.js.map +1 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodRemoveRequest.js +4 -0
- package/dist/es/models/api/identity/IIdentityVerificationMethodRemoveRequest.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileCreateRequest.js +2 -0
- package/dist/es/models/api/profile/IIdentityProfileCreateRequest.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileGetPublicRequest.js +4 -0
- package/dist/es/models/api/profile/IIdentityProfileGetPublicRequest.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileGetPublicResponse.js +2 -0
- package/dist/es/models/api/profile/IIdentityProfileGetPublicResponse.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileGetRequest.js +4 -0
- package/dist/es/models/api/profile/IIdentityProfileGetRequest.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileGetResponse.js +2 -0
- package/dist/es/models/api/profile/IIdentityProfileGetResponse.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileListRequest.js +4 -0
- package/dist/es/models/api/profile/IIdentityProfileListRequest.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileListResponse.js +2 -0
- package/dist/es/models/api/profile/IIdentityProfileListResponse.js.map +1 -0
- package/dist/es/models/api/profile/IIdentityProfileUpdateRequest.js +2 -0
- package/dist/es/models/api/profile/IIdentityProfileUpdateRequest.js.map +1 -0
- package/dist/es/models/api/resolver/IIdentityResolveRequest.js +4 -0
- package/dist/es/models/api/resolver/IIdentityResolveRequest.js.map +1 -0
- package/dist/es/models/api/resolver/IIdentityResolveResponse.js +2 -0
- package/dist/es/models/api/resolver/IIdentityResolveResponse.js.map +1 -0
- package/dist/es/types/did.js +53 -0
- package/dist/es/types/did.js.map +1 -0
- package/dist/es/utils/documentHelper.js +92 -0
- package/dist/es/utils/documentHelper.js.map +1 -0
- package/dist/es/utils/verificationHelper.js +79 -0
- package/dist/es/utils/verificationHelper.js.map +1 -0
- package/dist/types/contextIdHandlers/didContextIdHandler.d.ts +22 -0
- package/dist/types/factories/identityConnectorFactory.d.ts +1 -1
- package/dist/types/factories/identityProfileConnectorFactory.d.ts +1 -1
- package/dist/types/factories/identityResolverConnectorFactory.d.ts +1 -1
- package/dist/types/index.d.ts +46 -44
- package/dist/types/models/IIdentityComponent.d.ts +7 -2
- package/dist/types/models/IIdentityConnector.d.ts +7 -2
- package/dist/types/models/IIdentityProfileComponent.d.ts +2 -2
- package/dist/types/models/IIdentityProfileConnector.d.ts +2 -2
- package/dist/types/models/api/identity/IIdentityVerifiableCredentialCreateRequest.d.ts +4 -0
- package/dist/types/models/api/profile/IIdentityProfileListRequest.d.ts +1 -1
- package/dist/types/types/did.d.ts +28 -0
- package/dist/types/utils/verificationHelper.d.ts +1 -1
- package/docs/changelog.md +63 -0
- package/docs/reference/classes/Did.md +95 -0
- package/docs/reference/classes/DidContextIdHandler.md +79 -0
- package/docs/reference/classes/DocumentHelper.md +2 -2
- package/docs/reference/classes/VerificationHelper.md +2 -2
- package/docs/reference/index.md +2 -0
- package/docs/reference/interfaces/IIdentityComponent.md +108 -2
- package/docs/reference/interfaces/IIdentityConnector.md +108 -2
- package/docs/reference/interfaces/IIdentityProfileComponent.md +98 -2
- package/docs/reference/interfaces/IIdentityProfileConnector.md +98 -2
- package/docs/reference/interfaces/IIdentityProfileListRequest.md +2 -2
- package/docs/reference/interfaces/IIdentityResolverComponent.md +96 -0
- package/docs/reference/interfaces/IIdentityResolverConnector.md +96 -0
- package/docs/reference/interfaces/IIdentityVerifiableCredentialCreateRequest.md +6 -0
- package/locales/en.json +4 -7
- package/package.json +53 -8
- package/dist/cjs/index.cjs +0 -200
- package/dist/esm/index.mjs +0 -194
package/docs/changelog.md
CHANGED
|
@@ -1,5 +1,68 @@
|
|
|
1
1
|
# @twin.org/identity-service-models - Changelog
|
|
2
2
|
|
|
3
|
+
## [0.0.2-next.10](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.9...identity-models-v0.0.2-next.10) (2025-10-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Miscellaneous Chores
|
|
7
|
+
|
|
8
|
+
* **identity-models:** Synchronize repo versions
|
|
9
|
+
|
|
10
|
+
## [0.0.2-next.9](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.8...identity-models-v0.0.2-next.9) (2025-10-09)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* add validate-locales ([04d74b4](https://github.com/twinfoundation/identity/commit/04d74b4d1ebe42672e8ca75a7bdb8e3556afd0be))
|
|
16
|
+
|
|
17
|
+
## [0.0.2-next.8](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.7...identity-models-v0.0.2-next.8) (2025-09-25)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Features
|
|
21
|
+
|
|
22
|
+
* add idHelper class ([57c8bdb](https://github.com/twinfoundation/identity/commit/57c8bdb81efaa163b5e83f8a7f16f3764d12fd75))
|
|
23
|
+
|
|
24
|
+
## [0.0.2-next.7](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.6...identity-models-v0.0.2-next.7) (2025-09-23)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Miscellaneous Chores
|
|
28
|
+
|
|
29
|
+
* **identity-models:** Synchronize repo versions
|
|
30
|
+
|
|
31
|
+
## [0.0.2-next.6](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.5...identity-models-v0.0.2-next.6) (2025-09-23)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
### Miscellaneous Chores
|
|
35
|
+
|
|
36
|
+
* **identity-models:** Synchronize repo versions
|
|
37
|
+
|
|
38
|
+
## [0.0.2-next.5](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.4...identity-models-v0.0.2-next.5) (2025-09-15)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Miscellaneous Chores
|
|
42
|
+
|
|
43
|
+
* **identity-models:** Synchronize repo versions
|
|
44
|
+
|
|
45
|
+
## [0.0.2-next.4](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.3...identity-models-v0.0.2-next.4) (2025-09-12)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Features
|
|
49
|
+
|
|
50
|
+
* add expiration date option to vc creation ([73e05e1](https://github.com/twinfoundation/identity/commit/73e05e1ae61112c7e056889969751f4ff82d9f29))
|
|
51
|
+
|
|
52
|
+
## [0.0.2-next.3](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.2...identity-models-v0.0.2-next.3) (2025-08-29)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Features
|
|
56
|
+
|
|
57
|
+
* eslint migration to flat config ([fd6246d](https://github.com/twinfoundation/identity/commit/fd6246d566280b6d5d10a108eb1e92c4b510f2f2))
|
|
58
|
+
|
|
59
|
+
## [0.0.2-next.2](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.1...identity-models-v0.0.2-next.2) (2025-08-20)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
### Features
|
|
63
|
+
|
|
64
|
+
* update framework core ([c824497](https://github.com/twinfoundation/identity/commit/c82449709af0215eb7af496cf687c93fb30b5ae0))
|
|
65
|
+
|
|
3
66
|
## [0.0.2-next.1](https://github.com/twinfoundation/identity/compare/identity-models-v0.0.2-next.0...identity-models-v0.0.2-next.1) (2025-08-18)
|
|
4
67
|
|
|
5
68
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Class: Did
|
|
2
|
+
|
|
3
|
+
Helper methods for Ids.
|
|
4
|
+
|
|
5
|
+
## Constructors
|
|
6
|
+
|
|
7
|
+
### Constructor
|
|
8
|
+
|
|
9
|
+
> **new Did**(): `Did`
|
|
10
|
+
|
|
11
|
+
#### Returns
|
|
12
|
+
|
|
13
|
+
`Did`
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### CLASS\_NAME
|
|
18
|
+
|
|
19
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
20
|
+
|
|
21
|
+
Runtime name for the class.
|
|
22
|
+
|
|
23
|
+
## Methods
|
|
24
|
+
|
|
25
|
+
### parse()
|
|
26
|
+
|
|
27
|
+
> `static` **parse**(`id`): `object`
|
|
28
|
+
|
|
29
|
+
Parse and id in to it's constituent parts.
|
|
30
|
+
|
|
31
|
+
#### Parameters
|
|
32
|
+
|
|
33
|
+
##### id
|
|
34
|
+
|
|
35
|
+
`string`
|
|
36
|
+
|
|
37
|
+
The id to parse.
|
|
38
|
+
|
|
39
|
+
#### Returns
|
|
40
|
+
|
|
41
|
+
`object`
|
|
42
|
+
|
|
43
|
+
The parsed id.
|
|
44
|
+
|
|
45
|
+
##### method
|
|
46
|
+
|
|
47
|
+
> **method**: `string`
|
|
48
|
+
|
|
49
|
+
##### network?
|
|
50
|
+
|
|
51
|
+
> `optional` **network**: `string`
|
|
52
|
+
|
|
53
|
+
##### id
|
|
54
|
+
|
|
55
|
+
> **id**: `string`
|
|
56
|
+
|
|
57
|
+
#### Throws
|
|
58
|
+
|
|
59
|
+
GeneralError if the id is not valid.
|
|
60
|
+
|
|
61
|
+
***
|
|
62
|
+
|
|
63
|
+
### guard()
|
|
64
|
+
|
|
65
|
+
> `static` **guard**(`source`, `property`, `value`): `asserts value is string`
|
|
66
|
+
|
|
67
|
+
Guard a string as a DID.
|
|
68
|
+
|
|
69
|
+
#### Parameters
|
|
70
|
+
|
|
71
|
+
##### source
|
|
72
|
+
|
|
73
|
+
`string`
|
|
74
|
+
|
|
75
|
+
The source of the error.
|
|
76
|
+
|
|
77
|
+
##### property
|
|
78
|
+
|
|
79
|
+
`string`
|
|
80
|
+
|
|
81
|
+
The name of the property.
|
|
82
|
+
|
|
83
|
+
##### value
|
|
84
|
+
|
|
85
|
+
`unknown`
|
|
86
|
+
|
|
87
|
+
The urn to parse.
|
|
88
|
+
|
|
89
|
+
#### Returns
|
|
90
|
+
|
|
91
|
+
`asserts value is string`
|
|
92
|
+
|
|
93
|
+
#### Throws
|
|
94
|
+
|
|
95
|
+
GuardError If the value does not match the assertion.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Class: DidContextIdHandler
|
|
2
|
+
|
|
3
|
+
Context Id handler for testing as a DID.
|
|
4
|
+
|
|
5
|
+
## Implements
|
|
6
|
+
|
|
7
|
+
- `IContextIdHandler`
|
|
8
|
+
|
|
9
|
+
## Constructors
|
|
10
|
+
|
|
11
|
+
### Constructor
|
|
12
|
+
|
|
13
|
+
> **new DidContextIdHandler**(): `DidContextIdHandler`
|
|
14
|
+
|
|
15
|
+
#### Returns
|
|
16
|
+
|
|
17
|
+
`DidContextIdHandler`
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### CLASS\_NAME
|
|
22
|
+
|
|
23
|
+
> `readonly` `static` **CLASS\_NAME**: `string`
|
|
24
|
+
|
|
25
|
+
Runtime name for the class.
|
|
26
|
+
|
|
27
|
+
## Methods
|
|
28
|
+
|
|
29
|
+
### short()
|
|
30
|
+
|
|
31
|
+
> **short**(`value`): `string`
|
|
32
|
+
|
|
33
|
+
Get the short form of the DID which is the last part.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
##### value
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The full context id value.
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`string`
|
|
46
|
+
|
|
47
|
+
Short form string.
|
|
48
|
+
|
|
49
|
+
#### Implementation of
|
|
50
|
+
|
|
51
|
+
`IContextIdHandler.short`
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### guard()
|
|
56
|
+
|
|
57
|
+
> **guard**(`value`): `void`
|
|
58
|
+
|
|
59
|
+
Guard the value ensuring length.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### value
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The value to guard.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`void`
|
|
72
|
+
|
|
73
|
+
#### Throws
|
|
74
|
+
|
|
75
|
+
GeneralError if the value is too short.
|
|
76
|
+
|
|
77
|
+
#### Implementation of
|
|
78
|
+
|
|
79
|
+
`IContextIdHandler.guard`
|
|
@@ -120,7 +120,7 @@ Error if the method is not found.
|
|
|
120
120
|
|
|
121
121
|
### getJwk()
|
|
122
122
|
|
|
123
|
-
> `static` **getJwk**(`didDocument`, `methodName`, `methodType?`): `
|
|
123
|
+
> `static` **getJwk**(`didDocument`, `methodName`, `methodType?`): `JWK`
|
|
124
124
|
|
|
125
125
|
Gets a JWK from a DID document verification method.
|
|
126
126
|
|
|
@@ -146,7 +146,7 @@ The type of the method, defaults to verificationMethod.
|
|
|
146
146
|
|
|
147
147
|
#### Returns
|
|
148
148
|
|
|
149
|
-
`
|
|
149
|
+
`JWK`
|
|
150
150
|
|
|
151
151
|
The JWK if found.
|
|
152
152
|
|
package/docs/reference/index.md
CHANGED
|
@@ -8,6 +8,102 @@ Interface describing a contract which provides identity operations.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
+
### className()
|
|
12
|
+
|
|
13
|
+
> **className**(): `string`
|
|
14
|
+
|
|
15
|
+
Returns the class name of the component.
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The class name of the component.
|
|
22
|
+
|
|
23
|
+
#### Inherited from
|
|
24
|
+
|
|
25
|
+
`IComponent.className`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### bootstrap()?
|
|
30
|
+
|
|
31
|
+
> `optional` **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
|
|
32
|
+
|
|
33
|
+
Bootstrap the component by creating and initializing any resources it needs.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
##### nodeLoggingComponentType?
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The node logging component type.
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`Promise`\<`boolean`\>
|
|
46
|
+
|
|
47
|
+
True if the bootstrapping process was successful.
|
|
48
|
+
|
|
49
|
+
#### Inherited from
|
|
50
|
+
|
|
51
|
+
`IComponent.bootstrap`
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### start()?
|
|
56
|
+
|
|
57
|
+
> `optional` **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
58
|
+
|
|
59
|
+
The component needs to be started when the node is initialized.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### nodeLoggingComponentType?
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The node logging component type.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<`void`\>
|
|
72
|
+
|
|
73
|
+
Nothing.
|
|
74
|
+
|
|
75
|
+
#### Inherited from
|
|
76
|
+
|
|
77
|
+
`IComponent.start`
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### stop()?
|
|
82
|
+
|
|
83
|
+
> `optional` **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
84
|
+
|
|
85
|
+
The component needs to be stopped when the node is closed.
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
##### nodeLoggingComponentType?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
92
|
+
|
|
93
|
+
The node logging component type.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`void`\>
|
|
98
|
+
|
|
99
|
+
Nothing.
|
|
100
|
+
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
`IComponent.stop`
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
11
107
|
### identityCreate()
|
|
12
108
|
|
|
13
109
|
> **identityCreate**(`namespace?`, `controller?`): `Promise`\<`IDidDocument`\>
|
|
@@ -232,7 +328,7 @@ NotFoundError if the id can not be resolved.
|
|
|
232
328
|
|
|
233
329
|
### verifiableCredentialCreate()
|
|
234
330
|
|
|
235
|
-
> **verifiableCredentialCreate**(`verificationMethodId`, `id`, `subject`, `
|
|
331
|
+
> **verifiableCredentialCreate**(`verificationMethodId`, `id`, `subject`, `options?`, `controller?`): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
236
332
|
|
|
237
333
|
Create a verifiable credential for a verification method.
|
|
238
334
|
|
|
@@ -256,12 +352,22 @@ The id of the credential.
|
|
|
256
352
|
|
|
257
353
|
The credential subject to store in the verifiable credential.
|
|
258
354
|
|
|
259
|
-
#####
|
|
355
|
+
##### options?
|
|
356
|
+
|
|
357
|
+
Additional options for creating the verifiable credential.
|
|
358
|
+
|
|
359
|
+
###### revocationIndex?
|
|
260
360
|
|
|
261
361
|
`number`
|
|
262
362
|
|
|
263
363
|
The bitmap revocation index of the credential, if undefined will not have revocation status.
|
|
264
364
|
|
|
365
|
+
###### expirationDate?
|
|
366
|
+
|
|
367
|
+
`Date`
|
|
368
|
+
|
|
369
|
+
The date the verifiable credential is valid until.
|
|
370
|
+
|
|
265
371
|
##### controller?
|
|
266
372
|
|
|
267
373
|
`string`
|
|
@@ -8,6 +8,102 @@ Interface describing an identity connector.
|
|
|
8
8
|
|
|
9
9
|
## Methods
|
|
10
10
|
|
|
11
|
+
### className()
|
|
12
|
+
|
|
13
|
+
> **className**(): `string`
|
|
14
|
+
|
|
15
|
+
Returns the class name of the component.
|
|
16
|
+
|
|
17
|
+
#### Returns
|
|
18
|
+
|
|
19
|
+
`string`
|
|
20
|
+
|
|
21
|
+
The class name of the component.
|
|
22
|
+
|
|
23
|
+
#### Inherited from
|
|
24
|
+
|
|
25
|
+
`IComponent.className`
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### bootstrap()?
|
|
30
|
+
|
|
31
|
+
> `optional` **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
|
|
32
|
+
|
|
33
|
+
Bootstrap the component by creating and initializing any resources it needs.
|
|
34
|
+
|
|
35
|
+
#### Parameters
|
|
36
|
+
|
|
37
|
+
##### nodeLoggingComponentType?
|
|
38
|
+
|
|
39
|
+
`string`
|
|
40
|
+
|
|
41
|
+
The node logging component type.
|
|
42
|
+
|
|
43
|
+
#### Returns
|
|
44
|
+
|
|
45
|
+
`Promise`\<`boolean`\>
|
|
46
|
+
|
|
47
|
+
True if the bootstrapping process was successful.
|
|
48
|
+
|
|
49
|
+
#### Inherited from
|
|
50
|
+
|
|
51
|
+
`IComponent.bootstrap`
|
|
52
|
+
|
|
53
|
+
***
|
|
54
|
+
|
|
55
|
+
### start()?
|
|
56
|
+
|
|
57
|
+
> `optional` **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
58
|
+
|
|
59
|
+
The component needs to be started when the node is initialized.
|
|
60
|
+
|
|
61
|
+
#### Parameters
|
|
62
|
+
|
|
63
|
+
##### nodeLoggingComponentType?
|
|
64
|
+
|
|
65
|
+
`string`
|
|
66
|
+
|
|
67
|
+
The node logging component type.
|
|
68
|
+
|
|
69
|
+
#### Returns
|
|
70
|
+
|
|
71
|
+
`Promise`\<`void`\>
|
|
72
|
+
|
|
73
|
+
Nothing.
|
|
74
|
+
|
|
75
|
+
#### Inherited from
|
|
76
|
+
|
|
77
|
+
`IComponent.start`
|
|
78
|
+
|
|
79
|
+
***
|
|
80
|
+
|
|
81
|
+
### stop()?
|
|
82
|
+
|
|
83
|
+
> `optional` **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
84
|
+
|
|
85
|
+
The component needs to be stopped when the node is closed.
|
|
86
|
+
|
|
87
|
+
#### Parameters
|
|
88
|
+
|
|
89
|
+
##### nodeLoggingComponentType?
|
|
90
|
+
|
|
91
|
+
`string`
|
|
92
|
+
|
|
93
|
+
The node logging component type.
|
|
94
|
+
|
|
95
|
+
#### Returns
|
|
96
|
+
|
|
97
|
+
`Promise`\<`void`\>
|
|
98
|
+
|
|
99
|
+
Nothing.
|
|
100
|
+
|
|
101
|
+
#### Inherited from
|
|
102
|
+
|
|
103
|
+
`IComponent.stop`
|
|
104
|
+
|
|
105
|
+
***
|
|
106
|
+
|
|
11
107
|
### createDocument()
|
|
12
108
|
|
|
13
109
|
> **createDocument**(`controller`): `Promise`\<`IDidDocument`\>
|
|
@@ -226,7 +322,7 @@ NotFoundError if the id can not be resolved.
|
|
|
226
322
|
|
|
227
323
|
### createVerifiableCredential()
|
|
228
324
|
|
|
229
|
-
> **createVerifiableCredential**(`controller`, `verificationMethodId`, `id`, `subject`, `
|
|
325
|
+
> **createVerifiableCredential**(`controller`, `verificationMethodId`, `id`, `subject`, `options?`): `Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
230
326
|
|
|
231
327
|
Create a verifiable credential for a verification method.
|
|
232
328
|
|
|
@@ -256,12 +352,22 @@ The id of the credential.
|
|
|
256
352
|
|
|
257
353
|
The credential subject to store in the verifiable credential.
|
|
258
354
|
|
|
259
|
-
#####
|
|
355
|
+
##### options?
|
|
356
|
+
|
|
357
|
+
Additional options for creating the verifiable credential.
|
|
358
|
+
|
|
359
|
+
###### revocationIndex?
|
|
260
360
|
|
|
261
361
|
`number`
|
|
262
362
|
|
|
263
363
|
The bitmap revocation index of the credential, if undefined will not have revocation status.
|
|
264
364
|
|
|
365
|
+
###### expirationDate?
|
|
366
|
+
|
|
367
|
+
`Date`
|
|
368
|
+
|
|
369
|
+
The date the verifiable credential is valid until.
|
|
370
|
+
|
|
265
371
|
#### Returns
|
|
266
372
|
|
|
267
373
|
`Promise`\<\{ `verifiableCredential`: `IDidVerifiableCredential`; `jwt`: `string`; \}\>
|
|
@@ -18,6 +18,102 @@ Interface describing a contract which provides profile operations.
|
|
|
18
18
|
|
|
19
19
|
## Methods
|
|
20
20
|
|
|
21
|
+
### className()
|
|
22
|
+
|
|
23
|
+
> **className**(): `string`
|
|
24
|
+
|
|
25
|
+
Returns the class name of the component.
|
|
26
|
+
|
|
27
|
+
#### Returns
|
|
28
|
+
|
|
29
|
+
`string`
|
|
30
|
+
|
|
31
|
+
The class name of the component.
|
|
32
|
+
|
|
33
|
+
#### Inherited from
|
|
34
|
+
|
|
35
|
+
`IComponent.className`
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### bootstrap()?
|
|
40
|
+
|
|
41
|
+
> `optional` **bootstrap**(`nodeLoggingComponentType?`): `Promise`\<`boolean`\>
|
|
42
|
+
|
|
43
|
+
Bootstrap the component by creating and initializing any resources it needs.
|
|
44
|
+
|
|
45
|
+
#### Parameters
|
|
46
|
+
|
|
47
|
+
##### nodeLoggingComponentType?
|
|
48
|
+
|
|
49
|
+
`string`
|
|
50
|
+
|
|
51
|
+
The node logging component type.
|
|
52
|
+
|
|
53
|
+
#### Returns
|
|
54
|
+
|
|
55
|
+
`Promise`\<`boolean`\>
|
|
56
|
+
|
|
57
|
+
True if the bootstrapping process was successful.
|
|
58
|
+
|
|
59
|
+
#### Inherited from
|
|
60
|
+
|
|
61
|
+
`IComponent.bootstrap`
|
|
62
|
+
|
|
63
|
+
***
|
|
64
|
+
|
|
65
|
+
### start()?
|
|
66
|
+
|
|
67
|
+
> `optional` **start**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
68
|
+
|
|
69
|
+
The component needs to be started when the node is initialized.
|
|
70
|
+
|
|
71
|
+
#### Parameters
|
|
72
|
+
|
|
73
|
+
##### nodeLoggingComponentType?
|
|
74
|
+
|
|
75
|
+
`string`
|
|
76
|
+
|
|
77
|
+
The node logging component type.
|
|
78
|
+
|
|
79
|
+
#### Returns
|
|
80
|
+
|
|
81
|
+
`Promise`\<`void`\>
|
|
82
|
+
|
|
83
|
+
Nothing.
|
|
84
|
+
|
|
85
|
+
#### Inherited from
|
|
86
|
+
|
|
87
|
+
`IComponent.start`
|
|
88
|
+
|
|
89
|
+
***
|
|
90
|
+
|
|
91
|
+
### stop()?
|
|
92
|
+
|
|
93
|
+
> `optional` **stop**(`nodeLoggingComponentType?`): `Promise`\<`void`\>
|
|
94
|
+
|
|
95
|
+
The component needs to be stopped when the node is closed.
|
|
96
|
+
|
|
97
|
+
#### Parameters
|
|
98
|
+
|
|
99
|
+
##### nodeLoggingComponentType?
|
|
100
|
+
|
|
101
|
+
`string`
|
|
102
|
+
|
|
103
|
+
The node logging component type.
|
|
104
|
+
|
|
105
|
+
#### Returns
|
|
106
|
+
|
|
107
|
+
`Promise`\<`void`\>
|
|
108
|
+
|
|
109
|
+
Nothing.
|
|
110
|
+
|
|
111
|
+
#### Inherited from
|
|
112
|
+
|
|
113
|
+
`IComponent.stop`
|
|
114
|
+
|
|
115
|
+
***
|
|
116
|
+
|
|
21
117
|
### create()
|
|
22
118
|
|
|
23
119
|
> **create**(`publicProfile?`, `privateProfile?`, `identity?`): `Promise`\<`void`\>
|
|
@@ -172,7 +268,7 @@ Nothing.
|
|
|
172
268
|
|
|
173
269
|
### list()
|
|
174
270
|
|
|
175
|
-
> **list**(`publicFilters?`, `publicPropertyNames?`, `cursor?`, `
|
|
271
|
+
> **list**(`publicFilters?`, `publicPropertyNames?`, `cursor?`, `limit?`): `Promise`\<\{ `items`: `object`[]; `cursor?`: `string`; \}\>
|
|
176
272
|
|
|
177
273
|
Get a list of the requested identities.
|
|
178
274
|
|
|
@@ -196,7 +292,7 @@ The public properties to get for the profile, defaults to all.
|
|
|
196
292
|
|
|
197
293
|
The cursor for paged requests.
|
|
198
294
|
|
|
199
|
-
#####
|
|
295
|
+
##### limit?
|
|
200
296
|
|
|
201
297
|
`number`
|
|
202
298
|
|