@twin.org/trust-generators 0.0.3-next.9 → 0.9.0

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # TWIN Trust Generators
2
2
 
3
- Generators for trust.
3
+ This package is part of the trust repository and provides reusable trust building blocks so applications can issue, validate, and orchestrate trust artefacts with consistent behaviour.
4
4
 
5
5
  ## Installation
6
6
 
@@ -14,6 +14,7 @@ export class JwtVerifiableCredentialGenerator {
14
14
  * The logging component.
15
15
  * @internal
16
16
  */
17
+ // eslint-disable-next-line @typescript-eslint/no-unused-private-class-members
17
18
  _loggingComponent;
18
19
  /**
19
20
  * The identity component.
@@ -31,40 +32,48 @@ export class JwtVerifiableCredentialGenerator {
31
32
  */
32
33
  _tokenTtlInSeconds;
33
34
  /**
34
- * Create a new instance of JwtVerifiableCredentialGenerator.
35
- * @param options The options for the service.
35
+ * Creates a new instance of JwtVerifiableCredentialGenerator.
36
+ * @param options The options for the generator.
36
37
  */
37
38
  constructor(options) {
38
- this._loggingComponent = ComponentFactory.getIfExists(options?.loggingComponentType ?? "logging");
39
+ this._loggingComponent = ComponentFactory.getIfExists(options?.loggingComponentType);
39
40
  this._identityComponent = ComponentFactory.get(options?.identityComponentType ?? "identity");
40
41
  this._verificationMethodId = options.config.verificationMethodId;
41
42
  this._tokenTtlInSeconds = options.config.tokenTtlInSeconds;
42
43
  }
43
44
  /**
44
45
  * Returns the class name of the component.
45
- * @returns The class name of the component.
46
+ * @returns The runtime class name string
46
47
  */
47
48
  className() {
48
49
  return JwtVerifiableCredentialGenerator.CLASS_NAME;
49
50
  }
50
51
  /**
51
- * Generate a trust payload.
52
- * @param identity 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.
53
54
  * @param info Information to use in the generation.
54
- * @param info.subject The subject of the verifiable credential.
55
- * @returns The generated payload.
55
+ * @param info.subject The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
56
+ * @param options Per-call generation options.
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.
56
59
  */
57
- async generate(identity, info) {
58
- Guards.stringValue(JwtVerifiableCredentialGenerator.CLASS_NAME, "identity", identity);
60
+ async generate(organizationId, info, options) {
61
+ Guards.stringValue(JwtVerifiableCredentialGenerator.CLASS_NAME, "organizationId", organizationId);
62
+ const ttlInSeconds = Is.integer(options?.tokenTtlInSeconds)
63
+ ? options.tokenTtlInSeconds
64
+ : this._tokenTtlInSeconds;
59
65
  let expirationDate;
60
- if (Is.integer(this._tokenTtlInSeconds)) {
61
- const ttlMs = this._tokenTtlInSeconds * 1000;
66
+ if (Is.integer(ttlInSeconds)) {
67
+ const ttlMs = ttlInSeconds * 1000;
62
68
  expirationDate = new Date(Date.now() + ttlMs);
63
69
  }
64
- const credential = await this._identityComponent.verifiableCredentialCreate(identity, DocumentHelper.joinId(identity, this._verificationMethodId), info?.subject ?? {}, {
70
+ const credential = await this._identityComponent.verifiableCredentialCreate(DocumentHelper.joinId(organizationId, this._verificationMethodId), undefined,
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 }, {
65
74
  expirationDate
66
- });
67
- return credential;
75
+ }, organizationId);
76
+ return credential.jwt;
68
77
  }
69
78
  }
70
79
  //# sourceMappingURL=jwtVerifiableCredentialGenerator.js.map
@@ -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;IACc,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,CACpD,OAAO,EAAE,oBAAoB,IAAI,SAAS,CAC1C,CAAC;QAEF,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;;;;;;OAMG;IACI,KAAK,CAAC,QAAQ,CACpB,QAAgB,EAChB,IAAsC;QAEtC,MAAM,CAAC,WAAW,CAAC,gCAAgC,CAAC,UAAU,cAAoB,QAAQ,CAAC,CAAC;QAE5F,IAAI,cAAc,CAAC;QAEnB,IAAI,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC;YACzC,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC;YAC7C,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,QAAQ,EACR,cAAc,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,qBAAqB,CAAC,EAC3D,IAAI,EAAE,OAAO,IAAI,EAAE,EACnB;YACC,cAAc;SACd,CACD,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,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\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(\n\t\t\toptions?.loggingComponentType ?? \"logging\"\n\t\t);\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 identity 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.\n\t * @returns The generated payload.\n\t */\n\tpublic async generate(\n\t\tidentity: string,\n\t\tinfo?: { subject?: IJsonLdNodeObject }\n\t): Promise<unknown> {\n\t\tGuards.stringValue(JwtVerifiableCredentialGenerator.CLASS_NAME, nameof(identity), identity);\n\n\t\tlet expirationDate;\n\n\t\tif (Is.integer(this._tokenTtlInSeconds)) {\n\t\t\tconst ttlMs = this._tokenTtlInSeconds * 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\tidentity,\n\t\t\tDocumentHelper.joinId(identity, this._verificationMethodId),\n\t\t\tinfo?.subject ?? {},\n\t\t\t{\n\t\t\t\texpirationDate\n\t\t\t}\n\t\t);\n\n\t\treturn credential;\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"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IJwtVerifiableCredentialGeneratorConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IJwtVerifiableCredentialGeneratorConstructorOptions.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nimport type { IJwtVerifiableCredentialGeneratorConfig } from \"./IJwtVerifiableCredentialGeneratorConfig.js\";\n\n/**\n * The options for the JWT Verifiable Credential Generator.\n */\nexport interface IJwtVerifiableCredentialGeneratorConstructorOptions {\n\t/**\n\t * The logging component type.\n\t * @default logging\n\t */\n\tloggingComponentType?: string;\n\n\t/**\n\t * The identity component type.\n\t * @default identity\n\t */\n\tidentityComponentType?: string;\n\n\t/**\n\t * The configuration for the generator.\n\t */\n\tconfig: IJwtVerifiableCredentialGeneratorConfig;\n}\n"]}
1
+ {"version":3,"file":"IJwtVerifiableCredentialGeneratorConstructorOptions.js","sourceRoot":"","sources":["../../../src/models/IJwtVerifiableCredentialGeneratorConstructorOptions.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2025 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nimport type { IJwtVerifiableCredentialGeneratorConfig } from \"./IJwtVerifiableCredentialGeneratorConfig.js\";\n\n/**\n * The options for the JWT Verifiable Credential Generator.\n */\nexport interface IJwtVerifiableCredentialGeneratorConstructorOptions {\n\t/**\n\t * The logging component type.\n\t */\n\tloggingComponentType?: string;\n\n\t/**\n\t * The identity component type.\n\t * @default identity\n\t */\n\tidentityComponentType?: string;\n\n\t/**\n\t * The configuration for the generator.\n\t */\n\tconfig: IJwtVerifiableCredentialGeneratorConfig;\n}\n"]}
@@ -10,23 +10,27 @@ 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 identity 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.
27
- * @returns The generated payload.
26
+ * @param info.subject The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
27
+ * @param options Per-call generation options.
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.
28
30
  */
29
- generate(identity: string, info?: {
31
+ generate(organizationId: string, info?: {
30
32
  subject?: IJsonLdNodeObject;
33
+ }, options?: {
34
+ tokenTtlInSeconds: number;
31
35
  }): Promise<unknown>;
32
36
  }
@@ -5,7 +5,6 @@ import type { IJwtVerifiableCredentialGeneratorConfig } from "./IJwtVerifiableCr
5
5
  export interface IJwtVerifiableCredentialGeneratorConstructorOptions {
6
6
  /**
7
7
  * The logging component type.
8
- * @default logging
9
8
  */
10
9
  loggingComponentType?: string;
11
10
  /**
package/docs/changelog.md CHANGED
@@ -1,6 +1,256 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.9](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.8...trust-generators-v0.0.3-next.9) (2026-02-26)
3
+ ## [0.9.0](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.9.0...trust-generators-v0.9.0) (2026-06-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * release to production ([#51](https://github.com/iotaledger/twin-trust/issues/51)) ([998b21a](https://github.com/iotaledger/twin-trust/commit/998b21a2c4663b7d49fc11ed2866f34ef75de390))
9
+
10
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.9.0-next.0...trust-generators-v0.9.0-next.1) (2026-06-23)
11
+
12
+
13
+ ### Features
14
+
15
+ * add default generator config ([54d98ba](https://github.com/iotaledger/twin-trust/commit/54d98ba53b7450b56337daeda504437be0d21943))
16
+ * add generators ([6228c88](https://github.com/iotaledger/twin-trust/commit/6228c88a8f0244b7bdfc76b8624c427c81d23f7b))
17
+ * add optional tenantId + organizationId to trust VC payload ([#19](https://github.com/iotaledger/twin-trust/issues/19)) ([1e93f6b](https://github.com/iotaledger/twin-trust/commit/1e93f6b0eacbfa725f3c3515d4255b39dd122ce7))
18
+ * add TrustHelper hashTenantId ([#22](https://github.com/iotaledger/twin-trust/issues/22)) ([1efa9dc](https://github.com/iotaledger/twin-trust/commit/1efa9dc7ef0534dbb1a789fac300409190452273))
19
+ * organization identifiers ([#39](https://github.com/iotaledger/twin-trust/issues/39)) ([a5891b9](https://github.com/iotaledger/twin-trust/commit/a5891b9d57ef209c20f53302442d1910dce963d2))
20
+ * ttl-token per generation ([#26](https://github.com/iotaledger/twin-trust/issues/26)) ([a35e925](https://github.com/iotaledger/twin-trust/commit/a35e925560d05f30dd8c02eb4184c0c503ca075a))
21
+ * typescript 6 update ([a232da2](https://github.com/iotaledger/twin-trust/commit/a232da293afbd3b42843e187e4952dabd7917397))
22
+ * update dependencies ([367d7fc](https://github.com/iotaledger/twin-trust/commit/367d7fc1f970522650c776d231bfacc84f97be67))
23
+ * update param names ([4c78d57](https://github.com/iotaledger/twin-trust/commit/4c78d5703ce7adef3fb5d3bbb1d2cde5db4376cc))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * default VC credentialSubject to the issuer when none is provided ([#37](https://github.com/iotaledger/twin-trust/issues/37)) ([9c7653d](https://github.com/iotaledger/twin-trust/commit/9c7653d6c34cc2014aac45ed7a3aa4ae720c3f63))
29
+ * 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))
30
+ * jwt verifier return just token on creation ([9778491](https://github.com/iotaledger/twin-trust/commit/97784917c0ce53c3908e91a0db9137f8473eadeb))
31
+ * pass correct parameters to vc create ([bca9529](https://github.com/iotaledger/twin-trust/commit/bca95292605720f45f1f9dd2cec34053734b2d7f))
32
+ * tests ([fcadcf1](https://github.com/iotaledger/twin-trust/commit/fcadcf1f4e9bab4acbfc1722b0112f1d9723d7fa))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @twin.org/trust-models bumped from 0.9.0-next.0 to 0.9.0-next.1
40
+
41
+ ## [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)
42
+
43
+
44
+ ### Bug Fixes
45
+
46
+ * 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))
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * The following workspace dependencies were updated
52
+ * dependencies
53
+ * @twin.org/trust-models bumped from 0.0.3-next.23 to 0.0.3-next.24
54
+
55
+ ## [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)
56
+
57
+
58
+ ### Features
59
+
60
+ * add default generator config ([54d98ba](https://github.com/iotaledger/twin-trust/commit/54d98ba53b7450b56337daeda504437be0d21943))
61
+ * add generators ([6228c88](https://github.com/iotaledger/twin-trust/commit/6228c88a8f0244b7bdfc76b8624c427c81d23f7b))
62
+ * add optional tenantId + organizationId to trust VC payload ([#19](https://github.com/iotaledger/twin-trust/issues/19)) ([1e93f6b](https://github.com/iotaledger/twin-trust/commit/1e93f6b0eacbfa725f3c3515d4255b39dd122ce7))
63
+ * add TrustHelper hashTenantId ([#22](https://github.com/iotaledger/twin-trust/issues/22)) ([1efa9dc](https://github.com/iotaledger/twin-trust/commit/1efa9dc7ef0534dbb1a789fac300409190452273))
64
+ * organization identifiers ([#39](https://github.com/iotaledger/twin-trust/issues/39)) ([a5891b9](https://github.com/iotaledger/twin-trust/commit/a5891b9d57ef209c20f53302442d1910dce963d2))
65
+ * ttl-token per generation ([#26](https://github.com/iotaledger/twin-trust/issues/26)) ([a35e925](https://github.com/iotaledger/twin-trust/commit/a35e925560d05f30dd8c02eb4184c0c503ca075a))
66
+ * typescript 6 update ([a232da2](https://github.com/iotaledger/twin-trust/commit/a232da293afbd3b42843e187e4952dabd7917397))
67
+ * update dependencies ([367d7fc](https://github.com/iotaledger/twin-trust/commit/367d7fc1f970522650c776d231bfacc84f97be67))
68
+ * update param names ([4c78d57](https://github.com/iotaledger/twin-trust/commit/4c78d5703ce7adef3fb5d3bbb1d2cde5db4376cc))
69
+
70
+
71
+ ### Bug Fixes
72
+
73
+ * default VC credentialSubject to the issuer when none is provided ([#37](https://github.com/iotaledger/twin-trust/issues/37)) ([9c7653d](https://github.com/iotaledger/twin-trust/commit/9c7653d6c34cc2014aac45ed7a3aa4ae720c3f63))
74
+ * jwt verifier return just token on creation ([9778491](https://github.com/iotaledger/twin-trust/commit/97784917c0ce53c3908e91a0db9137f8473eadeb))
75
+ * pass correct parameters to vc create ([bca9529](https://github.com/iotaledger/twin-trust/commit/bca95292605720f45f1f9dd2cec34053734b2d7f))
76
+ * tests ([fcadcf1](https://github.com/iotaledger/twin-trust/commit/fcadcf1f4e9bab4acbfc1722b0112f1d9723d7fa))
77
+
78
+
79
+ ### Dependencies
80
+
81
+ * The following workspace dependencies were updated
82
+ * dependencies
83
+ * @twin.org/trust-models bumped from 0.0.3-next.21 to 0.0.3-next.23
84
+
85
+ ## [0.0.3-next.21](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.20...trust-generators-v0.0.3-next.21) (2026-06-11)
86
+
87
+
88
+ ### Features
89
+
90
+ * organization identifiers ([#39](https://github.com/iotaledger/twin-trust/issues/39)) ([a5891b9](https://github.com/iotaledger/twin-trust/commit/a5891b9d57ef209c20f53302442d1910dce963d2))
91
+
92
+
93
+ ### Dependencies
94
+
95
+ * The following workspace dependencies were updated
96
+ * dependencies
97
+ * @twin.org/trust-models bumped from 0.0.3-next.20 to 0.0.3-next.21
98
+
99
+ ## [0.0.3-next.20](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.19...trust-generators-v0.0.3-next.20) (2026-06-10)
100
+
101
+
102
+ ### Bug Fixes
103
+
104
+ * default VC credentialSubject to the issuer when none is provided ([#37](https://github.com/iotaledger/twin-trust/issues/37)) ([9c7653d](https://github.com/iotaledger/twin-trust/commit/9c7653d6c34cc2014aac45ed7a3aa4ae720c3f63))
105
+
106
+
107
+ ### Dependencies
108
+
109
+ * The following workspace dependencies were updated
110
+ * dependencies
111
+ * @twin.org/trust-models bumped from 0.0.3-next.19 to 0.0.3-next.20
112
+
113
+ ## [0.0.3-next.19](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.18...trust-generators-v0.0.3-next.19) (2026-06-05)
114
+
115
+
116
+ ### Miscellaneous Chores
117
+
118
+ * **trust-generators:** Synchronize repo versions
119
+
120
+
121
+ ### Dependencies
122
+
123
+ * The following workspace dependencies were updated
124
+ * dependencies
125
+ * @twin.org/trust-models bumped from 0.0.3-next.18 to 0.0.3-next.19
126
+
127
+ ## [0.0.3-next.18](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.17...trust-generators-v0.0.3-next.18) (2026-06-05)
128
+
129
+
130
+ ### Miscellaneous Chores
131
+
132
+ * **trust-generators:** Synchronize repo versions
133
+
134
+
135
+ ### Dependencies
136
+
137
+ * The following workspace dependencies were updated
138
+ * dependencies
139
+ * @twin.org/trust-models bumped from 0.0.3-next.17 to 0.0.3-next.18
140
+
141
+ ## [0.0.3-next.17](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.16...trust-generators-v0.0.3-next.17) (2026-06-02)
142
+
143
+
144
+ ### Features
145
+
146
+ * update param names ([4c78d57](https://github.com/iotaledger/twin-trust/commit/4c78d5703ce7adef3fb5d3bbb1d2cde5db4376cc))
147
+
148
+
149
+ ### Dependencies
150
+
151
+ * The following workspace dependencies were updated
152
+ * dependencies
153
+ * @twin.org/trust-models bumped from 0.0.3-next.16 to 0.0.3-next.17
154
+
155
+ ## [0.0.3-next.16](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.15...trust-generators-v0.0.3-next.16) (2026-05-27)
156
+
157
+
158
+ ### Features
159
+
160
+ * ttl-token per generation ([#26](https://github.com/iotaledger/twin-trust/issues/26)) ([a35e925](https://github.com/iotaledger/twin-trust/commit/a35e925560d05f30dd8c02eb4184c0c503ca075a))
161
+
162
+
163
+ ### Dependencies
164
+
165
+ * The following workspace dependencies were updated
166
+ * dependencies
167
+ * @twin.org/trust-models bumped from 0.0.3-next.15 to 0.0.3-next.16
168
+
169
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.14...trust-generators-v0.0.3-next.15) (2026-05-26)
170
+
171
+
172
+ ### Features
173
+
174
+ * add TrustHelper hashTenantId ([#22](https://github.com/iotaledger/twin-trust/issues/22)) ([1efa9dc](https://github.com/iotaledger/twin-trust/commit/1efa9dc7ef0534dbb1a789fac300409190452273))
175
+
176
+
177
+ ### Dependencies
178
+
179
+ * The following workspace dependencies were updated
180
+ * dependencies
181
+ * @twin.org/trust-models bumped from 0.0.3-next.14 to 0.0.3-next.15
182
+
183
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.13...trust-generators-v0.0.3-next.14) (2026-05-22)
184
+
185
+
186
+ ### Features
187
+
188
+ * add optional tenantId + organizationId to trust VC payload ([#19](https://github.com/iotaledger/twin-trust/issues/19)) ([1e93f6b](https://github.com/iotaledger/twin-trust/commit/1e93f6b0eacbfa725f3c3515d4255b39dd122ce7))
189
+
190
+
191
+ ### Dependencies
192
+
193
+ * The following workspace dependencies were updated
194
+ * dependencies
195
+ * @twin.org/trust-models bumped from 0.0.3-next.13 to 0.0.3-next.14
196
+
197
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.12...trust-generators-v0.0.3-next.13) (2026-05-20)
198
+
199
+
200
+ ### Features
201
+
202
+ * update dependencies ([367d7fc](https://github.com/iotaledger/twin-trust/commit/367d7fc1f970522650c776d231bfacc84f97be67))
203
+
204
+
205
+ ### Dependencies
206
+
207
+ * The following workspace dependencies were updated
208
+ * dependencies
209
+ * @twin.org/trust-models bumped from 0.0.3-next.12 to 0.0.3-next.13
210
+
211
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.11...trust-generators-v0.0.3-next.12) (2026-05-11)
212
+
213
+
214
+ ### Features
215
+
216
+ * typescript 6 update ([a232da2](https://github.com/iotaledger/twin-trust/commit/a232da293afbd3b42843e187e4952dabd7917397))
217
+
218
+
219
+ ### Dependencies
220
+
221
+ * The following workspace dependencies were updated
222
+ * dependencies
223
+ * @twin.org/trust-models bumped from 0.0.3-next.11 to 0.0.3-next.12
224
+
225
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.10...trust-generators-v0.0.3-next.11) (2026-03-04)
226
+
227
+
228
+ ### Bug Fixes
229
+
230
+ * jwt verifier return just token on creation ([9778491](https://github.com/iotaledger/twin-trust/commit/97784917c0ce53c3908e91a0db9137f8473eadeb))
231
+
232
+
233
+ ### Dependencies
234
+
235
+ * The following workspace dependencies were updated
236
+ * dependencies
237
+ * @twin.org/trust-models bumped from 0.0.3-next.10 to 0.0.3-next.11
238
+
239
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.9...trust-generators-v0.0.3-next.10) (2026-02-27)
240
+
241
+
242
+ ### Bug Fixes
243
+
244
+ * pass correct parameters to vc create ([bca9529](https://github.com/iotaledger/twin-trust/commit/bca95292605720f45f1f9dd2cec34053734b2d7f))
245
+
246
+
247
+ ### Dependencies
248
+
249
+ * The following workspace dependencies were updated
250
+ * dependencies
251
+ * @twin.org/trust-models bumped from 0.0.3-next.9 to 0.0.3-next.10
252
+
253
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.8...trust-generators-v0.0.3-next.9) (2026-02-26)
4
254
 
5
255
 
6
256
  ### Miscellaneous Chores
@@ -14,7 +264,7 @@
14
264
  * dependencies
15
265
  * @twin.org/trust-models bumped from 0.0.3-next.8 to 0.0.3-next.9
16
266
 
17
- ## [0.0.3-next.8](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.7...trust-generators-v0.0.3-next.8) (2026-01-30)
267
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.7...trust-generators-v0.0.3-next.8) (2026-01-30)
18
268
 
19
269
 
20
270
  ### Miscellaneous Chores
@@ -28,7 +278,7 @@
28
278
  * dependencies
29
279
  * @twin.org/trust-models bumped from 0.0.3-next.7 to 0.0.3-next.8
30
280
 
31
- ## [0.0.3-next.7](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.6...trust-generators-v0.0.3-next.7) (2025-12-04)
281
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.6...trust-generators-v0.0.3-next.7) (2025-12-04)
32
282
 
33
283
 
34
284
  ### Miscellaneous Chores
@@ -42,7 +292,7 @@
42
292
  * dependencies
43
293
  * @twin.org/trust-models bumped from 0.0.3-next.6 to 0.0.3-next.7
44
294
 
45
- ## [0.0.3-next.6](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.5...trust-generators-v0.0.3-next.6) (2025-12-04)
295
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.5...trust-generators-v0.0.3-next.6) (2025-12-04)
46
296
 
47
297
 
48
298
  ### Miscellaneous Chores
@@ -56,12 +306,12 @@
56
306
  * dependencies
57
307
  * @twin.org/trust-models bumped from 0.0.3-next.5 to 0.0.3-next.6
58
308
 
59
- ## [0.0.3-next.5](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.4...trust-generators-v0.0.3-next.5) (2025-12-04)
309
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.4...trust-generators-v0.0.3-next.5) (2025-12-04)
60
310
 
61
311
 
62
312
  ### Features
63
313
 
64
- * add default generator config ([54d98ba](https://github.com/twinfoundation/trust/commit/54d98ba53b7450b56337daeda504437be0d21943))
314
+ * add default generator config ([54d98ba](https://github.com/iotaledger/twin-trust/commit/54d98ba53b7450b56337daeda504437be0d21943))
65
315
 
66
316
 
67
317
  ### Dependencies
@@ -70,12 +320,12 @@
70
320
  * dependencies
71
321
  * @twin.org/trust-models bumped from 0.0.3-next.4 to 0.0.3-next.5
72
322
 
73
- ## [0.0.3-next.4](https://github.com/twinfoundation/trust/compare/trust-generators-v0.0.3-next.3...trust-generators-v0.0.3-next.4) (2025-12-04)
323
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-trust/compare/trust-generators-v0.0.3-next.3...trust-generators-v0.0.3-next.4) (2025-12-04)
74
324
 
75
325
 
76
326
  ### Features
77
327
 
78
- * add generators ([6228c88](https://github.com/twinfoundation/trust/commit/6228c88a8f0244b7bdfc76b8624c427c81d23f7b))
328
+ * add generators ([6228c88](https://github.com/iotaledger/twin-trust/commit/6228c88a8f0244b7bdfc76b8624c427c81d23f7b))
79
329
 
80
330
 
81
331
  ### Dependencies
package/docs/examples.md CHANGED
@@ -1 +1,38 @@
1
- # @twin.org/trust-generators - Examples
1
+ # Trust Generators Examples
2
+
3
+ These snippets show how to create JWT credential payloads and inspect generator metadata in a typical DID-based flow.
4
+
5
+ ## JwtVerifiableCredentialGenerator
6
+
7
+ ```typescript
8
+ import { ComponentFactory } from '@twin.org/core';
9
+ import type { IIdentityComponent } from '@twin.org/identity-models';
10
+ import { JwtVerifiableCredentialGenerator } from '@twin.org/trust-generators';
11
+
12
+ const identityComponent: IIdentityComponent = {
13
+ verifiableCredentialCreate: async () => ({
14
+ jwt: 'eyJhbGciOiJFZERTQSJ9.eyJpc3MiOiJkaWQ6ZXhhbXBsZTppc3N1ZXIifQ.signature'
15
+ })
16
+ } as IIdentityComponent;
17
+
18
+ ComponentFactory.register('identity', () => identityComponent);
19
+
20
+ const generator = new JwtVerifiableCredentialGenerator({
21
+ identityComponentType: 'identity',
22
+ config: {
23
+ verificationMethodId: 'did:example:issuer#key-1',
24
+ tokenTtlInSeconds: 900
25
+ }
26
+ });
27
+
28
+ console.log(generator.className()); // JwtVerifiableCredentialGenerator
29
+
30
+ const jwt = await generator.generate('did:example:issuer', {
31
+ subject: {
32
+ id: 'did:example:subject',
33
+ role: 'supplier'
34
+ }
35
+ });
36
+
37
+ console.log(typeof jwt); // string
38
+ ```
@@ -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
 
@@ -28,7 +28,7 @@ The options for the service.
28
28
 
29
29
  ## Properties
30
30
 
31
- ### CLASS\_NAME
31
+ ### CLASS\_NAME {#class_name}
32
32
 
33
33
  > `readonly` `static` **CLASS\_NAME**: `string`
34
34
 
@@ -36,7 +36,7 @@ Runtime name for the class.
36
36
 
37
37
  ## Methods
38
38
 
39
- ### className()
39
+ ### className() {#classname}
40
40
 
41
41
  > **className**(): `string`
42
42
 
@@ -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
 
@@ -54,19 +54,19 @@ The class name of the component.
54
54
 
55
55
  ***
56
56
 
57
- ### generate()
57
+ ### generate() {#generate}
58
58
 
59
- > **generate**(`identity`, `info?`): `Promise`\<`unknown`\>
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
 
65
- ##### identity
65
+ ##### organizationId
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,13 +76,23 @@ Information to use in the generation.
76
76
 
77
77
  `IJsonLdNodeObject`
78
78
 
79
- The subject of the verifiable credential.
79
+ The subject of the verifiable credential as a JSON-LD node object; defaults to `{ id: organizationId }` when omitted.
80
+
81
+ ##### options?
82
+
83
+ Per-call generation options.
84
+
85
+ ###### tokenTtlInSeconds
86
+
87
+ `number`
88
+
89
+ TTL override in seconds for this token only; takes precedence over the config-level value when provided.
80
90
 
81
91
  #### Returns
82
92
 
83
93
  `Promise`\<`unknown`\>
84
94
 
85
- The generated payload.
95
+ A promise that resolves to the signed JWT string.
86
96
 
87
97
  #### Implementation of
88
98
 
@@ -4,9 +4,9 @@ The options for the JWT Verifiable Credential Generator.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### tokenTtlInSeconds?
7
+ ### tokenTtlInSeconds? {#tokenttlinseconds}
8
8
 
9
- > `optional` **tokenTtlInSeconds**: `number`
9
+ > `optional` **tokenTtlInSeconds?**: `number`
10
10
 
11
11
  The time-to-live (TTL) for token in seconds.
12
12
 
@@ -18,7 +18,7 @@ The time-to-live (TTL) for token in seconds.
18
18
 
19
19
  ***
20
20
 
21
- ### verificationMethodId
21
+ ### verificationMethodId {#verificationmethodid}
22
22
 
23
23
  > **verificationMethodId**: `string`
24
24
 
@@ -4,23 +4,17 @@ The options for the JWT Verifiable Credential Generator.
4
4
 
5
5
  ## Properties
6
6
 
7
- ### loggingComponentType?
7
+ ### loggingComponentType? {#loggingcomponenttype}
8
8
 
9
- > `optional` **loggingComponentType**: `string`
9
+ > `optional` **loggingComponentType?**: `string`
10
10
 
11
11
  The logging component type.
12
12
 
13
- #### Default
14
-
15
- ```ts
16
- logging
17
- ```
18
-
19
13
  ***
20
14
 
21
- ### identityComponentType?
15
+ ### identityComponentType? {#identitycomponenttype}
22
16
 
23
- > `optional` **identityComponentType**: `string`
17
+ > `optional` **identityComponentType?**: `string`
24
18
 
25
19
  The identity component type.
26
20
 
@@ -32,7 +26,7 @@ identity
32
26
 
33
27
  ***
34
28
 
35
- ### config
29
+ ### config {#config}
36
30
 
37
31
  > **config**: [`IJwtVerifiableCredentialGeneratorConfig`](IJwtVerifiableCredentialGeneratorConfig.md)
38
32
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/trust-generators",
3
- "version": "0.0.3-next.9",
4
- "description": "Generators for trust",
3
+ "version": "0.9.0",
4
+ "description": "Implements trust credential generators that produce signed verifiable credential artefacts",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/trust.git",
7
+ "url": "git+https://github.com/iotaledger/twin-trust.git",
8
8
  "directory": "packages/trust-generators"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,13 +14,13 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/core": "next",
18
- "@twin.org/data-json-ld": "next",
19
- "@twin.org/identity-models": "next",
20
- "@twin.org/logging-models": "next",
21
- "@twin.org/nameof": "next",
22
- "@twin.org/trust-models": "0.0.3-next.9",
23
- "@twin.org/web": "next"
17
+ "@twin.org/core": "^0.9.0",
18
+ "@twin.org/data-json-ld": "^0.9.0",
19
+ "@twin.org/identity-models": "^0.9.0-next.1",
20
+ "@twin.org/logging-models": "^0.9.0",
21
+ "@twin.org/nameof": "^0.9.0",
22
+ "@twin.org/trust-models": "^0.9.0",
23
+ "@twin.org/web": "^0.9.0"
24
24
  },
25
25
  "main": "./dist/es/index.js",
26
26
  "types": "./dist/types/index.d.ts",
@@ -50,7 +50,7 @@
50
50
  "schemas"
51
51
  ],
52
52
  "bugs": {
53
- "url": "git+https://github.com/twinfoundation/trust/issues"
53
+ "url": "git+https://github.com/iotaledger/twin-trust/issues"
54
54
  },
55
55
  "homepage": "https://twindev.org"
56
56
  }