@twin.org/node-core 0.0.3-next.6 → 0.0.3-next.60

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 (206) hide show
  1. package/README.md +3 -1
  2. package/dist/es/builders/engineEnvBuilder.js +538 -213
  3. package/dist/es/builders/engineEnvBuilder.js.map +1 -1
  4. package/dist/es/builders/engineServerEnvBuilder.js +86 -39
  5. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
  6. package/dist/es/builders/extensionsBuilder.js +3 -3
  7. package/dist/es/builders/extensionsBuilder.js.map +1 -1
  8. package/dist/es/cli.js +254 -0
  9. package/dist/es/cli.js.map +1 -0
  10. package/dist/es/commands/bootstrapLegacy.js +311 -0
  11. package/dist/es/commands/bootstrapLegacy.js.map +1 -0
  12. package/dist/es/commands/help.js +86 -0
  13. package/dist/es/commands/help.js.map +1 -0
  14. package/dist/es/commands/identityCreate.js +377 -0
  15. package/dist/es/commands/identityCreate.js.map +1 -0
  16. package/dist/es/commands/identityImports.js +83 -0
  17. package/dist/es/commands/identityImports.js.map +1 -0
  18. package/dist/es/commands/identityVerifiableCredentialCreate.js +146 -0
  19. package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
  20. package/dist/es/commands/identityVerificationMethodCreate.js +230 -0
  21. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
  22. package/dist/es/commands/identityVerificationMethodImport.js +127 -0
  23. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
  24. package/dist/es/commands/nodeSetIdentity.js +69 -0
  25. package/dist/es/commands/nodeSetIdentity.js.map +1 -0
  26. package/dist/es/commands/removeTenantOrgAlias.js +83 -0
  27. package/dist/es/commands/removeTenantOrgAlias.js.map +1 -0
  28. package/dist/es/commands/setNodeOrgId.js +62 -0
  29. package/dist/es/commands/setNodeOrgId.js.map +1 -0
  30. package/dist/es/commands/setTenantOrgId.js +99 -0
  31. package/dist/es/commands/setTenantOrgId.js.map +1 -0
  32. package/dist/es/commands/tenantCreate.js +165 -0
  33. package/dist/es/commands/tenantCreate.js.map +1 -0
  34. package/dist/es/commands/tenantImport.js +108 -0
  35. package/dist/es/commands/tenantImport.js.map +1 -0
  36. package/dist/es/commands/tenantUpdate.js +108 -0
  37. package/dist/es/commands/tenantUpdate.js.map +1 -0
  38. package/dist/es/commands/userCreate.js +239 -0
  39. package/dist/es/commands/userCreate.js.map +1 -0
  40. package/dist/es/commands/userUpdate.js +154 -0
  41. package/dist/es/commands/userUpdate.js.map +1 -0
  42. package/dist/es/commands/vaultKeyCreate.js +191 -0
  43. package/dist/es/commands/vaultKeyCreate.js.map +1 -0
  44. package/dist/es/commands/vaultKeyImport.js +105 -0
  45. package/dist/es/commands/vaultKeyImport.js.map +1 -0
  46. package/dist/es/defaults.js +37 -2
  47. package/dist/es/defaults.js.map +1 -1
  48. package/dist/es/index.js +11 -4
  49. package/dist/es/index.js.map +1 -1
  50. package/dist/es/models/ICliArgs.js +4 -0
  51. package/dist/es/models/ICliArgs.js.map +1 -0
  52. package/dist/es/models/ICliCommand.js +2 -0
  53. package/dist/es/models/ICliCommand.js.map +1 -0
  54. package/dist/es/models/ICliCommandDefinition.js +2 -0
  55. package/dist/es/models/ICliCommandDefinition.js.map +1 -0
  56. package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
  57. package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
  58. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  59. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
  60. package/dist/es/models/INodeEngineState.js.map +1 -1
  61. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
  62. package/dist/es/models/INodeOptions.js.map +1 -1
  63. package/dist/es/models/cliCommandParamType.js +4 -0
  64. package/dist/es/models/cliCommandParamType.js.map +1 -0
  65. package/dist/es/models/nodeExtensionInitialiseEngineMethod.js +2 -0
  66. package/dist/es/models/nodeExtensionInitialiseEngineMethod.js.map +1 -0
  67. package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js +2 -0
  68. package/dist/es/models/nodeExtensionInitialiseEngineServerMethod.js.map +1 -0
  69. package/dist/es/models/nodeExtensionInitialiseMethod.js +2 -0
  70. package/dist/es/models/nodeExtensionInitialiseMethod.js.map +1 -0
  71. package/dist/es/models/nodeExtensionShutdownMethod.js +4 -0
  72. package/dist/es/models/nodeExtensionShutdownMethod.js.map +1 -0
  73. package/dist/es/node.js +87 -40
  74. package/dist/es/node.js.map +1 -1
  75. package/dist/es/start.js +189 -0
  76. package/dist/es/start.js.map +1 -0
  77. package/dist/es/utils.js +24 -27
  78. package/dist/es/utils.js.map +1 -1
  79. package/dist/types/builders/engineEnvBuilder.d.ts +60 -5
  80. package/dist/types/builders/engineServerEnvBuilder.d.ts +11 -2
  81. package/dist/types/builders/extensionsBuilder.d.ts +3 -3
  82. package/dist/types/cli.d.ts +56 -0
  83. package/dist/types/commands/bootstrapLegacy.d.ts +67 -0
  84. package/dist/types/commands/help.d.ts +24 -0
  85. package/dist/types/commands/identityCreate.d.ts +45 -0
  86. package/dist/types/commands/identityImports.d.ts +25 -0
  87. package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
  88. package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
  89. package/dist/types/commands/identityVerificationMethodImport.d.ts +32 -0
  90. package/dist/types/commands/nodeSetIdentity.d.ts +23 -0
  91. package/dist/types/commands/removeTenantOrgAlias.d.ts +24 -0
  92. package/dist/types/commands/setNodeOrgId.d.ts +24 -0
  93. package/dist/types/commands/setTenantOrgId.d.ts +38 -0
  94. package/dist/types/commands/tenantCreate.d.ts +41 -0
  95. package/dist/types/commands/tenantImport.d.ts +29 -0
  96. package/dist/types/commands/tenantUpdate.d.ts +29 -0
  97. package/dist/types/commands/userCreate.d.ts +51 -0
  98. package/dist/types/commands/userUpdate.d.ts +40 -0
  99. package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
  100. package/dist/types/commands/vaultKeyImport.d.ts +29 -0
  101. package/dist/types/defaults.d.ts +30 -2
  102. package/dist/types/index.d.ts +11 -4
  103. package/dist/types/models/ICliArgs.d.ts +20 -0
  104. package/dist/types/models/ICliCommand.d.ts +17 -0
  105. package/dist/types/models/ICliCommandDefinition.d.ts +46 -0
  106. package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
  107. package/dist/types/models/IEngineEnvironmentVariables.d.ts +168 -95
  108. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +8 -0
  109. package/dist/types/models/INodeEngineState.d.ts +2 -9
  110. package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
  111. package/dist/types/models/INodeOptions.d.ts +6 -2
  112. package/dist/types/models/cliCommandParamType.d.ts +4 -0
  113. package/dist/types/models/nodeExtensionInitialiseEngineMethod.d.ts +8 -0
  114. package/dist/types/models/nodeExtensionInitialiseEngineServerMethod.d.ts +9 -0
  115. package/dist/types/models/nodeExtensionInitialiseMethod.d.ts +9 -0
  116. package/dist/types/models/nodeExtensionShutdownMethod.d.ts +6 -0
  117. package/dist/types/node.d.ts +5 -4
  118. package/dist/types/{server.d.ts → start.d.ts} +4 -2
  119. package/dist/types/utils.d.ts +9 -10
  120. package/docs/changelog.md +675 -180
  121. package/docs/examples.md +99 -1
  122. package/docs/reference/functions/buildConfiguration.md +1 -1
  123. package/docs/reference/functions/buildEngineConfiguration.md +1 -7
  124. package/docs/reference/functions/buildEngineServerConfiguration.md +1 -1
  125. package/docs/reference/functions/constructCliCommand.md +27 -0
  126. package/docs/reference/functions/executeCommand.md +29 -0
  127. package/docs/reference/functions/extensionsInitialiseEngine.md +1 -1
  128. package/docs/reference/functions/extensionsInitialiseEngineServer.md +1 -1
  129. package/docs/reference/functions/getEnvDefaults.md +19 -0
  130. package/docs/reference/functions/getScriptDirectory.md +19 -0
  131. package/docs/reference/functions/initialiseLocales.md +2 -0
  132. package/docs/reference/functions/isAuthEntityStorageRequired.md +20 -0
  133. package/docs/reference/functions/isAutomationRequired.md +20 -0
  134. package/docs/reference/functions/isBackgroundTasksRequired.md +20 -0
  135. package/docs/reference/functions/isFederatedCatalogueRequired.md +20 -0
  136. package/docs/reference/functions/isImmutableProofRequired.md +20 -0
  137. package/docs/reference/functions/isRightsManagementRequired.md +23 -0
  138. package/docs/reference/functions/isTaskSchedulerRequired.md +20 -0
  139. package/docs/reference/functions/isTelemetryRequired.md +20 -0
  140. package/docs/reference/functions/isTrustRequired.md +20 -0
  141. package/docs/reference/functions/loadJsonFile.md +1 -1
  142. package/docs/reference/functions/loadTextFile.md +1 -1
  143. package/docs/reference/functions/parseCommandLineArgs.md +19 -0
  144. package/docs/reference/functions/processEnvOptions.md +27 -0
  145. package/docs/reference/functions/registerCommands.md +9 -0
  146. package/docs/reference/functions/resolvePackageEntryPoint.md +2 -2
  147. package/docs/reference/functions/run.md +8 -2
  148. package/docs/reference/functions/shutdownExtensions.md +1 -1
  149. package/docs/reference/functions/start.md +9 -3
  150. package/docs/reference/functions/substituteEnvOptions.md +25 -0
  151. package/docs/reference/index.md +24 -14
  152. package/docs/reference/interfaces/ICacheMetadata.md +3 -3
  153. package/docs/reference/interfaces/ICliArgs.md +35 -0
  154. package/docs/reference/interfaces/ICliCommand.md +23 -0
  155. package/docs/reference/interfaces/ICliCommandDefinition.md +101 -0
  156. package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
  157. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +488 -359
  158. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +652 -431
  159. package/docs/reference/interfaces/IModuleProtocol.md +3 -3
  160. package/docs/reference/interfaces/INodeEngineState.md +6 -21
  161. package/docs/reference/interfaces/INodeEnvironmentVariables.md +661 -516
  162. package/docs/reference/interfaces/INodeOptions.md +44 -36
  163. package/docs/reference/interfaces/IProtocolHandlerResult.md +2 -2
  164. package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
  165. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +3 -1
  166. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +3 -1
  167. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +3 -1
  168. package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +3 -1
  169. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +2 -0
  170. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +2 -0
  171. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +2 -0
  172. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +2 -0
  173. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +2 -0
  174. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +2 -0
  175. package/docs/reference/variables/ModuleProtocol.md +5 -5
  176. package/docs/reference/variables/TRUST_VERIFICATION_METHOD_ID.md +5 -0
  177. package/locales/en.json +674 -30
  178. package/package.json +10 -6
  179. package/dist/es/bootstrap.js +0 -366
  180. package/dist/es/bootstrap.js.map +0 -1
  181. package/dist/es/identity.js +0 -182
  182. package/dist/es/identity.js.map +0 -1
  183. package/dist/es/models/nodeExtensionMethods.js +0 -2
  184. package/dist/es/models/nodeExtensionMethods.js.map +0 -1
  185. package/dist/es/models/nodeFeatures.js +0 -21
  186. package/dist/es/models/nodeFeatures.js.map +0 -1
  187. package/dist/es/server.js +0 -81
  188. package/dist/es/server.js.map +0 -1
  189. package/dist/types/bootstrap.d.ts +0 -68
  190. package/dist/types/identity.d.ts +0 -14
  191. package/dist/types/models/nodeExtensionMethods.d.ts +0 -27
  192. package/dist/types/models/nodeFeatures.d.ts +0 -21
  193. package/docs/detailed-guide.md +0 -129
  194. package/docs/reference/functions/bootstrap.md +0 -29
  195. package/docs/reference/functions/bootstrapAuth.md +0 -35
  196. package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
  197. package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
  198. package/docs/reference/functions/bootstrapNodeAdminUser.md +0 -35
  199. package/docs/reference/functions/bootstrapNodeId.md +0 -35
  200. package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
  201. package/docs/reference/functions/bootstrapTenantId.md +0 -35
  202. package/docs/reference/functions/getFeatures.md +0 -19
  203. package/docs/reference/type-aliases/NodeFeatures.md +0 -5
  204. package/docs/reference/variables/NodeFeatures.md +0 -25
  205. package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +0 -3
  206. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +0 -3
@@ -0,0 +1,29 @@
1
+ import type { IEngineCore } from "@twin.org/engine-models";
2
+ import type { ICliCommandDefinition } from "../models/ICliCommandDefinition.js";
3
+ import type { INodeEngineConfig } from "../models/INodeEngineConfig.js";
4
+ import type { INodeEngineState } from "../models/INodeEngineState.js";
5
+ import type { INodeEnvironmentVariables } from "../models/INodeEnvironmentVariables.js";
6
+ /**
7
+ * Get the command definition parameters.
8
+ * @param commandDefinitions The registered command definitions.
9
+ */
10
+ export declare function getCommandDefinitionVaultKeyImport(commandDefinitions: {
11
+ [id: string]: ICliCommandDefinition;
12
+ }): void;
13
+ /**
14
+ * Command for importing a vault key.
15
+ * @param engineCore The engine core.
16
+ * @param envVars The environment variables for the node.
17
+ * @param params The parameters for the command.
18
+ * @param params.identity The DID to import the vault key for.
19
+ * @param params.keyId The ID of the key to import.
20
+ * @param params.keyType The type of key to import.
21
+ * @param params.privateKeyHex The private key in hexadecimal format.
22
+ * @returns A promise that resolves when the key has been imported into the vault.
23
+ */
24
+ export declare function vaultKeyImport(engineCore: IEngineCore<INodeEngineConfig, INodeEngineState>, envVars: INodeEnvironmentVariables, params: {
25
+ identity?: string;
26
+ keyType?: string;
27
+ keyId?: string;
28
+ privateKeyHex?: string;
29
+ }): Promise<void>;
@@ -1,8 +1,36 @@
1
+ /**
2
+ * Default verification method fragment ID for attestation.
3
+ */
1
4
  export declare const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion";
5
+ /**
6
+ * Default verification method fragment ID for immutable proofs.
7
+ */
2
8
  export declare const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
9
+ /**
10
+ * Default vault key ID for blob storage encryption.
11
+ */
3
12
  export declare const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
4
- export declare const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID = "synchronised-storage-blob-encryption";
5
- export declare const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "node-authentication-assertion";
13
+ /**
14
+ * Default verification method fragment ID for trust assertions.
15
+ */
16
+ export declare const TRUST_VERIFICATION_METHOD_ID = "trust-assertion";
17
+ /**
18
+ * Default vault key ID used for signing authentication tokens.
19
+ */
6
20
  export declare const AUTH_SIGNING_KEY_ID = "auth-signing";
21
+ /**
22
+ * Feature tag identifying the DID context ID handler.
23
+ */
7
24
  export declare const CONTEXT_ID_HANDLER_FEATURE_DID = "did";
25
+ /**
26
+ * Feature tag identifying the tenant context ID handler.
27
+ */
8
28
  export declare const CONTEXT_ID_HANDLER_FEATURE_TENANT = "tenant";
29
+ /**
30
+ * Get the default environment variables for the node.
31
+ * @param envPrefix The environment variable prefix.
32
+ * @returns The default environment variables.
33
+ */
34
+ export declare function getEnvDefaults(envPrefix: string): {
35
+ [key: string]: string;
36
+ };
@@ -1,9 +1,14 @@
1
- export * from "./bootstrap.js";
2
1
  export * from "./builders/engineEnvBuilder.js";
3
2
  export * from "./builders/engineServerEnvBuilder.js";
4
3
  export * from "./builders/extensionsBuilder.js";
4
+ export * from "./cli.js";
5
5
  export * from "./defaults.js";
6
+ export * from "./models/cliCommandParamType.js";
6
7
  export * from "./models/ICacheMetadata.js";
8
+ export * from "./models/ICliArgs.js";
9
+ export * from "./models/ICliCommand.js";
10
+ export * from "./models/ICliCommandDefinition.js";
11
+ export * from "./models/ICliCommandDefinitionParam.js";
7
12
  export * from "./models/IEngineEnvironmentVariables.js";
8
13
  export * from "./models/IEngineServerEnvironmentVariables.js";
9
14
  export * from "./models/IModuleProtocol.js";
@@ -13,8 +18,10 @@ export * from "./models/INodeEnvironmentVariables.js";
13
18
  export * from "./models/INodeOptions.js";
14
19
  export * from "./models/IProtocolHandlerResult.js";
15
20
  export * from "./models/moduleProtocol.js";
16
- export * from "./models/nodeExtensionMethods.js";
17
- export * from "./models/nodeFeatures.js";
21
+ export * from "./models/nodeExtensionInitialiseEngineMethod.js";
22
+ export * from "./models/nodeExtensionInitialiseEngineServerMethod.js";
23
+ export * from "./models/nodeExtensionInitialiseMethod.js";
24
+ export * from "./models/nodeExtensionShutdownMethod.js";
18
25
  export * from "./node.js";
19
- export * from "./server.js";
26
+ export * from "./start.js";
20
27
  export * from "./utils.js";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Parsed command line arguments passed to the CLI.
3
+ */
4
+ export interface ICliArgs {
5
+ /**
6
+ * The path of the node executable.
7
+ */
8
+ nodePath?: string;
9
+ /**
10
+ * The path of the script to execute.
11
+ */
12
+ scriptPath?: string;
13
+ /**
14
+ * The command line options.
15
+ */
16
+ options?: {
17
+ key: string;
18
+ value: string;
19
+ }[];
20
+ }
@@ -0,0 +1,17 @@
1
+ import type { CliCommandParamType } from "./cliCommandParamType.js";
2
+ import type { ICliCommandDefinition } from "./ICliCommandDefinition.js";
3
+ /**
4
+ * A resolved CLI command ready for execution, pairing a definition with its populated parameters.
5
+ */
6
+ export interface ICliCommand {
7
+ /**
8
+ * The command to execute.
9
+ */
10
+ definition: ICliCommandDefinition;
11
+ /**
12
+ * The params to execute the command with.
13
+ */
14
+ params: {
15
+ [id: string]: CliCommandParamType;
16
+ };
17
+ }
@@ -0,0 +1,46 @@
1
+ import type { IEngineCore } from "@twin.org/engine-models";
2
+ import type { CliCommandParamType } from "./cliCommandParamType.js";
3
+ import type { ICliCommandDefinitionParam } from "./ICliCommandDefinitionParam.js";
4
+ import type { INodeEnvironmentVariables } from "./INodeEnvironmentVariables.js";
5
+ /**
6
+ * Static definition of a CLI command including its name, parameters, and execution action.
7
+ */
8
+ export interface ICliCommandDefinition {
9
+ /**
10
+ * The command name.
11
+ */
12
+ command: string;
13
+ /**
14
+ * The command description.
15
+ */
16
+ description: string;
17
+ /**
18
+ * An example invocation string shown in help output.
19
+ */
20
+ example: string;
21
+ /**
22
+ * The params available for the command.
23
+ */
24
+ params: ICliCommandDefinitionParam[];
25
+ /**
26
+ * The method to execute for the command.
27
+ */
28
+ action: (engineCore: IEngineCore, envVars: INodeEnvironmentVariables, params: {
29
+ [id: string]: CliCommandParamType;
30
+ }) => Promise<unknown>;
31
+ /**
32
+ * Indicates whether the engine needs to be started before executing the command.
33
+ * @default true
34
+ */
35
+ requiresEngineStarted?: boolean;
36
+ /**
37
+ * Indicates whether the engine needs the node identity to be set if configured to use.
38
+ * @default true
39
+ */
40
+ requiresNodeIdentity?: boolean;
41
+ /**
42
+ * Indicates whether the engine needs the organization identity to be set.
43
+ * @default true
44
+ */
45
+ requiresOrgIdentity?: boolean;
46
+ }
@@ -0,0 +1,35 @@
1
+ import type { CliCommandParamType } from "./cliCommandParamType.js";
2
+ /**
3
+ * Definition of a single parameter accepted by a CLI command.
4
+ */
5
+ export interface ICliCommandDefinitionParam {
6
+ /**
7
+ * The param key.
8
+ */
9
+ key: string;
10
+ /**
11
+ * The param type.
12
+ */
13
+ type: "string" | "number" | "boolean";
14
+ /**
15
+ * Possible options for the param.
16
+ */
17
+ options?: string[];
18
+ /**
19
+ * The extended type e.g. hex etc.
20
+ */
21
+ extendedType?: string;
22
+ /**
23
+ * Whether the param is required.
24
+ * @default true
25
+ */
26
+ required?: boolean;
27
+ /**
28
+ * The default value of the param.
29
+ */
30
+ defaultValue?: CliCommandParamType;
31
+ /**
32
+ * The param description.
33
+ */
34
+ description: string;
35
+ }
@@ -6,6 +6,10 @@ export interface IEngineEnvironmentVariables {
6
6
  * Start the engine in debug mode.
7
7
  */
8
8
  debug?: string;
9
+ /**
10
+ * Start the engine in silent mode.
11
+ */
12
+ silent?: string;
9
13
  /**
10
14
  * The root directory for storing items like state file.
11
15
  */
@@ -18,14 +22,6 @@ export interface IEngineEnvironmentVariables {
18
22
  * Is multi-tenant support enabled, defaults to false.
19
23
  */
20
24
  tenantEnabled?: string;
21
- /**
22
- * A tenant id to use as a default for the node.
23
- */
24
- tenantId?: string;
25
- /**
26
- * A tenant api key to use as a default for the node.
27
- */
28
- tenantApiKey?: string;
29
25
  /**
30
26
  * The type of the entity storage to create, comma separate for more than one connector.
31
27
  * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql
@@ -94,7 +90,7 @@ export interface IEngineEnvironmentVariables {
94
90
  /**
95
91
  * GCP Firestore endpoint.
96
92
  */
97
- gcpFirestoreApiEndpoint?: string;
93
+ gcpFirestoreEndpoint?: string;
98
94
  /**
99
95
  * GCP Firestore project id.
100
96
  */
@@ -192,10 +188,6 @@ export interface IEngineEnvironmentVariables {
192
188
  * The default blob storage connector to use, defaults to the first one in the list.
193
189
  */
194
190
  blobStorageConnectorDefault?: string;
195
- /**
196
- * Blog storage connector which has public access.
197
- */
198
- blobStorageConnectorPublic?: string;
199
191
  /**
200
192
  * Enable encryption for the blob storage.
201
193
  */
@@ -204,11 +196,6 @@ export interface IEngineEnvironmentVariables {
204
196
  * The id of the encryption key for the blob storage.
205
197
  */
206
198
  blobStorageEncryptionKeyId?: string;
207
- /**
208
- * A symmetric encryption key for the blob storage, should be ChaCha20Poly1305 in base64 format.
209
- * If encryption is enabled but a key is not provided one will be generated.
210
- */
211
- blobStorageSymmetricEncryptionKey?: string;
212
199
  /**
213
200
  * A prefix for all the blobs in blob-storage, can be empty.
214
201
  */
@@ -273,6 +260,10 @@ export interface IEngineEnvironmentVariables {
273
260
  * The type of the default vault connector: entity-storage, hashicorp.
274
261
  */
275
262
  vaultConnector?: string;
263
+ /**
264
+ * Prefix to prepend to entries in the vault.
265
+ */
266
+ vaultPrefix?: string;
276
267
  /**
277
268
  * Hashicorp Vault token.
278
269
  */
@@ -285,6 +276,18 @@ export interface IEngineEnvironmentVariables {
285
276
  * The type of logging task connector, can be a comma separated list: console, entity-storage.
286
277
  */
287
278
  loggingConnector?: string;
279
+ /**
280
+ * The batch size for the logging task, set to 1 for no batching.
281
+ */
282
+ loggingBatchSize?: string;
283
+ /**
284
+ * The batch flush interval in seconds for the logging task, how often to flush the logs when using batching, defaults to 5 seconds.
285
+ */
286
+ loggingBatchFlushIntervalSeconds?: string;
287
+ /**
288
+ * A list of components to exclude from logging, can be a comma separated list of component Class names e.g. "ComponentA,ComponentB".
289
+ */
290
+ loggingSilentComponents?: string;
288
291
  /**
289
292
  * The type of event bus connector: local.
290
293
  */
@@ -318,7 +321,7 @@ export interface IEngineEnvironmentVariables {
318
321
  */
319
322
  awsSesEndpoint?: string;
320
323
  /**
321
- * The applications for the push notifications JSON stringified array of IAwsApplicationSettings.
324
+ * The applications for the push notifications reference a separate json with @json: prefix.
322
325
  */
323
326
  awsMessagingPushNotificationApplications?: string;
324
327
  /**
@@ -337,6 +340,34 @@ export interface IEngineEnvironmentVariables {
337
340
  * The type of telemetry connector: entity-storage.
338
341
  */
339
342
  telemetryConnector?: string;
343
+ /**
344
+ * The name of the Open Telemetry meter to use, only required if using open-telemetry as telemetry connector, defaults to twin-node.
345
+ */
346
+ openTelemetryMeterName?: string;
347
+ /**
348
+ * The version of the Open Telemetry metrics specification to use, only required if using open-telemetry as telemetry connector, defaults to 1.0.0.
349
+ */
350
+ openTelemetryMeterVersion?: string;
351
+ /**
352
+ * The type of Open Telemetry metric reader to use, only required if using open-telemetry as telemetry connector, values: prometheus.
353
+ */
354
+ openTelemetryReader?: string;
355
+ /**
356
+ * The port to use for the Open Telemetry Prometheus metrics server, only required if using open-telemetry as telemetry connector and prometheus as reader, defaults to 9464.
357
+ */
358
+ openTelemetryPrometheusPort?: string;
359
+ /**
360
+ * Polling interval in seconds for the telemetry metrics collector. Defaults to 60.
361
+ */
362
+ telemetryMetricsCollectorIntervalSeconds?: string;
363
+ /**
364
+ * The type of telemetry metrics producers, can be a comma separated list: system, process.
365
+ */
366
+ telemetryMetricsProducers?: string;
367
+ /**
368
+ * Maximum number of values retained per telemetry metric (count-based history cap). Defaults to 1440.
369
+ */
370
+ telemetryMetricsProducerMaxHistory?: string;
340
371
  /**
341
372
  * The type of faucet connector: entity-storage, iota.
342
373
  */
@@ -349,18 +380,26 @@ export interface IEngineEnvironmentVariables {
349
380
  * The type of NFT connector: entity-storage, iota.
350
381
  */
351
382
  nftConnector?: string;
383
+ /**
384
+ * The NFT deployed package id, for custom deployments.
385
+ */
386
+ nftPackageId?: string;
387
+ /**
388
+ * The type of notarization connector: entity-storage, iota.
389
+ */
390
+ notarizationConnector?: string;
352
391
  /**
353
392
  * The type of identity connector: entity-storage, iota.
354
393
  */
355
394
  identityConnector?: string;
356
395
  /**
357
- * The type of identity resolver connector: entity-storage, iota.
396
+ * The index of the wallet address to use, defaults to 0.
358
397
  */
359
- identityResolverConnector?: string;
398
+ identityWalletAddressIndex?: string;
360
399
  /**
361
- * The type of verifiable storage connector: entity-storage, iota.
400
+ * The type of identity resolver connector: entity-storage, iota.
362
401
  */
363
- verifiableStorageConnector?: string;
402
+ identityResolverConnector?: string;
364
403
  /**
365
404
  * IOTA Faucet Endpoint.
366
405
  */
@@ -389,6 +428,10 @@ export interface IEngineEnvironmentVariables {
389
428
  * IOTA Gas Station Authentication Token.
390
429
  */
391
430
  iotaGasStationAuthToken?: string;
431
+ /**
432
+ * The IOTA Identity deployed package id, for custom deployments.
433
+ */
434
+ iotaIdentityPackageId?: string;
392
435
  /**
393
436
  * Universal Resolver Endpoint.
394
437
  */
@@ -421,6 +464,10 @@ export interface IEngineEnvironmentVariables {
421
464
  * The type of the default data extractor, can be a comma separated list: json-path.
422
465
  */
423
466
  dataExtractorConnectors?: string;
467
+ /**
468
+ * Enable the task scheduler regardless of which other components are active, defaults to false.
469
+ */
470
+ taskSchedulerEnabled?: string;
424
471
  /**
425
472
  * Is the auditable item graph enabled, defaults to false.
426
473
  */
@@ -434,131 +481,157 @@ export interface IEngineEnvironmentVariables {
434
481
  */
435
482
  documentManagementEnabled?: string;
436
483
  /**
437
- * Is the synchronised storage enabled, defaults to false.
484
+ * Enable the federated catalogue, defaults to false, automatically enabled if remote endpoint, filters or dataspace is enabled.
438
485
  */
439
- synchronisedStorageEnabled?: string;
486
+ federatedCatalogueEnabled?: string;
440
487
  /**
441
- * Url which points to the api for a trusted synchronised storage node, not required if this is a trusted node.
488
+ * Federated catalog filters, command separated list of filters to add.
442
489
  */
443
- synchronisedStorageTrustedUrl?: string;
490
+ federatedCatalogueFilters?: string;
444
491
  /**
445
- * The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.
446
- * This only required if using a custom verifiable storage item, otherwise it will default to the network name.
492
+ * Federated catalog remote endpoint, if set will use a REST client instead of local service.
447
493
  */
448
- synchronisedStorageVerifiableStorageKeyId?: string;
494
+ federatedCatalogueRemoteEndpoint?: string;
449
495
  /**
450
- * The key from the vault which is used to encrypt the synchronised storage blobs.
451
- * Only required for trusted nodes, as regular nodes will request from the trusted nodes.
452
- * Defaults to synchronised-storage-blob-encryption
496
+ * The trust generators to add to the factory, comma separated list.
453
497
  */
454
- synchronisedStorageBlobStorageEncryptionKeyId?: string;
498
+ trustGenerators?: string;
455
499
  /**
456
- * The key used for blob encryption, should be ChaCha20Poly1305 encoded as base64.
457
- * Only required for trusted nodes, as regular nodes will not write encrypted data.
500
+ * The trust verifiers to add to the factory, comma separated list.
458
501
  */
459
- synchronisedStorageBlobStorageKey?: string;
502
+ trustVerifiers?: string;
460
503
  /**
461
- * How often to check for entity updates in minutes.
462
- * @default 5
504
+ * The verification method to use for trust identities.
505
+ * Defaults to trust-assertion.
463
506
  */
464
- synchronisedStorageEntityUpdateIntervalMinutes?: string;
507
+ trustVerificationMethodId?: string;
465
508
  /**
466
- * Interval to perform consolidation of changesets, only used if this is a trusted node.
467
- * @default 60
509
+ * The trust time to live for generating JWTs.
510
+ * Defaults to undefined for never expiring.
468
511
  */
469
- synchronisedStorageConsolidationIntervalMinutes?: string;
512
+ trustJwtTtlSeconds?: string;
470
513
  /**
471
- * The number of entities to process in a single consolidation batch, only used if this is a trusted node.
472
- * @default 1000
514
+ * The allow lists for the trust identity verifier, comma separated list of identities.
473
515
  */
474
- synchronisedStorageConsolidationBatchSize?: string;
516
+ trustIdentitiesAllow?: string;
475
517
  /**
476
- * The maximum number of consolidations to keep in storage, only used if this is a trusted node.
477
- * @default 5
518
+ * The deny lists for the trust identity verifier, comma separated list of identities.
478
519
  */
479
- synchronisedStorageMaxConsolidations?: string;
520
+ trustIdentitiesDeny?: string;
480
521
  /**
481
- * Is the federated catalogue enabled, defaults to false.
522
+ * Path under which the rights management service is mounted (single source
523
+ * of truth). The same value drives:
524
+ * - the server route mount (via engine config)
525
+ * - the PNP service's callback URL builder (`buildCallbackUrl`)
526
+ * - the PNP rest-client's pathPrefix (consumer side)
527
+ * Defaults to `rights-management`. Set when deploying behind a reverse proxy
528
+ * with path rewriting, K8s ingress with path-based routing, or any custom
529
+ * mount point.
482
530
  */
483
- federatedCatalogueEnabled?: string;
531
+ rightsManagementCallbackPath?: string;
484
532
  /**
485
- * Federated catalog filters, command separated list of filters to add.
533
+ * The rights management policy information sources to add to the factory.
486
534
  */
487
- federatedCatalogueFilters?: string;
535
+ rightsManagementPolicyInformationSources?: string;
488
536
  /**
489
- * Is the rights management enabled, defaults to false.
537
+ * The rights management policy negotiators sources to add to the factory.
490
538
  */
491
- rightsManagementEnabled?: string;
539
+ rightsManagementPolicyNegotiators?: string;
492
540
  /**
493
- * What is the base callback url for rights management negotiations e.g. https://my-node/rights-management.
541
+ * The rights management policy requesters to add to the factory.
494
542
  */
495
- rightsManagementBaseCallbackUrl?: string;
543
+ rightsManagementPolicyRequesters?: string;
496
544
  /**
497
- * The rights management configuration which includes the information sources modules to load.
498
- * Use the @json: prefix to specify the path to the JSON configuration file.
545
+ * The rights management policy execution actions to add to the factory.
499
546
  */
500
- rightsManagementInformationSources?: string;
547
+ rightsManagementPolicyExecutionActions?: string;
501
548
  /**
502
- * The rights management configuration which includes the negotiator modules to load.
503
- * Use the @json: prefix to specify the path to the JSON configuration file.
549
+ * The rights management policy enforcement processors to add to the factory.
504
550
  */
505
- rightsManagementNegotiators?: string;
551
+ rightsManagementPolicyEnforcementProcessors?: string;
506
552
  /**
507
- * The rights management configuration which includes the requester modules to load.
508
- * Use the @json: prefix to specify the path to the JSON configuration file.
553
+ * The rights management policy arbiters to add to the factory.
509
554
  */
510
- rightsManagementRequesters?: string;
555
+ rightsManagementPolicyArbiters?: string;
511
556
  /**
512
- * The rights management configuration which includes the execution actions modules to load.
513
- * Use the @json: prefix to specify the path to the JSON configuration file.
557
+ * The rights management policy obligation enforcers to add to the factory.
514
558
  */
515
- rightsManagementExecutionActions?: string;
559
+ rightsManagementPolicyObligationEnforcers?: string;
516
560
  /**
517
- * The rights management configuration which includes the enforcement processor modules to load.
518
- * Use the @json: prefix to specify the path to the JSON configuration file.
561
+ * Is the dataspace enabled, defaults to false.
519
562
  */
520
- rightsManagementEnforcementProcessors?: string;
563
+ dataspaceEnabled?: string;
521
564
  /**
522
- * The rights management configuration which includes the arbiter modules to load.
523
- * Use the @json: prefix to specify the path to the JSON configuration file.
565
+ * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
566
+ * @default 10
524
567
  */
525
- rightsManagementArbiters?: string;
568
+ dataspaceRetainActivityLogsFor?: string;
526
569
  /**
527
- * The rights management configuration which includes the offer modules to load.
528
- * Use the @json: prefix to specify the path to the JSON configuration file.
570
+ * The interval for cleaning up the activity logs.
571
+ * @default 60
529
572
  */
530
- rightsManagementOffers?: string;
573
+ dataspaceActivityLogsCleanupInterval?: string;
531
574
  /**
532
- * Are background tasks enabled, defaults to false.
575
+ * The data plane path for PULL transfers (path only, not full URL).
576
+ * Will be combined with public origin.
577
+ * Required if PULL transfers should be supported.
578
+ * Example: "dataspace/entities"
533
579
  */
534
- backgroundTasksEnabled?: string;
580
+ dataspaceDataPlanePath?: string;
535
581
  /**
536
- * Is the task scheduler enabled, defaults to false.
582
+ * Are the health components enabled, defaults to false.
537
583
  */
538
- taskSchedulerEnabled?: string;
584
+ healthEnabled?: string;
539
585
  /**
540
- * Is the data space connector enabled, defaults to false.
586
+ * The interval in seconds for performing health checks, defaults to 60.
541
587
  */
542
- dataSpaceConnectorEnabled?: string;
588
+ healthIntervalSeconds?: string;
543
589
  /**
544
- * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.
545
- * @default 10
590
+ * The interval in seconds for performing health checks at startup, defaults to 2.
591
+ * This allows components that take a long time to initialize to be healthy before the first health check is performed.
546
592
  */
547
- dataSpaceConnectorRetainActivityLogsFor?: string;
593
+ healthStartupIntervalSeconds?: string;
548
594
  /**
549
- * The interval for cleaning up the activity logs.
550
- * @default 60
595
+ * The type of the automation action to create, comma separate for more than one connector.
596
+ * values: fetch
597
+ */
598
+ automationActionTypes?: string;
599
+ /**
600
+ * The default mutex timeout in milliseconds, used when no component-specific timeout is set, defaults to 5000.
601
+ */
602
+ mutexTimeoutMsDefault?: string;
603
+ /**
604
+ * The mutex timeout in milliseconds for the auditable item graph component.
605
+ */
606
+ auditableItemGraphMutexTimeoutMs?: string;
607
+ /**
608
+ * The mutex timeout in milliseconds for the auditable item stream component.
609
+ */
610
+ auditableItemStreamMutexTimeoutMs?: string;
611
+ /**
612
+ * The mutex timeout in milliseconds for the federated catalogue component.
613
+ */
614
+ federatedCatalogueMutexTimeoutMs?: string;
615
+ /**
616
+ * The mutex timeout in milliseconds for the document management component.
617
+ */
618
+ documentManagementMutexTimeoutMs?: string;
619
+ /**
620
+ * The mutex timeout in milliseconds for the logging component.
621
+ */
622
+ loggingMutexTimeoutMs?: string;
623
+ /**
624
+ * The mutex timeout in milliseconds for the memory entity storage connector.
551
625
  */
552
- dataSpaceConnectorActivityLogsCleanUpInterval?: string;
626
+ entityStorageMemoryMutexTimeoutMs?: string;
553
627
  /**
554
- * Enable verifiable credential authentication for the API.
628
+ * The mutex timeout in milliseconds for the file entity storage connector.
555
629
  */
556
- vcAuthenticationEnabled?: string;
630
+ entityStorageFileMutexTimeoutMs?: string;
557
631
  /**
558
- * Verifiable credential assertion for node to node communication.
559
- * Defaults to node-authentication-assertion.
632
+ * The mutex timeout in milliseconds for the rights management component.
560
633
  */
561
- vcAuthenticationVerificationMethodId?: string;
634
+ rightsManagementMutexTimeoutMs?: string;
562
635
  /**
563
636
  * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.
564
637
  */
@@ -27,6 +27,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
27
27
  * The CORS headers to expose.
28
28
  */
29
29
  httpExposedHeaders?: string;
30
+ /**
31
+ * The public origin URL for the API e.g. https://api.example.com:1234
32
+ */
33
+ publicOrigin?: string;
30
34
  /**
31
35
  * The type of auth admin processor to use on the API: entity-storage.
32
36
  */
@@ -39,6 +43,10 @@ export interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVar
39
43
  * The id of the key in the vault to use for signing in auth operations.
40
44
  */
41
45
  authSigningKeyId?: string;
46
+ /**
47
+ * The HTTP header name used to pass the API key on requests, defaults to x-api-key.
48
+ */
49
+ authApiKeyHeader?: string;
42
50
  /**
43
51
  * Additional MIME type processors to include, comma separated.
44
52
  */