@twin.org/identity-service 0.0.1-next.9 → 0.0.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.
Files changed (50) hide show
  1. package/dist/cjs/index.cjs +1417 -48
  2. package/dist/esm/index.mjs +1403 -51
  3. package/dist/types/identityProfileRoutes.d.ts +1 -1
  4. package/dist/types/identityProfileService.d.ts +6 -4
  5. package/dist/types/identityResolverRoutes.d.ts +21 -0
  6. package/dist/types/identityResolverService.d.ts +27 -0
  7. package/dist/types/identityRoutes.d.ts +108 -4
  8. package/dist/types/identityService.d.ts +136 -10
  9. package/dist/types/index.d.ts +6 -0
  10. package/dist/types/models/IIdentityProfileServiceConstructorOptions.d.ts +10 -0
  11. package/dist/types/models/IIdentityResolverServiceConfig.d.ts +9 -0
  12. package/dist/types/models/IIdentityResolverServiceConstructorOptions.d.ts +15 -0
  13. package/dist/types/models/IIdentityServiceConstructorOptions.d.ts +10 -0
  14. package/docs/changelog.md +302 -1
  15. package/docs/open-api/spec.json +2948 -1360
  16. package/docs/reference/classes/IdentityProfileService.md +76 -58
  17. package/docs/reference/classes/IdentityResolverService.md +73 -0
  18. package/docs/reference/classes/IdentityService.md +560 -16
  19. package/docs/reference/functions/generateRestRoutesIdentity.md +8 -4
  20. package/docs/reference/functions/generateRestRoutesIdentityProfile.md +8 -4
  21. package/docs/reference/functions/generateRestRoutesIdentityResolver.md +25 -0
  22. package/docs/reference/functions/identitiesList.md +9 -3
  23. package/docs/reference/functions/identityCreate.md +31 -0
  24. package/docs/reference/functions/identityGet.md +9 -3
  25. package/docs/reference/functions/identityGetPublic.md +9 -3
  26. package/docs/reference/functions/identityProfileCreate.md +9 -3
  27. package/docs/reference/functions/identityProfileRemove.md +9 -3
  28. package/docs/reference/functions/identityProfileUpdate.md +9 -3
  29. package/docs/reference/functions/identityProofCreate.md +31 -0
  30. package/docs/reference/functions/identityProofVerify.md +31 -0
  31. package/docs/reference/functions/identityRemove.md +31 -0
  32. package/docs/reference/functions/identityResolve.md +9 -3
  33. package/docs/reference/functions/identityServiceCreate.md +31 -0
  34. package/docs/reference/functions/identityServiceRemove.md +31 -0
  35. package/docs/reference/functions/identityVerifiableCredentialCreate.md +31 -0
  36. package/docs/reference/functions/identityVerifiableCredentialRevoke.md +31 -0
  37. package/docs/reference/functions/identityVerifiableCredentialUnrevoke.md +31 -0
  38. package/docs/reference/functions/identityVerifiableCredentialVerify.md +31 -0
  39. package/docs/reference/functions/identityVerifiablePresentationCreate.md +31 -0
  40. package/docs/reference/functions/identityVerifiablePresentationVerify.md +31 -0
  41. package/docs/reference/functions/identityVerificationMethodCreate.md +31 -0
  42. package/docs/reference/functions/identityVerificationMethodRemove.md +31 -0
  43. package/docs/reference/index.md +22 -1
  44. package/docs/reference/interfaces/IIdentityProfileServiceConstructorOptions.md +17 -0
  45. package/docs/reference/interfaces/IIdentityResolverServiceConfig.md +11 -0
  46. package/docs/reference/interfaces/IIdentityResolverServiceConstructorOptions.md +25 -0
  47. package/docs/reference/interfaces/IIdentityServiceConstructorOptions.md +11 -0
  48. package/docs/reference/variables/tagsIdentityResolver.md +5 -0
  49. package/locales/en.json +23 -4
  50. package/package.json +18 -18
@@ -1,4 +1,4 @@
1
- import type { IHttpRequestContext, INoContentRequest, INoContentResponse, IRestRoute, ITag } from "@twin.org/api-models";
1
+ import { type IHttpRequestContext, type INoContentRequest, type INoContentResponse, type IRestRoute, type ITag } from "@twin.org/api-models";
2
2
  import type { IIdentityProfileCreateRequest, IIdentityProfileGetPublicRequest, IIdentityProfileGetPublicResponse, IIdentityProfileGetRequest, IIdentityProfileGetResponse, IIdentityProfileListRequest, IIdentityProfileListResponse, IIdentityProfileUpdateRequest } from "@twin.org/identity-models";
3
3
  /**
4
4
  * The tag to associate with the routes.
@@ -1,9 +1,14 @@
1
1
  import type { IJsonLdDocument } from "@twin.org/data-json-ld";
2
2
  import { type IIdentityProfileComponent } from "@twin.org/identity-models";
3
+ import type { IIdentityProfileServiceConstructorOptions } from "./models/IIdentityProfileServiceConstructorOptions";
3
4
  /**
4
5
  * Class which implements the identity profile contract.
5
6
  */
6
7
  export declare class IdentityProfileService<T extends IJsonLdDocument = IJsonLdDocument, U extends IJsonLdDocument = IJsonLdDocument> implements IIdentityProfileComponent<T, U> {
8
+ /**
9
+ * The namespace supported by the identity profile service.
10
+ */
11
+ static readonly NAMESPACE: string;
7
12
  /**
8
13
  * Runtime name for the class.
9
14
  */
@@ -11,11 +16,8 @@ export declare class IdentityProfileService<T extends IJsonLdDocument = IJsonLdD
11
16
  /**
12
17
  * Create a new instance of IdentityProfileService.
13
18
  * @param options The dependencies for the identity profile service.
14
- * @param options.profileEntityConnectorType The storage connector for the profiles, default to "identity-profile".
15
19
  */
16
- constructor(options?: {
17
- profileEntityConnectorType?: string;
18
- });
20
+ constructor(options?: IIdentityProfileServiceConstructorOptions);
19
21
  /**
20
22
  * Create the profile properties for an identity.
21
23
  * @param publicProfile The public profile data as JSON-LD.
@@ -0,0 +1,21 @@
1
+ import type { IHttpRequestContext, IRestRoute, ITag } from "@twin.org/api-models";
2
+ import type { IIdentityResolveRequest, IIdentityResolveResponse } from "@twin.org/identity-models";
3
+ /**
4
+ * The tag to associate with the routes.
5
+ */
6
+ export declare const tagsIdentityResolver: ITag[];
7
+ /**
8
+ * The REST routes for identity.
9
+ * @param baseRouteName Prefix to prepend to the paths.
10
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
11
+ * @returns The generated routes.
12
+ */
13
+ export declare function generateRestRoutesIdentityResolver(baseRouteName: string, componentName: string): IRestRoute[];
14
+ /**
15
+ * Resolve an identity.
16
+ * @param httpRequestContext The request context for the API.
17
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
18
+ * @param request The request.
19
+ * @returns The response object with additional http response properties.
20
+ */
21
+ export declare function identityResolve(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityResolveRequest): Promise<IIdentityResolveResponse>;
@@ -0,0 +1,27 @@
1
+ import { type IIdentityResolverComponent } from "@twin.org/identity-models";
2
+ import type { IDidDocument } from "@twin.org/standards-w3c-did";
3
+ import type { IIdentityResolverServiceConstructorOptions } from "./models/IIdentityResolverServiceConstructorOptions";
4
+ /**
5
+ * Class which implements the identity resolver contract.
6
+ */
7
+ export declare class IdentityResolverService implements IIdentityResolverComponent {
8
+ /**
9
+ * The namespace supported by the identity service.
10
+ */
11
+ static readonly NAMESPACE: string;
12
+ /**
13
+ * Runtime name for the class.
14
+ */
15
+ readonly CLASS_NAME: string;
16
+ /**
17
+ * Create a new instance of IdentityResolverService.
18
+ * @param options The options for the service.
19
+ */
20
+ constructor(options?: IIdentityResolverServiceConstructorOptions);
21
+ /**
22
+ * Resolve an identity.
23
+ * @param identity The id of the document to resolve.
24
+ * @returns The resolved document.
25
+ */
26
+ identityResolve(identity: string): Promise<IDidDocument>;
27
+ }
@@ -1,5 +1,5 @@
1
- import type { IHttpRequestContext, IRestRoute, ITag } from "@twin.org/api-models";
2
- import type { IIdentityResolveRequest, IIdentityResolveResponse } from "@twin.org/identity-models";
1
+ import type { IHttpRequestContext, INoContentResponse, IRestRoute, ITag } from "@twin.org/api-models";
2
+ import { type IIdentityRemoveRequest, type IIdentityCreateRequest, type IIdentityCreateResponse, type IIdentityProofCreateRequest, type IIdentityProofCreateResponse, type IIdentityProofVerifyRequest, type IIdentityProofVerifyResponse, type IIdentityServiceCreateRequest, type IIdentityServiceCreateResponse, type IIdentityServiceRemoveRequest, type IIdentityVerifiableCredentialCreateRequest, type IIdentityVerifiableCredentialCreateResponse, type IIdentityVerifiableCredentialRevokeRequest, type IIdentityVerifiableCredentialUnrevokeRequest, type IIdentityVerifiableCredentialVerifyRequest, type IIdentityVerifiableCredentialVerifyResponse, type IIdentityVerifiablePresentationCreateRequest, type IIdentityVerifiablePresentationCreateResponse, type IIdentityVerifiablePresentationVerifyRequest, type IIdentityVerifiablePresentationVerifyResponse, type IIdentityVerificationMethodCreateRequest, type IIdentityVerificationMethodCreateResponse, type IIdentityVerificationMethodRemoveRequest } from "@twin.org/identity-models";
3
3
  /**
4
4
  * The tag to associate with the routes.
5
5
  */
@@ -12,10 +12,114 @@ export declare const tagsIdentity: ITag[];
12
12
  */
13
13
  export declare function generateRestRoutesIdentity(baseRouteName: string, componentName: string): IRestRoute[];
14
14
  /**
15
- * Resolve an identity.
15
+ * Create an identity.
16
16
  * @param httpRequestContext The request context for the API.
17
17
  * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
18
18
  * @param request The request.
19
19
  * @returns The response object with additional http response properties.
20
20
  */
21
- export declare function identityResolve(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityResolveRequest): Promise<IIdentityResolveResponse>;
21
+ export declare function identityCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityCreateRequest): Promise<IIdentityCreateResponse>;
22
+ /**
23
+ * Remove an identity.
24
+ * @param httpRequestContext The request context for the API.
25
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
26
+ * @param request The request.
27
+ * @returns The response object with additional http response properties.
28
+ */
29
+ export declare function identityRemove(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityRemoveRequest): Promise<INoContentResponse>;
30
+ /**
31
+ * Create an identity verification method.
32
+ * @param httpRequestContext The request context for the API.
33
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
34
+ * @param request The request.
35
+ * @returns The response object with additional http response properties.
36
+ */
37
+ export declare function identityVerificationMethodCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerificationMethodCreateRequest): Promise<IIdentityVerificationMethodCreateResponse>;
38
+ /**
39
+ * Remove an identity verification method.
40
+ * @param httpRequestContext The request context for the API.
41
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
42
+ * @param request The request.
43
+ * @returns The response object with additional http response properties.
44
+ */
45
+ export declare function identityVerificationMethodRemove(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerificationMethodRemoveRequest): Promise<INoContentResponse>;
46
+ /**
47
+ * Create an identity service.
48
+ * @param httpRequestContext The request context for the API.
49
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
50
+ * @param request The request.
51
+ * @returns The response object with additional http response properties.
52
+ */
53
+ export declare function identityServiceCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityServiceCreateRequest): Promise<IIdentityServiceCreateResponse>;
54
+ /**
55
+ * Remove an identity service.
56
+ * @param httpRequestContext The request context for the API.
57
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
58
+ * @param request The request.
59
+ * @returns The response object with additional http response properties.
60
+ */
61
+ export declare function identityServiceRemove(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityServiceRemoveRequest): Promise<INoContentResponse>;
62
+ /**
63
+ * Create a verifiable credential.
64
+ * @param httpRequestContext The request context for the API.
65
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
66
+ * @param request The request.
67
+ * @returns The response object with additional http response properties.
68
+ */
69
+ export declare function identityVerifiableCredentialCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiableCredentialCreateRequest): Promise<IIdentityVerifiableCredentialCreateResponse>;
70
+ /**
71
+ * Verify a verifiable credential.
72
+ * @param httpRequestContext The request context for the API.
73
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
74
+ * @param request The request.
75
+ * @returns The response object with additional http response properties.
76
+ */
77
+ export declare function identityVerifiableCredentialVerify(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiableCredentialVerifyRequest): Promise<IIdentityVerifiableCredentialVerifyResponse>;
78
+ /**
79
+ * Revoke a verifiable credential.
80
+ * @param httpRequestContext The request context for the API.
81
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
82
+ * @param request The request.
83
+ * @returns The response object with additional http response properties.
84
+ */
85
+ export declare function identityVerifiableCredentialRevoke(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiableCredentialRevokeRequest): Promise<INoContentResponse>;
86
+ /**
87
+ * Unrevoke a verifiable credential.
88
+ * @param httpRequestContext The request context for the API.
89
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
90
+ * @param request The request.
91
+ * @returns The response object with additional http response properties.
92
+ */
93
+ export declare function identityVerifiableCredentialUnrevoke(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiableCredentialUnrevokeRequest): Promise<INoContentResponse>;
94
+ /**
95
+ * Create a verifiable presentation.
96
+ * @param httpRequestContext The request context for the API.
97
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
98
+ * @param request The request.
99
+ * @returns The response object with additional http response properties.
100
+ */
101
+ export declare function identityVerifiablePresentationCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiablePresentationCreateRequest): Promise<IIdentityVerifiablePresentationCreateResponse>;
102
+ /**
103
+ * Verify a verifiable presentation.
104
+ * @param httpRequestContext The request context for the API.
105
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
106
+ * @param request The request.
107
+ * @returns The response object with additional http response properties.
108
+ */
109
+ export declare function identityVerifiablePresentationVerify(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityVerifiablePresentationVerifyRequest): Promise<IIdentityVerifiablePresentationVerifyResponse>;
110
+ /**
111
+ * Create an identity proof.
112
+ * @param httpRequestContext The request context for the API.
113
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
114
+ * @param request The request.
115
+ * @returns The response object with additional http response properties.
116
+ */
117
+ export declare function identityProofCreate(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityProofCreateRequest): Promise<IIdentityProofCreateResponse>;
118
+ /**
119
+ * Verify an identity proof.
120
+ * @param httpRequestContext The request context for the API.
121
+ * @param componentName The name of the component to use in the routes stored in the ComponentFactory.
122
+ * @param request The request.
123
+ * @returns The response object with additional http response properties.
124
+ */
125
+ export declare function identityProofVerify(httpRequestContext: IHttpRequestContext, componentName: string, request: IIdentityProofVerifyRequest): Promise<IIdentityProofVerifyResponse>;
@@ -1,6 +1,7 @@
1
+ import type { IJsonLdContextDefinitionRoot, IJsonLdNodeObject } from "@twin.org/data-json-ld";
1
2
  import { type IIdentityComponent } from "@twin.org/identity-models";
2
- import type { IDidDocument } from "@twin.org/standards-w3c-did";
3
- import type { IIdentityServiceConfig } from "./models/IIdentityServiceConfig";
3
+ import { DidVerificationMethodType, ProofTypes, type IDidDocument, type IDidDocumentVerificationMethod, type IProof, type IDidService, type IDidVerifiableCredential, type IDidVerifiablePresentation } from "@twin.org/standards-w3c-did";
4
+ import type { IIdentityServiceConstructorOptions } from "./models/IIdentityServiceConstructorOptions";
4
5
  /**
5
6
  * Class which implements the identity contract.
6
7
  */
@@ -16,15 +17,140 @@ export declare class IdentityService implements IIdentityComponent {
16
17
  /**
17
18
  * Create a new instance of IdentityService.
18
19
  * @param options The options for the service.
19
- * @param options.config The configuration for the service.
20
20
  */
21
- constructor(options?: {
22
- config?: IIdentityServiceConfig;
23
- });
21
+ constructor(options?: IIdentityServiceConstructorOptions);
24
22
  /**
25
- * Resolve an identity.
26
- * @param documentId The id of the document to resolve.
27
- * @returns The resolved document.
23
+ * Create a new identity.
24
+ * @param namespace The namespace of the connector to use for the identity, defaults to service configured namespace.
25
+ * @param controller The controller of the identity who can make changes.
26
+ * @returns The created identity document.
28
27
  */
29
- resolve(documentId: string): Promise<IDidDocument>;
28
+ identityCreate(namespace?: string, controller?: string): Promise<IDidDocument>;
29
+ /**
30
+ * Remove an identity.
31
+ * @param identity The id of the document to remove.
32
+ * @param controller The controller of the identity who can make changes.
33
+ * @returns Nothing.
34
+ */
35
+ identityRemove(identity: string, controller?: string): Promise<void>;
36
+ /**
37
+ * Add a verification method to the document in JSON Web key Format.
38
+ * @param identity The id of the document to add the verification method to.
39
+ * @param verificationMethodType The type of the verification method to add.
40
+ * @param verificationMethodId The id of the verification method, if undefined uses the kid of the generated JWK.
41
+ * @param controller The controller of the identity who can make changes.
42
+ * @returns The verification method.
43
+ * @throws NotFoundError if the id can not be resolved.
44
+ * @throws NotSupportedError if the platform does not support multiple keys.
45
+ */
46
+ verificationMethodCreate(identity: string, verificationMethodType: DidVerificationMethodType, verificationMethodId?: string, controller?: string): Promise<IDidDocumentVerificationMethod>;
47
+ /**
48
+ * Remove a verification method from the document.
49
+ * @param verificationMethodId The id of the verification method.
50
+ * @param controller The controller of the identity who can make changes.
51
+ * @returns Nothing.
52
+ * @throws NotFoundError if the id can not be resolved.
53
+ * @throws NotSupportedError if the platform does not support multiple revocable keys.
54
+ */
55
+ verificationMethodRemove(verificationMethodId: string, controller?: string): Promise<void>;
56
+ /**
57
+ * Add a service to the document.
58
+ * @param identity The id of the document to add the service to.
59
+ * @param serviceId The id of the service.
60
+ * @param serviceType The type of the service.
61
+ * @param serviceEndpoint The endpoint for the service.
62
+ * @param controller The controller of the identity who can make changes.
63
+ * @returns The service.
64
+ * @throws NotFoundError if the id can not be resolved.
65
+ */
66
+ serviceCreate(identity: string, serviceId: string, serviceType: string | string[], serviceEndpoint: string | string[], controller?: string): Promise<IDidService>;
67
+ /**
68
+ * Remove a service from the document.
69
+ * @param serviceId The id of the service.
70
+ * @param controller The controller of the identity who can make changes.
71
+ * @returns Nothing.
72
+ * @throws NotFoundError if the id can not be resolved.
73
+ */
74
+ serviceRemove(serviceId: string, controller?: string): Promise<void>;
75
+ /**
76
+ * Create a verifiable credential for a verification method.
77
+ * @param verificationMethodId The verification method id to use.
78
+ * @param id The id of the credential.
79
+ * @param subject The credential subject to store in the verifiable credential.
80
+ * @param revocationIndex The bitmap revocation index of the credential, if undefined will not have revocation status.
81
+ * @param controller The controller of the identity who can make changes.
82
+ * @returns The created verifiable credential and its token.
83
+ * @throws NotFoundError if the id can not be resolved.
84
+ */
85
+ verifiableCredentialCreate(verificationMethodId: string, id: string | undefined, subject: IJsonLdNodeObject, revocationIndex?: number, controller?: string): Promise<{
86
+ verifiableCredential: IDidVerifiableCredential;
87
+ jwt: string;
88
+ }>;
89
+ /**
90
+ * Verify a verifiable credential is valid.
91
+ * @param credentialJwt The credential to verify.
92
+ * @returns The credential stored in the jwt and the revocation status.
93
+ */
94
+ verifiableCredentialVerify(credentialJwt: string): Promise<{
95
+ revoked: boolean;
96
+ verifiableCredential?: IDidVerifiableCredential;
97
+ }>;
98
+ /**
99
+ * Revoke verifiable credential.
100
+ * @param issuerIdentity The id of the document to update the revocation list for.
101
+ * @param credentialIndex The revocation bitmap index revoke.
102
+ * @param controller The controller of the identity who can make changes.
103
+ * @returns Nothing.
104
+ */
105
+ verifiableCredentialRevoke(issuerIdentity: string, credentialIndex: number, controller?: string): Promise<void>;
106
+ /**
107
+ * Unrevoke verifiable credential.
108
+ * @param issuerIdentity The id of the document to update the revocation list for.
109
+ * @param credentialIndex The revocation bitmap index to un revoke.
110
+ * @param controller The controller of the identity who can make changes.
111
+ * @returns Nothing.
112
+ */
113
+ verifiableCredentialUnrevoke(issuerIdentity: string, credentialIndex: number, controller?: string): Promise<void>;
114
+ /**
115
+ * Create a verifiable presentation from the supplied verifiable credentials.
116
+ * @param verificationMethodId The method to associate with the presentation.
117
+ * @param presentationId The id of the presentation.
118
+ * @param contexts The contexts for the data stored in the verifiable credential.
119
+ * @param types The types for the data stored in the verifiable credential.
120
+ * @param verifiableCredentials The credentials to use for creating the presentation in jwt format.
121
+ * @param expiresInMinutes The time in minutes for the presentation to expire.
122
+ * @param controller The controller of the identity who can make changes.
123
+ * @returns The created verifiable presentation and its token.
124
+ * @throws NotFoundError if the id can not be resolved.
125
+ */
126
+ verifiablePresentationCreate(verificationMethodId: string, presentationId: string | undefined, contexts: IJsonLdContextDefinitionRoot | undefined, types: string | string[] | undefined, verifiableCredentials: (string | IDidVerifiableCredential)[], expiresInMinutes?: number, controller?: string): Promise<{
127
+ verifiablePresentation: IDidVerifiablePresentation;
128
+ jwt: string;
129
+ }>;
130
+ /**
131
+ * Verify a verifiable presentation is valid.
132
+ * @param presentationJwt The presentation to verify.
133
+ * @returns The presentation stored in the jwt and the revocation status.
134
+ */
135
+ verifiablePresentationVerify(presentationJwt: string): Promise<{
136
+ revoked: boolean;
137
+ verifiablePresentation?: IDidVerifiablePresentation;
138
+ issuers?: IDidDocument[];
139
+ }>;
140
+ /**
141
+ * Create a proof for a document with the specified verification method.
142
+ * @param verificationMethodId The verification method id to use.
143
+ * @param proofType The type of proof to create.
144
+ * @param unsecureDocument The unsecure document to create the proof for.
145
+ * @param controller The controller of the identity who can make changes.
146
+ * @returns The proof.
147
+ */
148
+ proofCreate(verificationMethodId: string, proofType: ProofTypes, unsecureDocument: IJsonLdNodeObject, controller?: string): Promise<IProof>;
149
+ /**
150
+ * Verify proof for a document with the specified verification method.
151
+ * @param document The document to verify.
152
+ * @param proof The proof to verify.
153
+ * @returns True if the proof is verified.
154
+ */
155
+ proofVerify(document: IJsonLdNodeObject, proof: IProof): Promise<boolean>;
30
156
  }
@@ -1,6 +1,12 @@
1
1
  export * from "./identityProfileRoutes";
2
2
  export * from "./identityProfileService";
3
+ export * from "./identityResolverRoutes";
4
+ export * from "./identityResolverService";
3
5
  export * from "./identityRoutes";
4
6
  export * from "./identityService";
7
+ export * from "./models/IIdentityProfileServiceConstructorOptions";
8
+ export * from "./models/IIdentityResolverServiceConfig";
9
+ export * from "./models/IIdentityResolverServiceConstructorOptions";
5
10
  export * from "./models/IIdentityServiceConfig";
11
+ export * from "./models/IIdentityServiceConstructorOptions";
6
12
  export * from "./restEntryPoints";
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Options for the identity profile service constructor.
3
+ */
4
+ export interface IIdentityProfileServiceConstructorOptions {
5
+ /**
6
+ * The storage connector for the profiles.
7
+ * @default identity-profile
8
+ */
9
+ profileEntityConnectorType?: string;
10
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Configuration for the Identity Resolver Service.
3
+ */
4
+ export interface IIdentityResolverServiceConfig {
5
+ /**
6
+ * What is the default connector to use for Identity. If not provided the first connector from the factory will be used.
7
+ */
8
+ defaultNamespace?: string;
9
+ }
@@ -0,0 +1,15 @@
1
+ import type { IIdentityResolverServiceConfig } from "./IIdentityResolverServiceConfig";
2
+ /**
3
+ * Options for the identity resolver service constructor.
4
+ */
5
+ export interface IIdentityResolverServiceConstructorOptions {
6
+ /**
7
+ * Fallback connector type to use if the namespace connector is not available.
8
+ * @default universal
9
+ */
10
+ fallbackResolverConnectorType?: string;
11
+ /**
12
+ * The configuration for the identity service.
13
+ */
14
+ config?: IIdentityResolverServiceConfig;
15
+ }
@@ -0,0 +1,10 @@
1
+ import type { IIdentityServiceConfig } from "./IIdentityServiceConfig";
2
+ /**
3
+ * Options for the identity service constructor.
4
+ */
5
+ export interface IIdentityServiceConstructorOptions {
6
+ /**
7
+ * The configuration for the identity service.
8
+ */
9
+ config?: IIdentityServiceConfig;
10
+ }