@twin.org/identity-models 0.0.1-next.4 → 0.0.1-next.5
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.
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IComponent } from "@twin.org/core";
|
|
2
|
+
import type { IJsonLdContextDefinitionRoot } from "@twin.org/data-json-ld";
|
|
2
3
|
import type { DidVerificationMethodType, IDidDocument, IDidDocumentVerificationMethod, IDidService, IDidVerifiableCredential, IDidVerifiablePresentation } from "@twin.org/standards-w3c-did";
|
|
3
4
|
/**
|
|
4
5
|
* Interface describing an identity connector.
|
|
@@ -68,7 +69,7 @@ export interface IIdentityConnector extends IComponent {
|
|
|
68
69
|
* @returns The created verifiable credential and its token.
|
|
69
70
|
* @throws NotFoundError if the id can not be resolved.
|
|
70
71
|
*/
|
|
71
|
-
createVerifiableCredential<T>(controller: string, verificationMethodId: string, credentialId: string | undefined, types: string | string[] | undefined, subject: T | T[], contexts?:
|
|
72
|
+
createVerifiableCredential<T>(controller: string, verificationMethodId: string, credentialId: string | undefined, types: string | string[] | undefined, subject: T | T[], contexts?: IJsonLdContextDefinitionRoot, revocationIndex?: number): Promise<{
|
|
72
73
|
verifiableCredential: IDidVerifiableCredential<T>;
|
|
73
74
|
jwt: string;
|
|
74
75
|
}>;
|
|
@@ -108,7 +109,7 @@ export interface IIdentityConnector extends IComponent {
|
|
|
108
109
|
* @returns The created verifiable presentation and its token.
|
|
109
110
|
* @throws NotFoundError if the id can not be resolved.
|
|
110
111
|
*/
|
|
111
|
-
createVerifiablePresentation(controller: string, presentationMethodId: string, types: string | string[] | undefined, verifiableCredentials: string[], contexts?:
|
|
112
|
+
createVerifiablePresentation(controller: string, presentationMethodId: string, types: string | string[] | undefined, verifiableCredentials: string[], contexts?: IJsonLdContextDefinitionRoot, expiresInMinutes?: number): Promise<{
|
|
112
113
|
verifiablePresentation: IDidVerifiablePresentation;
|
|
113
114
|
jwt: string;
|
|
114
115
|
}>;
|
package/docs/changelog.md
CHANGED
|
@@ -224,7 +224,7 @@ The type for the data stored in the verifiable credential.
|
|
|
224
224
|
|
|
225
225
|
The subject data to store for the credential.
|
|
226
226
|
|
|
227
|
-
• **contexts?**: `
|
|
227
|
+
• **contexts?**: `IJsonLdContextDefinitionRoot`
|
|
228
228
|
|
|
229
229
|
Additional contexts to include in the credential.
|
|
230
230
|
|
|
@@ -364,7 +364,7 @@ The types for the data stored in the verifiable credential.
|
|
|
364
364
|
|
|
365
365
|
The credentials to use for creating the presentation in jwt format.
|
|
366
366
|
|
|
367
|
-
• **contexts?**: `
|
|
367
|
+
• **contexts?**: `IJsonLdContextDefinitionRoot`
|
|
368
368
|
|
|
369
369
|
Additional contexts to include in the presentation.
|
|
370
370
|
|