@twin.org/trust-generators 0.0.3-next.23 → 0.0.3-next.24

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.
@@ -32,8 +32,8 @@ export class JwtVerifiableCredentialGenerator {
32
32
  */
33
33
  _tokenTtlInSeconds;
34
34
  /**
35
- * Create a new instance of JwtVerifiableCredentialGenerator.
36
- * @param options The options for the service.
35
+ * Creates a new instance of JwtVerifiableCredentialGenerator.
36
+ * @param options The options for the generator.
37
37
  */
38
38
  constructor(options) {
39
39
  this._loggingComponent = ComponentFactory.getIfExists(options?.loggingComponentType);
@@ -43,21 +43,19 @@ export class JwtVerifiableCredentialGenerator {
43
43
  }
44
44
  /**
45
45
  * Returns the class name of the component.
46
- * @returns The class name of the component.
46
+ * @returns The runtime class name string
47
47
  */
48
48
  className() {
49
49
  return JwtVerifiableCredentialGenerator.CLASS_NAME;
50
50
  }
51
51
  /**
52
- * Generate a trust payload.
53
- * @param organizationId The identity for which to generate the payload.
52
+ * Generates a JWT Verifiable Credential for the given organization identity.
53
+ * @param organizationId The identity for which to generate the credential.
54
54
  * @param info Information to use in the generation.
55
- * @param info.subject The subject of the verifiable credential (JSON-LD).
56
- * the JWT payload as the `org` claim.
55
+ * @param info.subject The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
57
56
  * @param options Per-call generation options.
58
- * @param options.tokenTtlInSeconds TTL override in seconds for this token only. Takes precedence over the
59
- * config-level `tokenTtlInSeconds` when provided.
60
- * @returns The generated JWT.
57
+ * @param options.tokenTtlInSeconds TTL override in seconds for this token only; takes precedence over the config-level value when provided.
58
+ * @returns A promise that resolves to the signed JWT string.
61
59
  */
62
60
  async generate(organizationId, info, options) {
63
61
  Guards.stringValue(JwtVerifiableCredentialGenerator.CLASS_NAME, "organizationId", organizationId);
@@ -70,8 +68,9 @@ export class JwtVerifiableCredentialGenerator {
70
68
  expirationDate = new Date(Date.now() + ttlMs);
71
69
  }
72
70
  const credential = await this._identityComponent.verifiableCredentialCreate(DocumentHelper.joinId(organizationId, this._verificationMethodId), undefined,
73
- // Identity subject can not be empty object
74
- info?.subject ?? { id: organizationId }, {
71
+ // Identity subject can not be empty object, so fall back to the organization id
72
+ // when the subject is missing or an empty object (e.g. an empty PIP output).
73
+ Is.objectValue(info?.subject) ? info.subject : { id: organizationId }, {
75
74
  expirationDate
76
75
  }, organizationId);
77
76
  return credential.jwt;
@@ -1 +1 @@
1
- {"version":3,"file":"jwtVerifiableCredentialGenerator.js","sourceRoot":"","sources":["../../../src/generators/jwtVerifiableCredentialGenerator.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAA2B,MAAM,2BAA2B,CAAC;AAMpF;;GAEG;AACH,MAAM,OAAO,gCAAgC;IAC5C;;OAEG;IACI,MAAM,CAAU,UAAU,sCAAsD;IAEvF;;;OAGG;IACH,8EAA8E;IAC7D,iBAAiB,CAAqB;IAEvD;;;OAGG;IACc,kBAAkB,CAAqB;IAExD;;;OAGG;IACc,qBAAqB,CAAS;IAE/C;;;OAGG;IACc,kBAAkB,CAAU;IAE7C;;;OAGG;IACH,YAAY,OAA4D;QACvE,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QAErF,IAAI,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,qBAAqB,IAAI,UAAU,CAAC,CAAC;QAE7F,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC;QACjE,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,gCAAgC,CAAC,UAAU,CAAC;IACpD,CAAC;IAED;;;;;;;;;;OAUG;IACI,KAAK,CAAC,QAAQ,CACpB,cAAsB,EACtB,IAAsC,EACtC,OAAuC;QAEvC,MAAM,CAAC,WAAW,CACjB,gCAAgC,CAAC,UAAU,oBAE3C,cAAc,CACd,CAAC;QAEF,MAAM,YAAY,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC;YAC1D,CAAC,CAAC,OAAO,CAAC,iBAAiB;YAC3B,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAE3B,IAAI,cAAc,CAAC;QAEnB,IAAI,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,MAAM,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC;YAClC,cAAc,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAC1E,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,EACjE,SAAS;QACT,2CAA2C;QAC3C,IAAI,EAAE,OAAO,IAAI,EAAE,EAAE,EAAE,cAAc,EAAE,EACvC;YACC,cAAc;SACd,EACD,cAAc,CACd,CAAC;QAEF,OAAO,UAAU,CAAC,GAAG,CAAC;IACvB,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ComponentFactory, Guards, Is } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { DocumentHelper, type IIdentityComponent } from \"@twin.org/identity-models\";\nimport type { ILoggingComponent } from \"@twin.org/logging-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { ITrustGenerator } from \"@twin.org/trust-models\";\nimport type { IJwtVerifiableCredentialGeneratorConstructorOptions } from \"../models/IJwtVerifiableCredentialGeneratorConstructorOptions.js\";\n\n/**\n * Class to generate a JWT Verifiable Credential.\n */\nexport class JwtVerifiableCredentialGenerator implements ITrustGenerator {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<JwtVerifiableCredentialGenerator>();\n\n\t/**\n\t * The logging component.\n\t * @internal\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-unused-private-class-members\n\tprivate readonly _loggingComponent?: ILoggingComponent;\n\n\t/**\n\t * The identity component.\n\t * @internal\n\t */\n\tprivate readonly _identityComponent: IIdentityComponent;\n\n\t/**\n\t * The verification method ID for the connector to use.\n\t * @internal\n\t */\n\tprivate readonly _verificationMethodId: string;\n\n\t/**\n\t * The time-to-live (TTL) for token in seconds.\n\t * @internal\n\t */\n\tprivate readonly _tokenTtlInSeconds?: number;\n\n\t/**\n\t * Create a new instance of JwtVerifiableCredentialGenerator.\n\t * @param options The options for the service.\n\t */\n\tconstructor(options: IJwtVerifiableCredentialGeneratorConstructorOptions) {\n\t\tthis._loggingComponent = ComponentFactory.getIfExists(options?.loggingComponentType);\n\n\t\tthis._identityComponent = ComponentFactory.get(options?.identityComponentType ?? \"identity\");\n\n\t\tthis._verificationMethodId = options.config.verificationMethodId;\n\t\tthis._tokenTtlInSeconds = options.config.tokenTtlInSeconds;\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn JwtVerifiableCredentialGenerator.CLASS_NAME;\n\t}\n\n\t/**\n\t * Generate a trust payload.\n\t * @param organizationId The identity for which to generate the payload.\n\t * @param info Information to use in the generation.\n\t * @param info.subject The subject of the verifiable credential (JSON-LD).\n\t * the JWT payload as the `org` claim.\n\t * @param options Per-call generation options.\n\t * @param options.tokenTtlInSeconds TTL override in seconds for this token only. Takes precedence over the\n\t * config-level `tokenTtlInSeconds` when provided.\n\t * @returns The generated JWT.\n\t */\n\tpublic async generate(\n\t\torganizationId: string,\n\t\tinfo?: { subject?: IJsonLdNodeObject },\n\t\toptions?: { tokenTtlInSeconds: number }\n\t): Promise<unknown> {\n\t\tGuards.stringValue(\n\t\t\tJwtVerifiableCredentialGenerator.CLASS_NAME,\n\t\t\tnameof(organizationId),\n\t\t\torganizationId\n\t\t);\n\n\t\tconst ttlInSeconds = Is.integer(options?.tokenTtlInSeconds)\n\t\t\t? options.tokenTtlInSeconds\n\t\t\t: this._tokenTtlInSeconds;\n\n\t\tlet expirationDate;\n\n\t\tif (Is.integer(ttlInSeconds)) {\n\t\t\tconst ttlMs = ttlInSeconds * 1000;\n\t\t\texpirationDate = new Date(Date.now() + ttlMs);\n\t\t}\n\n\t\tconst credential = await this._identityComponent.verifiableCredentialCreate(\n\t\t\tDocumentHelper.joinId(organizationId, this._verificationMethodId),\n\t\t\tundefined,\n\t\t\t// Identity subject can not be empty object\n\t\t\tinfo?.subject ?? { id: organizationId },\n\t\t\t{\n\t\t\t\texpirationDate\n\t\t\t},\n\t\t\torganizationId\n\t\t);\n\n\t\treturn credential.jwt;\n\t}\n}\n"]}
1
+ {"version":3,"file":"jwtVerifiableCredentialGenerator.js","sourceRoot":"","sources":["../../../src/generators/jwtVerifiableCredentialGenerator.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAE9D,OAAO,EAAE,cAAc,EAA2B,MAAM,2BAA2B,CAAC;AAMpF;;GAEG;AACH,MAAM,OAAO,gCAAgC;IAC5C;;OAEG;IACI,MAAM,CAAU,UAAU,sCAAsD;IAEvF;;;OAGG;IACH,8EAA8E;IAC7D,iBAAiB,CAAqB;IAEvD;;;OAGG;IACc,kBAAkB,CAAqB;IAExD;;;OAGG;IACc,qBAAqB,CAAS;IAE/C;;;OAGG;IACc,kBAAkB,CAAU;IAE7C;;;OAGG;IACH,YAAY,OAA4D;QACvE,IAAI,CAAC,iBAAiB,GAAG,gBAAgB,CAAC,WAAW,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC;QAErF,IAAI,CAAC,kBAAkB,GAAG,gBAAgB,CAAC,GAAG,CAAC,OAAO,EAAE,qBAAqB,IAAI,UAAU,CAAC,CAAC;QAE7F,IAAI,CAAC,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC;QACjE,IAAI,CAAC,kBAAkB,GAAG,OAAO,CAAC,MAAM,CAAC,iBAAiB,CAAC;IAC5D,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,gCAAgC,CAAC,UAAU,CAAC;IACpD,CAAC;IAED;;;;;;;;OAQG;IACI,KAAK,CAAC,QAAQ,CACpB,cAAsB,EACtB,IAAsC,EACtC,OAAuC;QAEvC,MAAM,CAAC,WAAW,CACjB,gCAAgC,CAAC,UAAU,oBAE3C,cAAc,CACd,CAAC;QAEF,MAAM,YAAY,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,iBAAiB,CAAC;YAC1D,CAAC,CAAC,OAAO,CAAC,iBAAiB;YAC3B,CAAC,CAAC,IAAI,CAAC,kBAAkB,CAAC;QAE3B,IAAI,cAAc,CAAC;QAEnB,IAAI,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,EAAE,CAAC;YAC9B,MAAM,KAAK,GAAG,YAAY,GAAG,IAAI,CAAC;YAClC,cAAc,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC,CAAC;QAC/C,CAAC;QAED,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,0BAA0B,CAC1E,cAAc,CAAC,MAAM,CAAC,cAAc,EAAE,IAAI,CAAC,qBAAqB,CAAC,EACjE,SAAS;QACT,gFAAgF;QAChF,6EAA6E;QAC7E,EAAE,CAAC,WAAW,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,cAAc,EAAE,EACrE;YACC,cAAc;SACd,EACD,cAAc,CACd,CAAC;QAEF,OAAO,UAAU,CAAC,GAAG,CAAC;IACvB,CAAC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ComponentFactory, Guards, Is } from \"@twin.org/core\";\nimport type { IJsonLdNodeObject } from \"@twin.org/data-json-ld\";\nimport { DocumentHelper, type IIdentityComponent } from \"@twin.org/identity-models\";\nimport type { ILoggingComponent } from \"@twin.org/logging-models\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type { ITrustGenerator } from \"@twin.org/trust-models\";\nimport type { IJwtVerifiableCredentialGeneratorConstructorOptions } from \"../models/IJwtVerifiableCredentialGeneratorConstructorOptions.js\";\n\n/**\n * Class to generate a JWT Verifiable Credential.\n */\nexport class JwtVerifiableCredentialGenerator implements ITrustGenerator {\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<JwtVerifiableCredentialGenerator>();\n\n\t/**\n\t * The logging component.\n\t * @internal\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-unused-private-class-members\n\tprivate readonly _loggingComponent?: ILoggingComponent;\n\n\t/**\n\t * The identity component.\n\t * @internal\n\t */\n\tprivate readonly _identityComponent: IIdentityComponent;\n\n\t/**\n\t * The verification method ID for the connector to use.\n\t * @internal\n\t */\n\tprivate readonly _verificationMethodId: string;\n\n\t/**\n\t * The time-to-live (TTL) for token in seconds.\n\t * @internal\n\t */\n\tprivate readonly _tokenTtlInSeconds?: number;\n\n\t/**\n\t * Creates a new instance of JwtVerifiableCredentialGenerator.\n\t * @param options The options for the generator.\n\t */\n\tconstructor(options: IJwtVerifiableCredentialGeneratorConstructorOptions) {\n\t\tthis._loggingComponent = ComponentFactory.getIfExists(options?.loggingComponentType);\n\n\t\tthis._identityComponent = ComponentFactory.get(options?.identityComponentType ?? \"identity\");\n\n\t\tthis._verificationMethodId = options.config.verificationMethodId;\n\t\tthis._tokenTtlInSeconds = options.config.tokenTtlInSeconds;\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The runtime class name string\n\t */\n\tpublic className(): string {\n\t\treturn JwtVerifiableCredentialGenerator.CLASS_NAME;\n\t}\n\n\t/**\n\t * Generates a JWT Verifiable Credential for the given organization identity.\n\t * @param organizationId The identity for which to generate the credential.\n\t * @param info Information to use in the generation.\n\t * @param info.subject The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.\n\t * @param options Per-call generation options.\n\t * @param options.tokenTtlInSeconds TTL override in seconds for this token only; takes precedence over the config-level value when provided.\n\t * @returns A promise that resolves to the signed JWT string.\n\t */\n\tpublic async generate(\n\t\torganizationId: string,\n\t\tinfo?: { subject?: IJsonLdNodeObject },\n\t\toptions?: { tokenTtlInSeconds: number }\n\t): Promise<unknown> {\n\t\tGuards.stringValue(\n\t\t\tJwtVerifiableCredentialGenerator.CLASS_NAME,\n\t\t\tnameof(organizationId),\n\t\t\torganizationId\n\t\t);\n\n\t\tconst ttlInSeconds = Is.integer(options?.tokenTtlInSeconds)\n\t\t\t? options.tokenTtlInSeconds\n\t\t\t: this._tokenTtlInSeconds;\n\n\t\tlet expirationDate;\n\n\t\tif (Is.integer(ttlInSeconds)) {\n\t\t\tconst ttlMs = ttlInSeconds * 1000;\n\t\t\texpirationDate = new Date(Date.now() + ttlMs);\n\t\t}\n\n\t\tconst credential = await this._identityComponent.verifiableCredentialCreate(\n\t\t\tDocumentHelper.joinId(organizationId, this._verificationMethodId),\n\t\t\tundefined,\n\t\t\t// Identity subject can not be empty object, so fall back to the organization id\n\t\t\t// when the subject is missing or an empty object (e.g. an empty PIP output).\n\t\t\tIs.objectValue(info?.subject) ? info.subject : { id: organizationId },\n\t\t\t{\n\t\t\t\texpirationDate\n\t\t\t},\n\t\t\torganizationId\n\t\t);\n\n\t\treturn credential.jwt;\n\t}\n}\n"]}
@@ -10,25 +10,23 @@ export declare class JwtVerifiableCredentialGenerator implements ITrustGenerator
10
10
  */
11
11
  static readonly CLASS_NAME: string;
12
12
  /**
13
- * Create a new instance of JwtVerifiableCredentialGenerator.
14
- * @param options The options for the service.
13
+ * Creates a new instance of JwtVerifiableCredentialGenerator.
14
+ * @param options The options for the generator.
15
15
  */
16
16
  constructor(options: IJwtVerifiableCredentialGeneratorConstructorOptions);
17
17
  /**
18
18
  * Returns the class name of the component.
19
- * @returns The class name of the component.
19
+ * @returns The runtime class name string
20
20
  */
21
21
  className(): string;
22
22
  /**
23
- * Generate a trust payload.
24
- * @param organizationId The identity for which to generate the payload.
23
+ * Generates a JWT Verifiable Credential for the given organization identity.
24
+ * @param organizationId The identity for which to generate the credential.
25
25
  * @param info Information to use in the generation.
26
- * @param info.subject The subject of the verifiable credential (JSON-LD).
27
- * the JWT payload as the `org` claim.
26
+ * @param info.subject The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
28
27
  * @param options Per-call generation options.
29
- * @param options.tokenTtlInSeconds TTL override in seconds for this token only. Takes precedence over the
30
- * config-level `tokenTtlInSeconds` when provided.
31
- * @returns The generated JWT.
28
+ * @param options.tokenTtlInSeconds TTL override in seconds for this token only; takes precedence over the config-level value when provided.
29
+ * @returns A promise that resolves to the signed JWT string.
32
30
  */
33
31
  generate(organizationId: string, info?: {
34
32
  subject?: IJsonLdNodeObject;
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.3-next.24](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.23...trust-generators-v0.0.3-next.24) (2026-06-18)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * fall back to organization id when policy subject is empty ([#44](https://github.com/iotaledger/twin-trust/issues/44)) ([ee5e31c](https://github.com/iotaledger/twin-trust/commit/ee5e31c32c3ad465c9ffb9fa0c4cdfbaf3295e54))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/trust-models bumped from 0.0.3-next.23 to 0.0.3-next.24
16
+
3
17
  ## [0.0.3-next.23](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.22...trust-generators-v0.0.3-next.23) (2026-06-11)
4
18
 
5
19
 
@@ -12,7 +12,7 @@ Class to generate a JWT Verifiable Credential.
12
12
 
13
13
  > **new JwtVerifiableCredentialGenerator**(`options`): `JwtVerifiableCredentialGenerator`
14
14
 
15
- Create a new instance of JwtVerifiableCredentialGenerator.
15
+ Creates a new instance of JwtVerifiableCredentialGenerator.
16
16
 
17
17
  #### Parameters
18
18
 
@@ -20,7 +20,7 @@ Create a new instance of JwtVerifiableCredentialGenerator.
20
20
 
21
21
  [`IJwtVerifiableCredentialGeneratorConstructorOptions`](../interfaces/IJwtVerifiableCredentialGeneratorConstructorOptions.md)
22
22
 
23
- The options for the service.
23
+ The options for the generator.
24
24
 
25
25
  #### Returns
26
26
 
@@ -46,7 +46,7 @@ Returns the class name of the component.
46
46
 
47
47
  `string`
48
48
 
49
- The class name of the component.
49
+ The runtime class name string
50
50
 
51
51
  #### Implementation of
52
52
 
@@ -58,7 +58,7 @@ The class name of the component.
58
58
 
59
59
  > **generate**(`organizationId`, `info?`, `options?`): `Promise`\<`unknown`\>
60
60
 
61
- Generate a trust payload.
61
+ Generates a JWT Verifiable Credential for the given organization identity.
62
62
 
63
63
  #### Parameters
64
64
 
@@ -66,7 +66,7 @@ Generate a trust payload.
66
66
 
67
67
  `string`
68
68
 
69
- The identity for which to generate the payload.
69
+ The identity for which to generate the credential.
70
70
 
71
71
  ##### info?
72
72
 
@@ -76,8 +76,7 @@ Information to use in the generation.
76
76
 
77
77
  `IJsonLdNodeObject`
78
78
 
79
- The subject of the verifiable credential (JSON-LD).
80
- the JWT payload as the `org` claim.
79
+ The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
81
80
 
82
81
  ##### options?
83
82
 
@@ -87,14 +86,13 @@ Per-call generation options.
87
86
 
88
87
  `number`
89
88
 
90
- TTL override in seconds for this token only. Takes precedence over the
91
- config-level `tokenTtlInSeconds` when provided.
89
+ TTL override in seconds for this token only; takes precedence over the config-level value when provided.
92
90
 
93
91
  #### Returns
94
92
 
95
93
  `Promise`\<`unknown`\>
96
94
 
97
- The generated JWT.
95
+ A promise that resolves to the signed JWT string.
98
96
 
99
97
  #### Implementation of
100
98
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/trust-generators",
3
- "version": "0.0.3-next.23",
3
+ "version": "0.0.3-next.24",
4
4
  "description": "Implements trust credential generators that produce signed verifiable credential artefacts",
5
5
  "repository": {
6
6
  "type": "git",
@@ -19,7 +19,7 @@
19
19
  "@twin.org/identity-models": "next",
20
20
  "@twin.org/logging-models": "next",
21
21
  "@twin.org/nameof": "next",
22
- "@twin.org/trust-models": "0.0.3-next.23",
22
+ "@twin.org/trust-models": "0.0.3-next.24",
23
23
  "@twin.org/web": "next"
24
24
  },
25
25
  "main": "./dist/es/index.js",