@twin.org/node-core 0.0.3-next.1 → 0.0.3-next.10

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 (141) hide show
  1. package/dist/es/builders/engineEnvBuilder.js +155 -74
  2. package/dist/es/builders/engineEnvBuilder.js.map +1 -1
  3. package/dist/es/builders/engineServerEnvBuilder.js +24 -15
  4. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
  5. package/dist/es/builders/extensionsBuilder.js +26 -17
  6. package/dist/es/builders/extensionsBuilder.js.map +1 -1
  7. package/dist/es/cli.js +255 -0
  8. package/dist/es/cli.js.map +1 -0
  9. package/dist/es/commands/bootstrapLegacy.js +175 -0
  10. package/dist/es/commands/bootstrapLegacy.js.map +1 -0
  11. package/dist/es/commands/help.js +85 -0
  12. package/dist/es/commands/help.js.map +1 -0
  13. package/dist/es/commands/identityCreate.js +310 -0
  14. package/dist/es/commands/identityCreate.js.map +1 -0
  15. package/dist/es/commands/identityImports.js +76 -0
  16. package/dist/es/commands/identityImports.js.map +1 -0
  17. package/dist/es/commands/identityVerifiableCredentialCreate.js +140 -0
  18. package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
  19. package/dist/es/commands/identityVerificationMethodCreate.js +208 -0
  20. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
  21. package/dist/es/commands/identityVerificationMethodImport.js +120 -0
  22. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
  23. package/dist/es/commands/nodeSetIdentity.js +51 -0
  24. package/dist/es/commands/nodeSetIdentity.js.map +1 -0
  25. package/dist/es/commands/nodeSetTenant.js +49 -0
  26. package/dist/es/commands/nodeSetTenant.js.map +1 -0
  27. package/dist/es/commands/tenantCreate.js +120 -0
  28. package/dist/es/commands/tenantCreate.js.map +1 -0
  29. package/dist/es/commands/tenantImport.js +78 -0
  30. package/dist/es/commands/tenantImport.js.map +1 -0
  31. package/dist/es/commands/userCreate.js +197 -0
  32. package/dist/es/commands/userCreate.js.map +1 -0
  33. package/dist/es/commands/vaultKeyCreate.js +185 -0
  34. package/dist/es/commands/vaultKeyCreate.js.map +1 -0
  35. package/dist/es/commands/vaultKeyImport.js +98 -0
  36. package/dist/es/commands/vaultKeyImport.js.map +1 -0
  37. package/dist/es/defaults.js +20 -1
  38. package/dist/es/defaults.js.map +1 -1
  39. package/dist/es/index.js +7 -3
  40. package/dist/es/index.js.map +1 -1
  41. package/dist/es/models/ICliArgs.js +4 -0
  42. package/dist/es/models/ICliArgs.js.map +1 -0
  43. package/dist/es/models/ICliCommand.js +2 -0
  44. package/dist/es/models/ICliCommand.js.map +1 -0
  45. package/dist/es/models/ICliCommandDefinition.js +2 -0
  46. package/dist/es/models/ICliCommandDefinition.js.map +1 -0
  47. package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
  48. package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
  49. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  50. package/dist/es/models/INodeEngineState.js.map +1 -1
  51. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
  52. package/dist/es/models/cliCommandParamType.js +4 -0
  53. package/dist/es/models/cliCommandParamType.js.map +1 -0
  54. package/dist/es/node.js +55 -35
  55. package/dist/es/node.js.map +1 -1
  56. package/dist/es/start.js +128 -0
  57. package/dist/es/start.js.map +1 -0
  58. package/dist/es/utils.js +1 -22
  59. package/dist/es/utils.js.map +1 -1
  60. package/dist/types/builders/engineEnvBuilder.d.ts +4 -1
  61. package/dist/types/builders/engineServerEnvBuilder.d.ts +5 -2
  62. package/dist/types/cli.d.ts +66 -0
  63. package/dist/types/commands/bootstrapLegacy.d.ts +66 -0
  64. package/dist/types/commands/help.d.ts +23 -0
  65. package/dist/types/commands/identityCreate.d.ts +39 -0
  66. package/dist/types/commands/identityImports.d.ts +24 -0
  67. package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
  68. package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
  69. package/dist/types/commands/identityVerificationMethodImport.d.ts +31 -0
  70. package/dist/types/commands/nodeSetIdentity.d.ts +22 -0
  71. package/dist/types/commands/nodeSetTenant.d.ts +22 -0
  72. package/dist/types/commands/tenantCreate.d.ts +35 -0
  73. package/dist/types/commands/tenantImport.d.ts +24 -0
  74. package/dist/types/commands/userCreate.d.ts +46 -0
  75. package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
  76. package/dist/types/commands/vaultKeyImport.d.ts +28 -0
  77. package/dist/types/defaults.d.ts +11 -1
  78. package/dist/types/index.d.ts +7 -3
  79. package/dist/types/models/ICliArgs.d.ts +20 -0
  80. package/dist/types/models/ICliCommand.d.ts +17 -0
  81. package/dist/types/models/ICliCommandDefinition.d.ts +46 -0
  82. package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
  83. package/dist/types/models/IEngineEnvironmentVariables.d.ts +51 -42
  84. package/dist/types/models/INodeEngineState.d.ts +0 -8
  85. package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
  86. package/dist/types/models/cliCommandParamType.d.ts +4 -0
  87. package/dist/types/node.d.ts +6 -2
  88. package/dist/types/{server.d.ts → start.d.ts} +7 -2
  89. package/dist/types/utils.d.ts +0 -8
  90. package/docs/changelog.md +63 -0
  91. package/docs/reference/functions/buildConfiguration.md +2 -2
  92. package/docs/reference/functions/buildEngineConfiguration.md +1 -1
  93. package/docs/reference/functions/buildEngineServerConfiguration.md +3 -3
  94. package/docs/reference/functions/constructCliCommand.md +27 -0
  95. package/docs/reference/functions/executeCommand.md +29 -0
  96. package/docs/reference/functions/getEnvDefaults.md +19 -0
  97. package/docs/reference/functions/initCli.md +27 -0
  98. package/docs/reference/functions/parseCommandLineArgs.md +19 -0
  99. package/docs/reference/functions/processEnvOptions.md +27 -0
  100. package/docs/reference/functions/registerCommands.md +9 -0
  101. package/docs/reference/functions/run.md +7 -1
  102. package/docs/reference/functions/start.md +10 -4
  103. package/docs/reference/functions/substituteEnvOptions.md +25 -0
  104. package/docs/reference/index.md +15 -12
  105. package/docs/reference/interfaces/ICliArgs.md +35 -0
  106. package/docs/reference/interfaces/ICliCommand.md +23 -0
  107. package/docs/reference/interfaces/ICliCommandDefinition.md +101 -0
  108. package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
  109. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +90 -65
  110. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +129 -88
  111. package/docs/reference/interfaces/INodeEngineState.md +0 -16
  112. package/docs/reference/interfaces/INodeEnvironmentVariables.md +129 -172
  113. package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
  114. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +3 -0
  115. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +3 -0
  116. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +1 -1
  117. package/locales/en.json +463 -30
  118. package/package.json +3 -1
  119. package/dist/es/bootstrap.js +0 -374
  120. package/dist/es/bootstrap.js.map +0 -1
  121. package/dist/es/identity.js +0 -169
  122. package/dist/es/identity.js.map +0 -1
  123. package/dist/es/models/nodeFeatures.js +0 -21
  124. package/dist/es/models/nodeFeatures.js.map +0 -1
  125. package/dist/es/server.js +0 -74
  126. package/dist/es/server.js.map +0 -1
  127. package/dist/types/bootstrap.d.ts +0 -76
  128. package/dist/types/identity.d.ts +0 -14
  129. package/dist/types/models/nodeFeatures.d.ts +0 -21
  130. package/docs/reference/functions/bootstrap.md +0 -29
  131. package/docs/reference/functions/bootstrapAuth.md +0 -35
  132. package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
  133. package/docs/reference/functions/bootstrapContextIdHandlers.md +0 -35
  134. package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
  135. package/docs/reference/functions/bootstrapNodeAdminUser.md +0 -35
  136. package/docs/reference/functions/bootstrapNodeId.md +0 -35
  137. package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
  138. package/docs/reference/functions/bootstrapTenantId.md +0 -35
  139. package/docs/reference/functions/getFeatures.md +0 -19
  140. package/docs/reference/type-aliases/NodeFeatures.md +0 -5
  141. package/docs/reference/variables/NodeFeatures.md +0 -25
@@ -0,0 +1,185 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { CLIDisplay, CLIUtils } from "@twin.org/cli-core";
4
+ import { Converter, GeneralError, Guards, I18n, Is } from "@twin.org/core";
5
+ import { Did } from "@twin.org/identity-models";
6
+ import { VaultConnectorFactory, VaultKeyType } from "@twin.org/vault-models";
7
+ const COMMAND_NAME = "vault-key-create";
8
+ /**
9
+ * Get the command definition parameters.
10
+ * @param commandDefinitions The registered command definitions.
11
+ */
12
+ export function getCommandDefinitionVaultKeyCreate(commandDefinitions) {
13
+ commandDefinitions[COMMAND_NAME] = {
14
+ command: COMMAND_NAME,
15
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.description"),
16
+ example: I18n.formatMessage("node.cli.commands.vault-key-create.example"),
17
+ requiresNodeIdentity: false,
18
+ requiresTenantId: false,
19
+ params: [
20
+ {
21
+ key: "identity",
22
+ type: "string",
23
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.identity.description"),
24
+ extendedType: "did",
25
+ required: true
26
+ },
27
+ {
28
+ key: "key-id",
29
+ type: "string",
30
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.key-id.description"),
31
+ required: true
32
+ },
33
+ {
34
+ key: "key-type",
35
+ type: "string",
36
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.key-type.description"),
37
+ options: ["Ed25519", "Secp256k1", "ChaCha20Poly1305"],
38
+ defaultValue: "Ed25519",
39
+ required: false
40
+ },
41
+ {
42
+ key: "overwrite-mode",
43
+ type: "string",
44
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.overwrite-mode.description"),
45
+ options: ["skip", "overwrite", "error"],
46
+ defaultValue: "skip",
47
+ required: false
48
+ },
49
+ {
50
+ key: "load-env",
51
+ type: "string",
52
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.load-env.description"),
53
+ required: false
54
+ },
55
+ {
56
+ key: "output-json",
57
+ type: "string",
58
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.output-json.description"),
59
+ required: false
60
+ },
61
+ {
62
+ key: "output-env",
63
+ type: "string",
64
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.output-env.description"),
65
+ required: false
66
+ },
67
+ {
68
+ key: "output-env-prefix",
69
+ type: "string",
70
+ description: I18n.formatMessage("node.cli.commands.vault-key-create.params.output-env-prefix.description"),
71
+ required: false
72
+ }
73
+ ],
74
+ action: async (engineCore, envVars, params) => vaultKeyCreate(engineCore, envVars, params)
75
+ };
76
+ }
77
+ /**
78
+ * Command for creating a vault key.
79
+ * @param engineCore The engine core.
80
+ * @param envVars The environment variables for the node.
81
+ * @param params The parameters for the command.
82
+ * @param params.identity The DID to create the vault key for.
83
+ * @param params.keyId The ID of the key to create.
84
+ * @param params.keyType The type of key to create.
85
+ * @param params.overwriteMode The mode to use when a user with the same identity already exists.
86
+ * @param params.outputJson The output .json file to store the command output.
87
+ * @param params.outputEnv The output .env file to store the command output.
88
+ * @param params.outputEnvPrefix The prefix to use for variables in the output .env file.
89
+ * @returns The created vault key details or undefined if skipped.
90
+ */
91
+ export async function vaultKeyCreate(engineCore, envVars, params) {
92
+ Did.guard("vaultKeyCreate", "identity", params.identity);
93
+ Guards.stringValue("vaultKeyCreate", "key-id", params.keyId);
94
+ Guards.arrayOneOf("vaultKeyCreate", "key-type", params.keyType, [
95
+ "Ed25519",
96
+ "Secp256k1",
97
+ "ChaCha20Poly1305"
98
+ ]);
99
+ const defaultVaultConnectorType = engineCore.getRegisteredInstanceType("vaultConnector");
100
+ const vaultConnector = VaultConnectorFactory.get(defaultVaultConnectorType);
101
+ let createVaultKey = true;
102
+ const fullKeyId = `${params.identity}/${params.keyId}`;
103
+ let existingKey;
104
+ try {
105
+ existingKey = await vaultConnector.getKey(fullKeyId);
106
+ }
107
+ catch { }
108
+ if (!Is.empty(existingKey)) {
109
+ if (params.overwriteMode === "error") {
110
+ throw new GeneralError("vaultKeyCreate", "vaultKeyAlreadyExists");
111
+ }
112
+ else if (params.overwriteMode === "skip") {
113
+ createVaultKey = false;
114
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-create.labels.skipping"));
115
+ }
116
+ else if (params.overwriteMode === "overwrite") {
117
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-create.labels.overwriting"));
118
+ await vaultConnector.removeKey(fullKeyId);
119
+ }
120
+ }
121
+ let json;
122
+ if (createVaultKey) {
123
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-create.labels.creating"));
124
+ CLIDisplay.spinnerStart();
125
+ await vaultConnector.createKey(fullKeyId, VaultKeyType[params.keyType]);
126
+ const key = await vaultConnector.getKey(fullKeyId);
127
+ CLIDisplay.spinnerStop();
128
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-create.labels.created"));
129
+ const privateKeyBase64 = key.privateKey ? Converter.bytesToBase64(key.privateKey) : undefined;
130
+ const publicKeyBase64 = key.publicKey ? Converter.bytesToBase64(key.publicKey) : undefined;
131
+ const privateKeyHex = key.privateKey ? Converter.bytesToHex(key.privateKey, true) : undefined;
132
+ const publicKeyHex = key.publicKey ? Converter.bytesToHex(key.publicKey, true) : undefined;
133
+ CLIDisplay.break();
134
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.keyId"), params.keyId);
135
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.keyType"), params.keyType);
136
+ if (Is.stringValue(privateKeyBase64)) {
137
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.privateKeyBase64"), privateKeyBase64);
138
+ }
139
+ if (Is.stringValue(publicKeyBase64)) {
140
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.publicKeyBase64"), publicKeyBase64);
141
+ }
142
+ if (Is.stringValue(privateKeyHex)) {
143
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.privateKeyHex"), privateKeyHex);
144
+ }
145
+ if (Is.stringValue(publicKeyHex)) {
146
+ CLIDisplay.value(I18n.formatMessage("node.cli.commands.vault-key-create.labels.publicKeyHex"), publicKeyHex);
147
+ }
148
+ CLIDisplay.break();
149
+ json = {
150
+ identity: params.identity,
151
+ keyId: params.keyId,
152
+ keyType: params.keyType,
153
+ privateKeyBase64,
154
+ publicKeyBase64,
155
+ privateKeyHex,
156
+ publicKeyHex
157
+ };
158
+ if (Is.stringValue(params.outputJson)) {
159
+ await CLIUtils.writeJsonFile(params.outputJson, json, false);
160
+ }
161
+ if (Is.stringValue(params.outputEnv)) {
162
+ const outputParams = [
163
+ `${params.outputEnvPrefix}IDENTITY="${params.identity}"`,
164
+ `${params.outputEnvPrefix}KEY_ID="${params.keyId}"`,
165
+ `${params.outputEnvPrefix}KEY_TYPE="${params.keyType}"`
166
+ ];
167
+ if (Is.stringValue(privateKeyBase64)) {
168
+ outputParams.push(`${params.outputEnvPrefix}PRIVATE_KEY_BASE64="${privateKeyBase64}"`);
169
+ }
170
+ if (Is.stringValue(publicKeyBase64)) {
171
+ outputParams.push(`${params.outputEnvPrefix}PUBLIC_KEY_BASE64="${publicKeyBase64}"`);
172
+ }
173
+ if (Is.stringValue(privateKeyHex)) {
174
+ outputParams.push(`${params.outputEnvPrefix}PRIVATE_KEY_HEX="${privateKeyHex}"`);
175
+ }
176
+ if (Is.stringValue(publicKeyHex)) {
177
+ outputParams.push(`${params.outputEnvPrefix}PUBLIC_KEY_HEX="${publicKeyHex}"`);
178
+ }
179
+ await CLIUtils.writeEnvFile(params.outputEnv, outputParams, false);
180
+ }
181
+ }
182
+ CLIDisplay.done();
183
+ return json;
184
+ }
185
+ //# sourceMappingURL=vaultKeyCreate.js.map
@@ -0,0 +1 @@
1
+ {"version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MAAM,CAAC,eAAe,WAAW,MAAM,CAAC,KAAK,GAAG;gBACnD,GAAG,MAAM,CAAC,eAAe,aAAa,MAAM,CAAC,OAAO,GAAG;aACvD,CAAC;YAEF,IAAI,EAAE,CAAC,WAAW,CAAC,gBAAgB,CAAC,EAAE,CAAC;gBACtC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,eAAe,uBAAuB,gBAAgB,GAAG,CAAC,CAAC;YACxF,CAAC;YAED,IAAI,EAAE,CAAC,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;gBACrC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,eAAe,sBAAsB,eAAe,GAAG,CAAC,CAAC;YACtF,CAAC;YACD,IAAI,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC;gBACnC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,eAAe,oBAAoB,aAAa,GAAG,CAAC,CAAC;YAClF,CAAC;YACD,IAAI,EAAE,CAAC,WAAW,CAAC,YAAY,CAAC,EAAE,CAAC;gBAClC,YAAY,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,eAAe,mBAAmB,YAAY,GAAG,CAAC,CAAC;YAChF,CAAC;YACD,MAAM,QAAQ,CAAC,YAAY,CAAC,MAAM,CAAC,SAAS,EAAE,YAAY,EAAE,KAAK,CAAC,CAAC;QACpE,CAAC;IACF,CAAC;IAED,UAAU,CAAC,IAAI,EAAE,CAAC;IAElB,OAAO,IAAI,CAAC;AACb,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { CLIDisplay, CLIUtils } from \"@twin.org/cli-core\";\nimport { Converter, GeneralError, Guards, I18n, Is } from \"@twin.org/core\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport { Did } from \"@twin.org/identity-models\";\nimport { VaultConnectorFactory, VaultKeyType } from \"@twin.org/vault-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { INodeEngineConfig } from \"../models/INodeEngineConfig.js\";\nimport type { INodeEngineState } from \"../models/INodeEngineState.js\";\nimport type { INodeEnvironmentVariables } from \"../models/INodeEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"vault-key-create\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionVaultKeyCreate(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.vault-key-create.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.vault-key-create.example\"),\n\t\trequiresNodeIdentity: false,\n\t\trequiresTenantId: false,\n\t\tparams: [\n\t\t\t{\n\t\t\t\tkey: \"identity\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.identity.description\"\n\t\t\t\t),\n\t\t\t\textendedType: \"did\",\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"key-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.key-id.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"key-type\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.key-type.description\"\n\t\t\t\t),\n\t\t\t\toptions: [\"Ed25519\", \"Secp256k1\", \"ChaCha20Poly1305\"],\n\t\t\t\tdefaultValue: \"Ed25519\",\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"overwrite-mode\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.overwrite-mode.description\"\n\t\t\t\t),\n\t\t\t\toptions: [\"skip\", \"overwrite\", \"error\"],\n\t\t\t\tdefaultValue: \"skip\",\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"load-env\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.load-env.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"output-json\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.output-json.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"output-env\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.output-env.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"output-env-prefix\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-create.params.output-env-prefix.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t}\n\t\t],\n\t\taction: async (engineCore, envVars, params) => vaultKeyCreate(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for creating a vault key.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @param params.identity The DID to create the vault key for.\n * @param params.keyId The ID of the key to create.\n * @param params.keyType The type of key to create.\n * @param params.overwriteMode The mode to use when a user with the same identity already exists.\n * @param params.outputJson The output .json file to store the command output.\n * @param params.outputEnv The output .env file to store the command output.\n * @param params.outputEnvPrefix The prefix to use for variables in the output .env file.\n * @returns The created vault key details or undefined if skipped.\n */\nexport async function vaultKeyCreate(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\tenvVars: INodeEnvironmentVariables,\n\tparams: {\n\t\tidentity?: string;\n\t\tkeyType?: string;\n\t\tkeyId?: string;\n\t\toverwriteMode?: \"skip\" | \"overwrite\" | \"error\";\n\t\toutputJson?: string;\n\t\toutputEnv?: string;\n\t\toutputEnvPrefix?: string;\n\t}\n): Promise<\n\t| {\n\t\t\tidentity: string;\n\t\t\tkeyId: string;\n\t\t\tkeyType?: string;\n\t\t\tprivateKeyBase64?: string;\n\t\t\tpublicKeyBase64?: string;\n\t\t\tprivateKeyHex?: string;\n\t\t\tpublicKeyHex?: string;\n\t }\n\t| undefined\n> {\n\tDid.guard(\"vaultKeyCreate\", \"identity\", params.identity);\n\tGuards.stringValue(\"vaultKeyCreate\", \"key-id\", params.keyId);\n\tGuards.arrayOneOf(\"vaultKeyCreate\", \"key-type\", params.keyType, [\n\t\t\"Ed25519\",\n\t\t\"Secp256k1\",\n\t\t\"ChaCha20Poly1305\"\n\t]);\n\n\tconst defaultVaultConnectorType = engineCore.getRegisteredInstanceType(\"vaultConnector\");\n\tconst vaultConnector = VaultConnectorFactory.get(defaultVaultConnectorType);\n\n\tlet createVaultKey = true;\n\tconst fullKeyId = `${params.identity}/${params.keyId}`;\n\n\tlet existingKey;\n\ttry {\n\t\texistingKey = await vaultConnector.getKey(fullKeyId);\n\t} catch {}\n\n\tif (!Is.empty(existingKey)) {\n\t\tif (params.overwriteMode === \"error\") {\n\t\t\tthrow new GeneralError(\"vaultKeyCreate\", \"vaultKeyAlreadyExists\");\n\t\t} else if (params.overwriteMode === \"skip\") {\n\t\t\tcreateVaultKey = false;\n\t\t\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-create.labels.skipping\"));\n\t\t} else if (params.overwriteMode === \"overwrite\") {\n\t\t\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-create.labels.overwriting\"));\n\t\t\tawait vaultConnector.removeKey(fullKeyId);\n\t\t}\n\t}\n\n\tlet json;\n\tif (createVaultKey) {\n\t\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-create.labels.creating\"));\n\t\tCLIDisplay.spinnerStart();\n\n\t\tawait vaultConnector.createKey(\n\t\t\tfullKeyId,\n\t\t\tVaultKeyType[params.keyType as keyof typeof VaultKeyType]\n\t\t);\n\n\t\tconst key = await vaultConnector.getKey(fullKeyId);\n\n\t\tCLIDisplay.spinnerStop();\n\t\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-create.labels.created\"));\n\n\t\tconst privateKeyBase64 = key.privateKey ? Converter.bytesToBase64(key.privateKey) : undefined;\n\t\tconst publicKeyBase64 = key.publicKey ? Converter.bytesToBase64(key.publicKey) : undefined;\n\t\tconst privateKeyHex = key.privateKey ? Converter.bytesToHex(key.privateKey, true) : undefined;\n\t\tconst publicKeyHex = key.publicKey ? Converter.bytesToHex(key.publicKey, true) : undefined;\n\n\t\tCLIDisplay.break();\n\t\tCLIDisplay.value(\n\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.keyId\"),\n\t\t\tparams.keyId\n\t\t);\n\t\tCLIDisplay.value(\n\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.keyType\"),\n\t\t\tparams.keyType\n\t\t);\n\t\tif (Is.stringValue(privateKeyBase64)) {\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.privateKeyBase64\"),\n\t\t\t\tprivateKeyBase64\n\t\t\t);\n\t\t}\n\t\tif (Is.stringValue(publicKeyBase64)) {\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.publicKeyBase64\"),\n\t\t\t\tpublicKeyBase64\n\t\t\t);\n\t\t}\n\t\tif (Is.stringValue(privateKeyHex)) {\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.privateKeyHex\"),\n\t\t\t\tprivateKeyHex\n\t\t\t);\n\t\t}\n\t\tif (Is.stringValue(publicKeyHex)) {\n\t\t\tCLIDisplay.value(\n\t\t\t\tI18n.formatMessage(\"node.cli.commands.vault-key-create.labels.publicKeyHex\"),\n\t\t\t\tpublicKeyHex\n\t\t\t);\n\t\t}\n\n\t\tCLIDisplay.break();\n\n\t\tjson = {\n\t\t\tidentity: params.identity,\n\t\t\tkeyId: params.keyId,\n\t\t\tkeyType: params.keyType,\n\t\t\tprivateKeyBase64,\n\t\t\tpublicKeyBase64,\n\t\t\tprivateKeyHex,\n\t\t\tpublicKeyHex\n\t\t};\n\t\tif (Is.stringValue(params.outputJson)) {\n\t\t\tawait CLIUtils.writeJsonFile(params.outputJson, json, false);\n\t\t}\n\n\t\tif (Is.stringValue(params.outputEnv)) {\n\t\t\tconst outputParams = [\n\t\t\t\t`${params.outputEnvPrefix}IDENTITY=\"${params.identity}\"`,\n\t\t\t\t`${params.outputEnvPrefix}KEY_ID=\"${params.keyId}\"`,\n\t\t\t\t`${params.outputEnvPrefix}KEY_TYPE=\"${params.keyType}\"`\n\t\t\t];\n\n\t\t\tif (Is.stringValue(privateKeyBase64)) {\n\t\t\t\toutputParams.push(`${params.outputEnvPrefix}PRIVATE_KEY_BASE64=\"${privateKeyBase64}\"`);\n\t\t\t}\n\n\t\t\tif (Is.stringValue(publicKeyBase64)) {\n\t\t\t\toutputParams.push(`${params.outputEnvPrefix}PUBLIC_KEY_BASE64=\"${publicKeyBase64}\"`);\n\t\t\t}\n\t\t\tif (Is.stringValue(privateKeyHex)) {\n\t\t\t\toutputParams.push(`${params.outputEnvPrefix}PRIVATE_KEY_HEX=\"${privateKeyHex}\"`);\n\t\t\t}\n\t\t\tif (Is.stringValue(publicKeyHex)) {\n\t\t\t\toutputParams.push(`${params.outputEnvPrefix}PUBLIC_KEY_HEX=\"${publicKeyHex}\"`);\n\t\t\t}\n\t\t\tawait CLIUtils.writeEnvFile(params.outputEnv, outputParams, false);\n\t\t}\n\t}\n\n\tCLIDisplay.done();\n\n\treturn json;\n}\n"]}
@@ -0,0 +1,98 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ import { CLIDisplay } from "@twin.org/cli-core";
4
+ import { Converter, Guards, HexHelper, I18n, Is } from "@twin.org/core";
5
+ import { Ed25519 } from "@twin.org/crypto";
6
+ import { Did } from "@twin.org/identity-models";
7
+ import { VaultConnectorFactory, VaultKeyType } from "@twin.org/vault-models";
8
+ const COMMAND_NAME = "vault-key-import";
9
+ /**
10
+ * Get the command definition parameters.
11
+ * @param commandDefinitions The registered command definitions.
12
+ */
13
+ export function getCommandDefinitionVaultKeyImport(commandDefinitions) {
14
+ commandDefinitions[COMMAND_NAME] = {
15
+ command: COMMAND_NAME,
16
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.description"),
17
+ example: I18n.formatMessage("node.cli.commands.vault-key-import.example"),
18
+ requiresNodeIdentity: false,
19
+ requiresTenantId: false,
20
+ params: [
21
+ {
22
+ key: "identity",
23
+ type: "string",
24
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.params.identity.description"),
25
+ extendedType: "did",
26
+ required: true
27
+ },
28
+ {
29
+ key: "key-id",
30
+ type: "string",
31
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.params.key-id.description"),
32
+ required: true
33
+ },
34
+ {
35
+ key: "key-type",
36
+ type: "string",
37
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.params.key-type.description"),
38
+ options: ["Ed25519", "Secp256k1", "ChaCha20Poly1305"],
39
+ defaultValue: "Ed25519",
40
+ required: false
41
+ },
42
+ {
43
+ key: "private-key-hex",
44
+ type: "string",
45
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.params.private-key-hex.description"),
46
+ required: true
47
+ },
48
+ {
49
+ key: "load-env",
50
+ type: "string",
51
+ description: I18n.formatMessage("node.cli.commands.vault-key-import.params.load-env.description"),
52
+ required: false
53
+ }
54
+ ],
55
+ action: async (engineCore, envVars, params) => vaultKeyImport(engineCore, envVars, params)
56
+ };
57
+ }
58
+ /**
59
+ * Command for importing a vault key.
60
+ * @param engineCore The engine core.
61
+ * @param envVars The environment variables for the node.
62
+ * @param params The parameters for the command.
63
+ * @param params.identity The DID to create the vault key for.
64
+ * @param params.keyId The ID of the key to create.
65
+ * @param params.keyType The type of key to create.
66
+ * @param params.privateKeyHex The private key in hexadecimal format.
67
+ */
68
+ export async function vaultKeyImport(engineCore, envVars, params) {
69
+ Did.guard("vaultKeyImport", "identity", params.identity);
70
+ Guards.stringValue("vaultKeyImport", "key-id", params.keyId);
71
+ Guards.arrayOneOf("vaultKeyImport", "key-type", params.keyType, [
72
+ "Ed25519",
73
+ "Secp256k1",
74
+ "ChaCha20Poly1305"
75
+ ]);
76
+ Guards.stringHex("vaultKeyImport", "private-key-hex", params.privateKeyHex, true);
77
+ const defaultVaultConnectorType = engineCore.getRegisteredInstanceType("vaultConnector");
78
+ const vaultConnector = VaultConnectorFactory.get(defaultVaultConnectorType);
79
+ const fullKeyId = `${params.identity}/${params.keyId}`;
80
+ let existingKey;
81
+ try {
82
+ existingKey = await vaultConnector.getKey(fullKeyId);
83
+ if (!Is.empty(existingKey)) {
84
+ await vaultConnector.removeKey(fullKeyId);
85
+ }
86
+ }
87
+ catch { }
88
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-import.labels.importing"));
89
+ CLIDisplay.spinnerStart();
90
+ const privateKeyBytes = Converter.hexToBytes(HexHelper.stripPrefix(params.privateKeyHex));
91
+ const publicKeyBytes = params.keyType === "Ed25519" ? Ed25519.publicKeyFromPrivateKey(privateKeyBytes) : undefined;
92
+ await vaultConnector.addKey(fullKeyId, VaultKeyType[params.keyType], privateKeyBytes, publicKeyBytes);
93
+ CLIDisplay.spinnerStop();
94
+ CLIDisplay.task(I18n.formatMessage("node.cli.commands.vault-key-import.labels.imported"));
95
+ CLIDisplay.break();
96
+ CLIDisplay.done();
97
+ }
98
+ //# sourceMappingURL=vaultKeyImport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultKeyImport.js","sourceRoot":"","sources":["../../../src/commands/vaultKeyImport.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,GAAG,EAAE,MAAM,2BAA2B,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAM7E,MAAM,YAAY,GAAG,kBAAkB,CAAC;AAExC;;;GAGG;AACH,MAAM,UAAU,kCAAkC,CAAC,kBAElD;IACA,kBAAkB,CAAC,YAAY,CAAC,GAAG;QAClC,OAAO,EAAE,YAAY;QACrB,WAAW,EAAE,IAAI,CAAC,aAAa,CAAC,gDAAgD,CAAC;QACjF,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,4CAA4C,CAAC;QACzE,oBAAoB,EAAE,KAAK;QAC3B,gBAAgB,EAAE,KAAK;QACvB,MAAM,EAAE;YACP;gBACC,GAAG,EAAE,UAAU;gBACf,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,IAAI,CAAC,aAAa,CAC9B,gEAAgE,CAChE;gBACD,YAAY,EAAE,KAAK;gBACnB,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,GAAG,EAAE,QAAQ;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,IAAI,CAAC,aAAa,CAC9B,8DAA8D,CAC9D;gBACD,QAAQ,EAAE,IAAI;aACd;YACD;gBACC,GAAG,EAAE,UAAU;gBACf,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,IAAI,CAAC,aAAa,CAC9B,gEAAgE,CAChE;gB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,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;IAEvD,IAAI,WAAW,CAAC;IAChB,IAAI,CAAC;QACJ,WAAW,GAAG,MAAM,cAAc,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,EAAE,CAAC;YAC5B,MAAM,cAAc,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;IACF,CAAC;IAAC,MAAM,CAAC,CAAA,CAAC;IAEV,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,qDAAqD,CAAC,CAAC,CAAC;IAC3F,UAAU,CAAC,YAAY,EAAE,CAAC;IAE1B,MAAM,eAAe,GAAG,SAAS,CAAC,UAAU,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,CAAC;IAC1F,MAAM,cAAc,GACnB,MAAM,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,uBAAuB,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAE7F,MAAM,cAAc,CAAC,MAAM,CAC1B,SAAS,EACT,YAAY,CAAC,MAAM,CAAC,OAAoC,CAAC,EACzD,eAAe,EACf,cAAc,CACd,CAAC;IAEF,UAAU,CAAC,WAAW,EAAE,CAAC;IACzB,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,oDAAoD,CAAC,CAAC,CAAC;IAE1F,UAAU,CAAC,KAAK,EAAE,CAAC;IACnB,UAAU,CAAC,IAAI,EAAE,CAAC;AACnB,CAAC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { CLIDisplay } from \"@twin.org/cli-core\";\nimport { Converter, Guards, HexHelper, I18n, Is } from \"@twin.org/core\";\nimport { Ed25519 } from \"@twin.org/crypto\";\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport { Did } from \"@twin.org/identity-models\";\nimport { VaultConnectorFactory, VaultKeyType } from \"@twin.org/vault-models\";\nimport type { ICliCommandDefinition } from \"../models/ICliCommandDefinition.js\";\nimport type { INodeEngineConfig } from \"../models/INodeEngineConfig.js\";\nimport type { INodeEngineState } from \"../models/INodeEngineState.js\";\nimport type { INodeEnvironmentVariables } from \"../models/INodeEnvironmentVariables.js\";\n\nconst COMMAND_NAME = \"vault-key-import\";\n\n/**\n * Get the command definition parameters.\n * @param commandDefinitions The registered command definitions.\n */\nexport function getCommandDefinitionVaultKeyImport(commandDefinitions: {\n\t[id: string]: ICliCommandDefinition;\n}): void {\n\tcommandDefinitions[COMMAND_NAME] = {\n\t\tcommand: COMMAND_NAME,\n\t\tdescription: I18n.formatMessage(\"node.cli.commands.vault-key-import.description\"),\n\t\texample: I18n.formatMessage(\"node.cli.commands.vault-key-import.example\"),\n\t\trequiresNodeIdentity: false,\n\t\trequiresTenantId: false,\n\t\tparams: [\n\t\t\t{\n\t\t\t\tkey: \"identity\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-import.params.identity.description\"\n\t\t\t\t),\n\t\t\t\textendedType: \"did\",\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"key-id\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-import.params.key-id.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"key-type\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-import.params.key-type.description\"\n\t\t\t\t),\n\t\t\t\toptions: [\"Ed25519\", \"Secp256k1\", \"ChaCha20Poly1305\"],\n\t\t\t\tdefaultValue: \"Ed25519\",\n\t\t\t\trequired: false\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"private-key-hex\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-import.params.private-key-hex.description\"\n\t\t\t\t),\n\t\t\t\trequired: true\n\t\t\t},\n\t\t\t{\n\t\t\t\tkey: \"load-env\",\n\t\t\t\ttype: \"string\",\n\t\t\t\tdescription: I18n.formatMessage(\n\t\t\t\t\t\"node.cli.commands.vault-key-import.params.load-env.description\"\n\t\t\t\t),\n\t\t\t\trequired: false\n\t\t\t}\n\t\t],\n\t\taction: async (engineCore, envVars, params) => vaultKeyImport(engineCore, envVars, params)\n\t};\n}\n\n/**\n * Command for importing a vault key.\n * @param engineCore The engine core.\n * @param envVars The environment variables for the node.\n * @param params The parameters for the command.\n * @param params.identity The DID to create the vault key for.\n * @param params.keyId The ID of the key to create.\n * @param params.keyType The type of key to create.\n * @param params.privateKeyHex The private key in hexadecimal format.\n */\nexport async function vaultKeyImport(\n\tengineCore: IEngineCore<INodeEngineConfig, INodeEngineState>,\n\tenvVars: INodeEnvironmentVariables,\n\tparams: {\n\t\tidentity?: string;\n\t\tkeyType?: string;\n\t\tkeyId?: string;\n\t\tprivateKeyHex?: string;\n\t}\n): Promise<void> {\n\tDid.guard(\"vaultKeyImport\", \"identity\", params.identity);\n\tGuards.stringValue(\"vaultKeyImport\", \"key-id\", params.keyId);\n\tGuards.arrayOneOf(\"vaultKeyImport\", \"key-type\", params.keyType, [\n\t\t\"Ed25519\",\n\t\t\"Secp256k1\",\n\t\t\"ChaCha20Poly1305\"\n\t]);\n\tGuards.stringHex(\"vaultKeyImport\", \"private-key-hex\", params.privateKeyHex, true);\n\n\tconst defaultVaultConnectorType = engineCore.getRegisteredInstanceType(\"vaultConnector\");\n\tconst vaultConnector = VaultConnectorFactory.get(defaultVaultConnectorType);\n\n\tconst fullKeyId = `${params.identity}/${params.keyId}`;\n\n\tlet existingKey;\n\ttry {\n\t\texistingKey = await vaultConnector.getKey(fullKeyId);\n\t\tif (!Is.empty(existingKey)) {\n\t\t\tawait vaultConnector.removeKey(fullKeyId);\n\t\t}\n\t} catch {}\n\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-import.labels.importing\"));\n\tCLIDisplay.spinnerStart();\n\n\tconst privateKeyBytes = Converter.hexToBytes(HexHelper.stripPrefix(params.privateKeyHex));\n\tconst publicKeyBytes =\n\t\tparams.keyType === \"Ed25519\" ? Ed25519.publicKeyFromPrivateKey(privateKeyBytes) : undefined;\n\n\tawait vaultConnector.addKey(\n\t\tfullKeyId,\n\t\tVaultKeyType[params.keyType as keyof typeof VaultKeyType],\n\t\tprivateKeyBytes,\n\t\tpublicKeyBytes\n\t);\n\n\tCLIDisplay.spinnerStop();\n\tCLIDisplay.task(I18n.formatMessage(\"node.cli.commands.vault-key-import.labels.imported\"));\n\n\tCLIDisplay.break();\n\tCLIDisplay.done();\n}\n"]}
@@ -4,6 +4,25 @@ export const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion";
4
4
  export const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
5
5
  export const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
6
6
  export const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID = "synchronised-storage-blob-encryption";
7
- export const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "node-authentication-assertion";
7
+ export const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "vc-authentication-assertion";
8
8
  export const AUTH_SIGNING_KEY_ID = "auth-signing";
9
+ export const CONTEXT_ID_HANDLER_FEATURE_DID = "did";
10
+ export const CONTEXT_ID_HANDLER_FEATURE_TENANT = "tenant";
11
+ /**
12
+ * Get the default environment variables for the node.
13
+ * @param envPrefix The environment variable prefix.
14
+ * @returns The default environment variables.
15
+ */
16
+ export function getEnvDefaults(envPrefix) {
17
+ const envVars = {
18
+ [`${envPrefix}ATTESTATION_VERIFICATION_METHOD_ID`]: ATTESTATION_VERIFICATION_METHOD_ID,
19
+ [`${envPrefix}IMMUTABLE_PROOF_VERIFICATION_METHOD_ID`]: IMMUTABLE_PROOF_VERIFICATION_METHOD_ID,
20
+ [`${envPrefix}BLOB_STORAGE_ENCRYPTION_KEY_ID`]: BLOB_STORAGE_ENCRYPTION_KEY_ID,
21
+ [`${envPrefix}SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID`]: SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID,
22
+ [`${envPrefix}VC_AUTHENTICATION_VERIFICATION_METHOD_ID`]: VC_AUTHENTICATION_VERIFICATION_METHOD_ID,
23
+ [`${envPrefix}TRUST_VERIFICATION_METHOD_ID`]: VC_AUTHENTICATION_VERIFICATION_METHOD_ID,
24
+ [`${envPrefix}AUTH_SIGNING_KEY_ID`]: AUTH_SIGNING_KEY_ID
25
+ };
26
+ return envVars;
27
+ }
9
28
  //# sourceMappingURL=defaults.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,MAAM,CAAC,MAAM,kCAAkC,GAAG,uBAAuB,CAAC;AAC1E,MAAM,CAAC,MAAM,sCAAsC,GAAG,2BAA2B,CAAC;AAClF,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAChE,MAAM,CAAC,MAAM,mDAAmD,GAC/D,sCAAsC,CAAC;AACxC,MAAM,CAAC,MAAM,wCAAwC,GAAG,+BAA+B,CAAC;AACxF,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nexport const ATTESTATION_VERIFICATION_METHOD_ID = \"attestation-assertion\";\nexport const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = \"immutable-proof-assertion\";\nexport const BLOB_STORAGE_ENCRYPTION_KEY_ID = \"blob-encryption\";\nexport const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID =\n\t\"synchronised-storage-blob-encryption\";\nexport const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = \"node-authentication-assertion\";\nexport const AUTH_SIGNING_KEY_ID = \"auth-signing\";\n"]}
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC,MAAM,CAAC,MAAM,kCAAkC,GAAG,uBAAuB,CAAC;AAC1E,MAAM,CAAC,MAAM,sCAAsC,GAAG,2BAA2B,CAAC;AAClF,MAAM,CAAC,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;AAChE,MAAM,CAAC,MAAM,mDAAmD,GAC/D,sCAAsC,CAAC;AACxC,MAAM,CAAC,MAAM,wCAAwC,GAAG,6BAA6B,CAAC;AACtF,MAAM,CAAC,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAClD,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC;AACpD,MAAM,CAAC,MAAM,iCAAiC,GAAG,QAAQ,CAAC;AAE1D;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,SAAiB;IAC/C,MAAM,OAAO,GAA8B;QAC1C,CAAC,GAAG,SAAS,oCAAoC,CAAC,EAAE,kCAAkC;QACtF,CAAC,GAAG,SAAS,wCAAwC,CAAC,EAAE,sCAAsC;QAC9F,CAAC,GAAG,SAAS,gCAAgC,CAAC,EAAE,8BAA8B;QAC9E,CAAC,GAAG,SAAS,qDAAqD,CAAC,EAClE,mDAAmD;QACpD,CAAC,GAAG,SAAS,0CAA0C,CAAC,EACvD,wCAAwC;QACzC,CAAC,GAAG,SAAS,8BAA8B,CAAC,EAAE,wCAAwC;QACtF,CAAC,GAAG,SAAS,qBAAqB,CAAC,EAAE,mBAAmB;KACxD,CAAC;IACF,OAAO,OAAO,CAAC;AAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\nexport const ATTESTATION_VERIFICATION_METHOD_ID = \"attestation-assertion\";\nexport const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = \"immutable-proof-assertion\";\nexport const BLOB_STORAGE_ENCRYPTION_KEY_ID = \"blob-encryption\";\nexport const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID =\n\t\"synchronised-storage-blob-encryption\";\nexport const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = \"vc-authentication-assertion\";\nexport const AUTH_SIGNING_KEY_ID = \"auth-signing\";\nexport const CONTEXT_ID_HANDLER_FEATURE_DID = \"did\";\nexport const CONTEXT_ID_HANDLER_FEATURE_TENANT = \"tenant\";\n\n/**\n * Get the default environment variables for the node.\n * @param envPrefix The environment variable prefix.\n * @returns The default environment variables.\n */\nexport function getEnvDefaults(envPrefix: string): { [key: string]: string } {\n\tconst envVars: { [key: string]: string } = {\n\t\t[`${envPrefix}ATTESTATION_VERIFICATION_METHOD_ID`]: ATTESTATION_VERIFICATION_METHOD_ID,\n\t\t[`${envPrefix}IMMUTABLE_PROOF_VERIFICATION_METHOD_ID`]: IMMUTABLE_PROOF_VERIFICATION_METHOD_ID,\n\t\t[`${envPrefix}BLOB_STORAGE_ENCRYPTION_KEY_ID`]: BLOB_STORAGE_ENCRYPTION_KEY_ID,\n\t\t[`${envPrefix}SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID`]:\n\t\t\tSYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID,\n\t\t[`${envPrefix}VC_AUTHENTICATION_VERIFICATION_METHOD_ID`]:\n\t\t\tVC_AUTHENTICATION_VERIFICATION_METHOD_ID,\n\t\t[`${envPrefix}TRUST_VERIFICATION_METHOD_ID`]: VC_AUTHENTICATION_VERIFICATION_METHOD_ID,\n\t\t[`${envPrefix}AUTH_SIGNING_KEY_ID`]: AUTH_SIGNING_KEY_ID\n\t};\n\treturn envVars;\n}\n"]}
package/dist/es/index.js CHANGED
@@ -1,11 +1,16 @@
1
1
  // Copyright 2024 IOTA Stiftung.
2
2
  // SPDX-License-Identifier: Apache-2.0.
3
- export * from "./bootstrap.js";
4
3
  export * from "./builders/engineEnvBuilder.js";
5
4
  export * from "./builders/engineServerEnvBuilder.js";
6
5
  export * from "./builders/extensionsBuilder.js";
6
+ export * from "./cli.js";
7
7
  export * from "./defaults.js";
8
+ export * from "./models/cliCommandParamType.js";
8
9
  export * from "./models/ICacheMetadata.js";
10
+ export * from "./models/ICliArgs.js";
11
+ export * from "./models/ICliCommand.js";
12
+ export * from "./models/ICliCommandDefinition.js";
13
+ export * from "./models/ICliCommandDefinitionParam.js";
9
14
  export * from "./models/IEngineEnvironmentVariables.js";
10
15
  export * from "./models/IEngineServerEnvironmentVariables.js";
11
16
  export * from "./models/IModuleProtocol.js";
@@ -16,8 +21,7 @@ export * from "./models/INodeOptions.js";
16
21
  export * from "./models/IProtocolHandlerResult.js";
17
22
  export * from "./models/moduleProtocol.js";
18
23
  export * from "./models/nodeExtensionMethods.js";
19
- export * from "./models/nodeFeatures.js";
20
24
  export * from "./node.js";
21
- export * from "./server.js";
25
+ export * from "./start.js";
22
26
  export * from "./utils.js";
23
27
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,0BAA0B,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./bootstrap.js\";\nexport * from \"./builders/engineEnvBuilder.js\";\nexport * from \"./builders/engineServerEnvBuilder.js\";\nexport * from \"./builders/extensionsBuilder.js\";\nexport * from \"./defaults.js\";\nexport * from \"./models/ICacheMetadata.js\";\nexport * from \"./models/IEngineEnvironmentVariables.js\";\nexport * from \"./models/IEngineServerEnvironmentVariables.js\";\nexport * from \"./models/IModuleProtocol.js\";\nexport * from \"./models/INodeEngineConfig.js\";\nexport * from \"./models/INodeEngineState.js\";\nexport * from \"./models/INodeEnvironmentVariables.js\";\nexport * from \"./models/INodeOptions.js\";\nexport * from \"./models/IProtocolHandlerResult.js\";\nexport * from \"./models/moduleProtocol.js\";\nexport * from \"./models/nodeExtensionMethods.js\";\nexport * from \"./models/nodeFeatures.js\";\nexport * from \"./node.js\";\nexport * from \"./server.js\";\nexport * from \"./utils.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sCAAsC,CAAC;AACrD,cAAc,iCAAiC,CAAC;AAChD,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,wCAAwC,CAAC;AACvD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uCAAuC,CAAC;AACtD,cAAc,0BAA0B,CAAC;AACzC,cAAc,oCAAoC,CAAC;AACnD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,kCAAkC,CAAC;AACjD,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nexport * from \"./builders/engineEnvBuilder.js\";\nexport * from \"./builders/engineServerEnvBuilder.js\";\nexport * from \"./builders/extensionsBuilder.js\";\nexport * from \"./cli.js\";\nexport * from \"./defaults.js\";\nexport * from \"./models/cliCommandParamType.js\";\nexport * from \"./models/ICacheMetadata.js\";\nexport * from \"./models/ICliArgs.js\";\nexport * from \"./models/ICliCommand.js\";\nexport * from \"./models/ICliCommandDefinition.js\";\nexport * from \"./models/ICliCommandDefinitionParam.js\";\nexport * from \"./models/IEngineEnvironmentVariables.js\";\nexport * from \"./models/IEngineServerEnvironmentVariables.js\";\nexport * from \"./models/IModuleProtocol.js\";\nexport * from \"./models/INodeEngineConfig.js\";\nexport * from \"./models/INodeEngineState.js\";\nexport * from \"./models/INodeEnvironmentVariables.js\";\nexport * from \"./models/INodeOptions.js\";\nexport * from \"./models/IProtocolHandlerResult.js\";\nexport * from \"./models/moduleProtocol.js\";\nexport * from \"./models/nodeExtensionMethods.js\";\nexport * from \"./node.js\";\nexport * from \"./start.js\";\nexport * from \"./utils.js\";\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=ICliArgs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICliArgs.js","sourceRoot":"","sources":["../../../src/models/ICliArgs.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Command to execute in the CLI.\n */\nexport interface ICliArgs {\n\t/**\n\t * The path of the node executable.\n\t */\n\tnodePath?: string;\n\n\t/**\n\t * The path of the script to execute.\n\t */\n\tscriptPath?: string;\n\n\t/**\n\t * The command line options.\n\t */\n\toptions?: {\n\t\tkey: string;\n\t\tvalue: string;\n\t}[];\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ICliCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICliCommand.js","sourceRoot":"","sources":["../../../src/models/ICliCommand.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { CliCommandParamType } from \"./cliCommandParamType.js\";\nimport type { ICliCommandDefinition } from \"./ICliCommandDefinition.js\";\n\n/**\n * Command to execute in the CLI.\n */\nexport interface ICliCommand {\n\t/**\n\t * The command to execute.\n\t */\n\tdefinition: ICliCommandDefinition;\n\n\t/**\n\t * The params to execute the command with.\n\t */\n\tparams: { [id: string]: CliCommandParamType };\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ICliCommandDefinition.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICliCommandDefinition.js","sourceRoot":"","sources":["../../../src/models/ICliCommandDefinition.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCore } from \"@twin.org/engine-models\";\nimport type { CliCommandParamType } from \"./cliCommandParamType.js\";\nimport type { ICliCommandDefinitionParam } from \"./ICliCommandDefinitionParam.js\";\nimport type { INodeEnvironmentVariables } from \"./INodeEnvironmentVariables.js\";\n\n/**\n * Command to execute in the CLI.\n */\nexport interface ICliCommandDefinition {\n\t/**\n\t * The command name.\n\t */\n\tcommand: string;\n\n\t/**\n\t * The command description.\n\t */\n\tdescription: string;\n\n\t/**\n\t * The example.\n\t */\n\texample: string;\n\n\t/**\n\t * The params available for the command.\n\t */\n\tparams: ICliCommandDefinitionParam[];\n\n\t/**\n\t * The method to execute for the command.\n\t */\n\taction: (\n\t\tengineCore: IEngineCore,\n\t\tenvVars: INodeEnvironmentVariables,\n\t\tparams: { [id: string]: CliCommandParamType }\n\t) => Promise<unknown>;\n\n\t/**\n\t * Indicates whether the engine needs to be started before executing the command.\n\t * @default true\n\t */\n\trequiresEngineStarted?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the node identity to be set if configured to use.\n\t * @default true\n\t */\n\trequiresNodeIdentity?: boolean;\n\n\t/**\n\t * Indicates whether the engine needs the tenant id to be set if configured to use.\n\t * @default true\n\t */\n\trequiresTenantId?: boolean;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ICliCommandDefinitionParam.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICliCommandDefinitionParam.js","sourceRoot":"","sources":["../../../src/models/ICliCommandDefinitionParam.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { CliCommandParamType } from \"./cliCommandParamType.js\";\n\n/**\n * Command param to execute in the CLI.\n */\nexport interface ICliCommandDefinitionParam {\n\t/**\n\t * The param key.\n\t */\n\tkey: string;\n\n\t/**\n\t * The param type.\n\t */\n\ttype: \"string\" | \"number\" | \"boolean\";\n\n\t/**\n\t * Possible options for the param.\n\t */\n\toptions?: string[];\n\n\t/**\n\t * The extended type e.g. hex etc.\n\t */\n\textendedType?: string;\n\n\t/**\n\t * Whether the param is required.\n\t * @default true\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * The default value of the param.\n\t */\n\tdefaultValue?: CliCommandParamType;\n\n\t/**\n\t * The param description.\n\t */\n\tdescription: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IEngineEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEngineEnvironmentVariables.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The engine core environment variables.\n */\nexport interface IEngineEnvironmentVariables {\n\t/**\n\t * Start the engine in debug mode.\n\t */\n\tdebug?: string;\n\n\t/**\n\t * The root directory for storing items like state file.\n\t */\n\tstorageFileRoot?: string;\n\n\t/**\n\t * The name of the state file.\n\t */\n\tstateFilename?: string;\n\n\t/**\n\t * Is multi-tenant support enabled, defaults to false.\n\t */\n\ttenantEnabled?: string;\n\n\t/**\n\t * A tenant id to use as a default for the node.\n\t */\n\ttenantId?: string;\n\n\t/**\n\t * A tenant api key to use as a default for the node.\n\t */\n\ttenantApiKey?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql\n\t */\n\tentityStorageConnectorType?: string;\n\n\t/**\n\t * The default entity storage connector to use, defaults to the first one in the list.\n\t */\n\tentityStorageConnectorDefault?: string;\n\n\t/**\n\t * A prefix for all the table in entity-storage, can be empty.\n\t */\n\tentityStorageTablePrefix?: string;\n\n\t/**\n\t * AWS DynamoDB auth mode, either credentials or pod.\n\t */\n\tawsDynamodbAuthMode?: string;\n\n\t/**\n\t * AWS Dynamo DB access key id.\n\t */\n\tawsDynamodbAccessKeyId?: string;\n\n\t/**\n\t * AWS Dynamo DB Endpoint if running local instance.\n\t */\n\tawsDynamodbEndpoint?: string;\n\n\t/**\n\t * AWS Dynamo DB region.\n\t */\n\tawsDynamodbRegion?: string;\n\n\t/**\n\t * AWS Dynamo DB secret access key.\n\t */\n\tawsDynamodbSecretAccessKey?: string;\n\n\t/**\n\t * Azure Cosmos DB key.\n\t */\n\tazureCosmosdbKey?: string;\n\n\t/**\n\t * Azure Cosmos DB container id.\n\t */\n\tazureCosmosdbContainerId?: string;\n\n\t/**\n\t * Azure Cosmos DB database id.\n\t */\n\tazureCosmosdbDatabaseId?: string;\n\n\t/**\n\t * Azure Cosmos DB endpoint.\n\t */\n\tazureCosmosdbEndpoint?: string;\n\n\t/**\n\t * GCP Firestore collection name.\n\t */\n\tgcpFirestoreCollectionName?: string;\n\n\t/**\n\t * GCP Firestore credentials.\n\t */\n\tgcpFirestoreCredentials?: string;\n\n\t/**\n\t * GCP Firestore database id.\n\t */\n\tgcpFirestoreDatabaseId?: string;\n\n\t/**\n\t * GCP Firestore endpoint.\n\t */\n\tgcpFirestoreApiEndpoint?: string;\n\n\t/**\n\t * GCP Firestore project id.\n\t */\n\tgcpFirestoreProjectId?: string;\n\n\t/**\n\t * ScyllaDB hosts as comma separated string.\n\t */\n\tscylladbHosts?: string;\n\n\t/**\n\t * ScyllaDB keyspace.\n\t */\n\tscylladbKeyspace?: string;\n\n\t/**\n\t * ScyllaDB local data center.\n\t */\n\tscylladbLocalDataCenter?: string;\n\n\t/**\n\t * ScyllaDB port.\n\t */\n\tscylladbPort?: string;\n\n\t/**\n\t * MySQL host.\n\t */\n\tmySqlHost?: string;\n\n\t/**\n\t * MySQL port.\n\t */\n\tmySqlPort?: number;\n\n\t/**\n\t * MySQL username.\n\t */\n\tmySqlUser?: string;\n\n\t/**\n\t * MySQL password.\n\t */\n\tmySqlPassword?: string;\n\n\t/**\n\t * MySQL Database.\n\t */\n\tmySqlDatabase?: string;\n\n\t/**\n\t * MongoDB host.\n\t */\n\tmongoDbHost?: string;\n\n\t/**\n\t * MongoDB port.\n\t */\n\tmongoDbPort?: number;\n\n\t/**\n\t * MongoDB username.\n\t */\n\tmongoDbUser?: string;\n\n\t/**\n\t * MongoDB password.\n\t */\n\tmongoDbPassword?: string;\n\n\t/**\n\t * MongoDB Database.\n\t */\n\tmongoDbDatabase?: string;\n\n\t/**\n\t * PostgreSQl host.\n\t */\n\tpostgreSqlHost?: string;\n\n\t/**\n\t * PostgreSQl port.\n\t */\n\tpostgreSqlPort?: number;\n\n\t/**\n\t * PostgreSQl username.\n\t */\n\tpostgreSqlUser?: string;\n\n\t/**\n\t * PostgreSQl password.\n\t */\n\tpostgreSqlPassword?: string;\n\n\t/**\n\t * PostgreSQl Database.\n\t */\n\tpostgreSqlDatabase?: string;\n\n\t/**\n\t * The security token for accessing IPFS API.\n\t */\n\tipfsBearerToken?: string;\n\n\t/**\n\t * The url for accessing IPFS API.\n\t */\n\tipfsApiUrl?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.\n\t */\n\tblobStorageConnectorType?: string;\n\n\t/**\n\t * The default blob storage connector to use, defaults to the first one in the list.\n\t */\n\tblobStorageConnectorDefault?: string;\n\n\t/**\n\t * Blog storage connector which has public access.\n\t */\n\tblobStorageConnectorPublic?: string;\n\n\t/**\n\t * Enable encryption for the blob storage.\n\t */\n\tblobStorageEnableEncryption?: string;\n\n\t/**\n\t * The id of the encryption key for the blob storage.\n\t */\n\tblobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * A symmetric encryption key for the blob storage, should be ChaCha20Poly1305 in base64 format.\n\t * If encryption is enabled but a key is not provided one will be generated.\n\t */\n\tblobStorageSymmetricEncryptionKey?: string;\n\n\t/**\n\t * A prefix for all the blobs in blob-storage, can be empty.\n\t */\n\tblobStoragePrefix?: string;\n\n\t/**\n\t * AWS S3 region.\n\t */\n\tawsS3Region?: string;\n\n\t/**\n\t * AWS S3 bucket name.\n\t */\n\tawsS3BucketName?: string;\n\n\t/**\n\t * AWS S3 auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsS3AuthMode?: string;\n\n\t/**\n\t * AWS S3 access key id.\n\t */\n\tawsS3AccessKeyId?: string;\n\n\t/**\n\t * AWS S3 secret access key.\n\t */\n\tawsS3SecretAccessKey?: string;\n\n\t/**\n\t * AWS S3 endpoint.\n\t */\n\tawsS3Endpoint?: string;\n\n\t/**\n\t * Azure Storage account key.\n\t */\n\tazureStorageAccountKey?: string;\n\n\t/**\n\t * Azure Storage account name.\n\t */\n\tazureStorageAccountName?: string;\n\n\t/**\n\t * Azure Storage container.\n\t */\n\tazureStorageContainerName?: string;\n\n\t/**\n\t * Azure Storage endpoint.\n\t */\n\tazureStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage bucket.\n\t */\n\tgcpStorageBucketName?: string;\n\n\t/**\n\t * GCP Storage credentials.\n\t */\n\tgcpStorageCredentials?: string;\n\n\t/**\n\t * GCP Storage endpoint.\n\t */\n\tgcpStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage project id.\n\t */\n\tgcpStorageProjectId?: string;\n\n\t/**\n\t * The type of the default vault connector: entity-storage, hashicorp.\n\t */\n\tvaultConnector?: string;\n\n\t/**\n\t * Hashicorp Vault token.\n\t */\n\thashicorpVaultToken?: string;\n\n\t/**\n\t * Hashicorp Vault endpoint.\n\t */\n\thashicorpVaultEndpoint?: string;\n\n\t/**\n\t * The type of logging task connector, can be a comma separated list: console, entity-storage.\n\t */\n\tloggingConnector?: string;\n\n\t/**\n\t * The type of background task connector: entity-storage.\n\t */\n\tbackgroundTaskConnector?: string;\n\n\t/**\n\t * The type of event bus connector: local.\n\t */\n\teventBusConnector?: string;\n\n\t/**\n\t * The type of event bus component: service.\n\t */\n\teventBusComponent?: string;\n\n\t/**\n\t * Are the messaging components enabled, defaults to false.\n\t */\n\tmessagingEnabled?: string;\n\n\t/**\n\t * AWS SES region.\n\t */\n\tawsSesRegion?: string;\n\n\t/**\n\t * AWS SES auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsSesAuthMode?: string;\n\n\t/**\n\t * AWS SES secret access key.\n\t */\n\tawsSesSecretAccessKey?: string;\n\n\t/**\n\t * AWS SES access key id.\n\t */\n\tawsSesAccessKeyId?: string;\n\n\t/**\n\t * AWS SES endpoint.\n\t */\n\tawsSesEndpoint?: string;\n\n\t/**\n\t * The applications for the push notifications JSON stringified array of IAwsApplicationSettings.\n\t */\n\tawsMessagingPushNotificationApplications?: string;\n\n\t/**\n\t * The type of messaging email connector: entity-storage, aws.\n\t */\n\tmessagingEmailConnector?: string;\n\n\t/**\n\t * The type of messaging sms connector: entity-storage, aws.\n\t */\n\tmessagingSmsConnector?: string;\n\n\t/**\n\t * The type of messaging push notification connector: entity-storage, aws.\n\t */\n\tmessagingPushNotificationConnector?: string;\n\n\t/**\n\t * The type of telemetry connector: entity-storage.\n\t */\n\ttelemetryConnector?: string;\n\n\t/**\n\t * The type of faucet connector: entity-storage, iota.\n\t */\n\tfaucetConnector?: string;\n\n\t/**\n\t * The type of wallet connector: entity-storage, iota.\n\t */\n\twalletConnector?: string;\n\n\t/**\n\t * The type of NFT connector: entity-storage, iota.\n\t */\n\tnftConnector?: string;\n\n\t/**\n\t * The type of identity connector: entity-storage, iota.\n\t */\n\tidentityConnector?: string;\n\n\t/**\n\t * The type of identity resolver connector: entity-storage, iota.\n\t */\n\tidentityResolverConnector?: string;\n\n\t/**\n\t * The type of verifiable storage connector: entity-storage, iota.\n\t */\n\tverifiableStorageConnector?: string;\n\n\t/**\n\t * IOTA Faucet Endpoint.\n\t */\n\tiotaFaucetEndpoint?: string;\n\n\t/**\n\t * IOTA Node Endpoint.\n\t */\n\tiotaNodeEndpoint?: string;\n\n\t/**\n\t * IOTA network.\n\t */\n\tiotaNetwork?: string;\n\n\t/**\n\t * IOTA coin type.\n\t */\n\tiotaCoinType?: string;\n\n\t/**\n\t * IOTA Explorer Endpoint.\n\t */\n\tiotaExplorerEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Endpoint.\n\t */\n\tiotaGasStationEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Authentication Token.\n\t */\n\tiotaGasStationAuthToken?: string;\n\n\t/**\n\t * Universal Resolver Endpoint.\n\t */\n\tuniversalResolverEndpoint?: string;\n\n\t/**\n\t * The type of identity profile connector: entity-storage.\n\t */\n\tidentityProfileConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with immutable proofs.\n\t */\n\timmutableProofVerificationMethodId?: string;\n\n\t/**\n\t * The type of attestation connector: entity-storage, iota.\n\t */\n\tattestationConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with attestation.\n\t */\n\tattestationVerificationMethodId?: string;\n\n\t/**\n\t * Is the data processing enabled, defaults to false.\n\t */\n\tdataProcessingEnabled?: string;\n\n\t/**\n\t * The type of the default data converters, can be a comma separated list: json, xml.\n\t */\n\tdataConverterConnectors?: string;\n\n\t/**\n\t * The type of the default data extractor, can be a comma separated list: json-path.\n\t */\n\tdataExtractorConnectors?: string;\n\n\t/**\n\t * Is the auditable item graph enabled, defaults to false.\n\t */\n\tauditableItemGraphEnabled?: string;\n\n\t/**\n\t * Is the auditable item stream enabled, defaults to false.\n\t */\n\tauditableItemStreamEnabled?: string;\n\n\t/**\n\t * Is the document management enabled, defaults to false.\n\t */\n\tdocumentManagementEnabled?: string;\n\n\t/**\n\t * Is the synchronised storage enabled, defaults to false.\n\t */\n\tsynchronisedStorageEnabled?: string;\n\n\t/**\n\t * Url which points to the api for a trusted synchronised storage node, not required if this is a trusted node.\n\t */\n\tsynchronisedStorageTrustedUrl?: string;\n\n\t/**\n\t * The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.\n\t * This only required if using a custom verifiable storage item, otherwise it will default to the network name.\n\t */\n\tsynchronisedStorageVerifiableStorageKeyId?: string;\n\n\t/**\n\t * The key from the vault which is used to encrypt the synchronised storage blobs.\n\t * Only required for trusted nodes, as regular nodes will request from the trusted nodes.\n\t * Defaults to synchronised-storage-blob-encryption\n\t */\n\tsynchronisedStorageBlobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * The key used for blob encryption, should be ChaCha20Poly1305 encoded as base64.\n\t * Only required for trusted nodes, as regular nodes will not write encrypted data.\n\t */\n\tsynchronisedStorageBlobStorageKey?: string;\n\n\t/**\n\t * How often to check for entity updates in minutes.\n\t * @default 5\n\t */\n\tsynchronisedStorageEntityUpdateIntervalMinutes?: string;\n\n\t/**\n\t * Interval to perform consolidation of changesets, only used if this is a trusted node.\n\t * @default 60\n\t */\n\tsynchronisedStorageConsolidationIntervalMinutes?: string;\n\n\t/**\n\t * The number of entities to process in a single consolidation batch, only used if this is a trusted node.\n\t * @default 1000\n\t */\n\tsynchronisedStorageConsolidationBatchSize?: string;\n\n\t/**\n\t * The maximum number of consolidations to keep in storage, only used if this is a trusted node.\n\t * @default 5\n\t */\n\tsynchronisedStorageMaxConsolidations?: string;\n\n\t/**\n\t * Is the federated catalogue enabled, defaults to false.\n\t */\n\tfederatedCatalogueEnabled?: string;\n\n\t/**\n\t * Federated catalog TTL for the cache.\n\t */\n\tfederatedCatalogueCacheTtlMs?: number;\n\n\t/**\n\t * Federated catalog clearing house approver list, stringified array of DIDs.\n\t */\n\tfederatedCatalogueClearingHouseApproverList?: string;\n\n\t/**\n\t * Is the rights management enabled, defaults to false.\n\t */\n\trightsManagementEnabled?: string;\n\n\t/**\n\t * What is the base callback url for rights management negotiations e.g. https://my-node/rights-management.\n\t */\n\trightsManagementBaseCallbackUrl?: string;\n\n\t/**\n\t * The rights management configuration which includes the information sources modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementInformationSources?: string;\n\n\t/**\n\t * The rights management configuration which includes the negotiator modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementNegotiators?: string;\n\n\t/**\n\t * The rights management configuration which includes the requester modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementRequesters?: string;\n\n\t/**\n\t * The rights management configuration which includes the execution actions modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementExecutionActions?: string;\n\n\t/**\n\t * The rights management configuration which includes the enforcement processor modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementEnforcementProcessors?: string;\n\n\t/**\n\t * The rights management configuration which includes the arbiter modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementArbiters?: string;\n\n\t/**\n\t * The rights management configuration which includes the offer modules to load.\n\t * Use the @json: prefix to specify the path to the JSON configuration file.\n\t */\n\trightsManagementOffers?: string;\n\n\t/**\n\t * Is the task scheduler enabled, defaults to false.\n\t */\n\ttaskSchedulerEnabled?: string;\n\n\t/**\n\t * Is the data space connector enabled, defaults to false.\n\t */\n\tdataSpaceConnectorEnabled?: string;\n\n\t/**\n\t * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.\n\t * @default 10\n\t */\n\tdataSpaceConnectorRetainActivityLogsFor?: string;\n\n\t/**\n\t * The interval for cleaning up the activity logs.\n\t * @default 60\n\t */\n\tdataSpaceConnectorActivityLogsCleanUpInterval?: string;\n\n\t/**\n\t * Enable verifiable credential authentication for the API.\n\t */\n\tvcAuthenticationEnabled?: string;\n\n\t/**\n\t * Verifiable credential assertion for node to node communication.\n\t * Defaults to node-authentication-assertion.\n\t */\n\tvcAuthenticationVerificationMethodId?: string;\n\n\t/**\n\t * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.\n\t */\n\textensions?: string;\n}\n"]}
1
+ {"version":3,"file":"IEngineEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEngineEnvironmentVariables.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The engine core environment variables.\n */\nexport interface IEngineEnvironmentVariables {\n\t/**\n\t * Start the engine in debug mode.\n\t */\n\tdebug?: string;\n\n\t/**\n\t * Start the engine in silent mode.\n\t */\n\tsilent?: string;\n\n\t/**\n\t * The root directory for storing items like state file.\n\t */\n\tstorageFileRoot?: string;\n\n\t/**\n\t * The name of the state file.\n\t */\n\tstateFilename?: string;\n\n\t/**\n\t * Does the node have a unique ID, defaults to true.\n\t */\n\tnodeIdentityEnabled?: string;\n\n\t/**\n\t * Is multi-tenant support enabled, defaults to false.\n\t */\n\ttenantEnabled?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: file, memory, aws-dynamodb, azure-cosmosdb, gcp-firestoredb, scylladb, mysql, mongodb, postgresql\n\t */\n\tentityStorageConnectorType?: string;\n\n\t/**\n\t * The default entity storage connector to use, defaults to the first one in the list.\n\t */\n\tentityStorageConnectorDefault?: string;\n\n\t/**\n\t * A prefix for all the table in entity-storage, can be empty.\n\t */\n\tentityStorageTablePrefix?: string;\n\n\t/**\n\t * AWS DynamoDB auth mode, either credentials or pod.\n\t */\n\tawsDynamodbAuthMode?: string;\n\n\t/**\n\t * AWS Dynamo DB access key id.\n\t */\n\tawsDynamodbAccessKeyId?: string;\n\n\t/**\n\t * AWS Dynamo DB Endpoint if running local instance.\n\t */\n\tawsDynamodbEndpoint?: string;\n\n\t/**\n\t * AWS Dynamo DB region.\n\t */\n\tawsDynamodbRegion?: string;\n\n\t/**\n\t * AWS Dynamo DB secret access key.\n\t */\n\tawsDynamodbSecretAccessKey?: string;\n\n\t/**\n\t * AWS Dynamo DB connection timeout.\n\t */\n\tawsDynamodbConnectionTimeoutMs?: string;\n\n\t/**\n\t * Azure Cosmos DB key.\n\t */\n\tazureCosmosdbKey?: string;\n\n\t/**\n\t * Azure Cosmos DB container id.\n\t */\n\tazureCosmosdbContainerId?: string;\n\n\t/**\n\t * Azure Cosmos DB database id.\n\t */\n\tazureCosmosdbDatabaseId?: string;\n\n\t/**\n\t * Azure Cosmos DB endpoint.\n\t */\n\tazureCosmosdbEndpoint?: string;\n\n\t/**\n\t * GCP Firestore collection name.\n\t */\n\tgcpFirestoreCollectionName?: string;\n\n\t/**\n\t * GCP Firestore credentials.\n\t */\n\tgcpFirestoreCredentials?: string;\n\n\t/**\n\t * GCP Firestore database id.\n\t */\n\tgcpFirestoreDatabaseId?: string;\n\n\t/**\n\t * GCP Firestore endpoint.\n\t */\n\tgcpFirestoreApiEndpoint?: string;\n\n\t/**\n\t * GCP Firestore project id.\n\t */\n\tgcpFirestoreProjectId?: string;\n\n\t/**\n\t * ScyllaDB hosts as comma separated string.\n\t */\n\tscylladbHosts?: string;\n\n\t/**\n\t * ScyllaDB keyspace.\n\t */\n\tscylladbKeyspace?: string;\n\n\t/**\n\t * ScyllaDB local data center.\n\t */\n\tscylladbLocalDataCenter?: string;\n\n\t/**\n\t * ScyllaDB port.\n\t */\n\tscylladbPort?: string;\n\n\t/**\n\t * MySQL host.\n\t */\n\tmySqlHost?: string;\n\n\t/**\n\t * MySQL port.\n\t */\n\tmySqlPort?: number;\n\n\t/**\n\t * MySQL username.\n\t */\n\tmySqlUser?: string;\n\n\t/**\n\t * MySQL password.\n\t */\n\tmySqlPassword?: string;\n\n\t/**\n\t * MySQL Database.\n\t */\n\tmySqlDatabase?: string;\n\n\t/**\n\t * MongoDB host.\n\t */\n\tmongoDbHost?: string;\n\n\t/**\n\t * MongoDB port.\n\t */\n\tmongoDbPort?: number;\n\n\t/**\n\t * MongoDB username.\n\t */\n\tmongoDbUser?: string;\n\n\t/**\n\t * MongoDB password.\n\t */\n\tmongoDbPassword?: string;\n\n\t/**\n\t * MongoDB Database.\n\t */\n\tmongoDbDatabase?: string;\n\n\t/**\n\t * PostgreSQl host.\n\t */\n\tpostgreSqlHost?: string;\n\n\t/**\n\t * PostgreSQl port.\n\t */\n\tpostgreSqlPort?: number;\n\n\t/**\n\t * PostgreSQl username.\n\t */\n\tpostgreSqlUser?: string;\n\n\t/**\n\t * PostgreSQl password.\n\t */\n\tpostgreSqlPassword?: string;\n\n\t/**\n\t * PostgreSQl Database.\n\t */\n\tpostgreSqlDatabase?: string;\n\n\t/**\n\t * The security token for accessing IPFS API.\n\t */\n\tipfsBearerToken?: string;\n\n\t/**\n\t * The url for accessing IPFS API.\n\t */\n\tipfsApiUrl?: string;\n\n\t/**\n\t * The type of the entity storage to create, comma separate for more than one connector.\n\t * values: memory, file, ipfs, aws-s3, azure-storage, gcp-storage.\n\t */\n\tblobStorageConnectorType?: string;\n\n\t/**\n\t * The default blob storage connector to use, defaults to the first one in the list.\n\t */\n\tblobStorageConnectorDefault?: string;\n\n\t/**\n\t * Blog storage connector which has public access.\n\t */\n\tblobStorageConnectorPublic?: string;\n\n\t/**\n\t * Enable encryption for the blob storage.\n\t */\n\tblobStorageEnableEncryption?: string;\n\n\t/**\n\t * The id of the encryption key for the blob storage.\n\t */\n\tblobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * A prefix for all the blobs in blob-storage, can be empty.\n\t */\n\tblobStoragePrefix?: string;\n\n\t/**\n\t * AWS S3 region.\n\t */\n\tawsS3Region?: string;\n\n\t/**\n\t * AWS S3 bucket name.\n\t */\n\tawsS3BucketName?: string;\n\n\t/**\n\t * AWS S3 auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsS3AuthMode?: string;\n\n\t/**\n\t * AWS S3 access key id.\n\t */\n\tawsS3AccessKeyId?: string;\n\n\t/**\n\t * AWS S3 secret access key.\n\t */\n\tawsS3SecretAccessKey?: string;\n\n\t/**\n\t * AWS S3 endpoint.\n\t */\n\tawsS3Endpoint?: string;\n\n\t/**\n\t * Azure Storage account key.\n\t */\n\tazureStorageAccountKey?: string;\n\n\t/**\n\t * Azure Storage account name.\n\t */\n\tazureStorageAccountName?: string;\n\n\t/**\n\t * Azure Storage container.\n\t */\n\tazureStorageContainerName?: string;\n\n\t/**\n\t * Azure Storage endpoint.\n\t */\n\tazureStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage bucket.\n\t */\n\tgcpStorageBucketName?: string;\n\n\t/**\n\t * GCP Storage credentials.\n\t */\n\tgcpStorageCredentials?: string;\n\n\t/**\n\t * GCP Storage endpoint.\n\t */\n\tgcpStorageEndpoint?: string;\n\n\t/**\n\t * GCP Storage project id.\n\t */\n\tgcpStorageProjectId?: string;\n\n\t/**\n\t * The type of the default vault connector: entity-storage, hashicorp.\n\t */\n\tvaultConnector?: string;\n\n\t/**\n\t * Hashicorp Vault token.\n\t */\n\thashicorpVaultToken?: string;\n\n\t/**\n\t * Hashicorp Vault endpoint.\n\t */\n\thashicorpVaultEndpoint?: string;\n\n\t/**\n\t * The type of logging task connector, can be a comma separated list: console, entity-storage.\n\t */\n\tloggingConnector?: string;\n\n\t/**\n\t * The type of event bus connector: local.\n\t */\n\teventBusConnector?: string;\n\n\t/**\n\t * The type of event bus component: service.\n\t */\n\teventBusComponent?: string;\n\n\t/**\n\t * Are the messaging components enabled, defaults to false.\n\t */\n\tmessagingEnabled?: string;\n\n\t/**\n\t * AWS SES region.\n\t */\n\tawsSesRegion?: string;\n\n\t/**\n\t * AWS SES auth mode, either credentials or pod, defaults to credentials.\n\t */\n\tawsSesAuthMode?: string;\n\n\t/**\n\t * AWS SES secret access key.\n\t */\n\tawsSesSecretAccessKey?: string;\n\n\t/**\n\t * AWS SES access key id.\n\t */\n\tawsSesAccessKeyId?: string;\n\n\t/**\n\t * AWS SES endpoint.\n\t */\n\tawsSesEndpoint?: string;\n\n\t/**\n\t * The applications for the push notifications JSON stringified array of IAwsApplicationSettings.\n\t */\n\tawsMessagingPushNotificationApplications?: string;\n\n\t/**\n\t * The type of messaging email connector: entity-storage, aws.\n\t */\n\tmessagingEmailConnector?: string;\n\n\t/**\n\t * The type of messaging sms connector: entity-storage, aws.\n\t */\n\tmessagingSmsConnector?: string;\n\n\t/**\n\t * The type of messaging push notification connector: entity-storage, aws.\n\t */\n\tmessagingPushNotificationConnector?: string;\n\n\t/**\n\t * The type of telemetry connector: entity-storage.\n\t */\n\ttelemetryConnector?: string;\n\n\t/**\n\t * The type of faucet connector: entity-storage, iota.\n\t */\n\tfaucetConnector?: string;\n\n\t/**\n\t * The type of wallet connector: entity-storage, iota.\n\t */\n\twalletConnector?: string;\n\n\t/**\n\t * The type of NFT connector: entity-storage, iota.\n\t */\n\tnftConnector?: string;\n\n\t/**\n\t * The type of identity connector: entity-storage, iota.\n\t */\n\tidentityConnector?: string;\n\n\t/**\n\t * The index of the wallet address to use, defaults to 0.\n\t */\n\tidentityWalletAddressIndex?: string;\n\n\t/**\n\t * The type of identity resolver connector: entity-storage, iota.\n\t */\n\tidentityResolverConnector?: string;\n\n\t/**\n\t * The type of verifiable storage connector: entity-storage, iota.\n\t */\n\tverifiableStorageConnector?: string;\n\n\t/**\n\t * IOTA Faucet Endpoint.\n\t */\n\tiotaFaucetEndpoint?: string;\n\n\t/**\n\t * IOTA Node Endpoint.\n\t */\n\tiotaNodeEndpoint?: string;\n\n\t/**\n\t * IOTA network.\n\t */\n\tiotaNetwork?: string;\n\n\t/**\n\t * IOTA coin type.\n\t */\n\tiotaCoinType?: string;\n\n\t/**\n\t * IOTA Explorer Endpoint.\n\t */\n\tiotaExplorerEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Endpoint.\n\t */\n\tiotaGasStationEndpoint?: string;\n\n\t/**\n\t * IOTA Gas Station Authentication Token.\n\t */\n\tiotaGasStationAuthToken?: string;\n\n\t/**\n\t * Universal Resolver Endpoint.\n\t */\n\tuniversalResolverEndpoint?: string;\n\n\t/**\n\t * The type of identity profile connector: entity-storage.\n\t */\n\tidentityProfileConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with immutable proofs.\n\t */\n\timmutableProofVerificationMethodId?: string;\n\n\t/**\n\t * The type of attestation connector: entity-storage, iota.\n\t */\n\tattestationConnector?: string;\n\n\t/**\n\t * The identity verification method id to use with attestation.\n\t */\n\tattestationVerificationMethodId?: string;\n\n\t/**\n\t * Is the data processing enabled, defaults to false.\n\t */\n\tdataProcessingEnabled?: string;\n\n\t/**\n\t * The type of the default data converters, can be a comma separated list: json, xml.\n\t */\n\tdataConverterConnectors?: string;\n\n\t/**\n\t * The type of the default data extractor, can be a comma separated list: json-path.\n\t */\n\tdataExtractorConnectors?: string;\n\n\t/**\n\t * Is the auditable item graph enabled, defaults to false.\n\t */\n\tauditableItemGraphEnabled?: string;\n\n\t/**\n\t * Is the auditable item stream enabled, defaults to false.\n\t */\n\tauditableItemStreamEnabled?: string;\n\n\t/**\n\t * Is the document management enabled, defaults to false.\n\t */\n\tdocumentManagementEnabled?: string;\n\n\t/**\n\t * Is the synchronised storage enabled, defaults to false.\n\t */\n\tsynchronisedStorageEnabled?: string;\n\n\t/**\n\t * Url which points to the api for a trusted synchronised storage node, not required if this is a trusted node.\n\t */\n\tsynchronisedStorageTrustedUrl?: string;\n\n\t/**\n\t * The key for the smart contract which contains the verifiable storage pointer store for synchronised storage.\n\t * This only required if using a custom verifiable storage item, otherwise it will default to the network name.\n\t */\n\tsynchronisedStorageVerifiableStorageKeyId?: string;\n\n\t/**\n\t * The key from the vault which is used to encrypt the synchronised storage blobs.\n\t * Only required for trusted nodes, as regular nodes will request from the trusted nodes.\n\t * Defaults to synchronised-storage-blob-encryption\n\t */\n\tsynchronisedStorageBlobStorageEncryptionKeyId?: string;\n\n\t/**\n\t * The key used for blob encryption, should be ChaCha20Poly1305 encoded as base64.\n\t * Only required for trusted nodes, as regular nodes will not write encrypted data.\n\t */\n\tsynchronisedStorageBlobStorageKey?: string;\n\n\t/**\n\t * How often to check for entity updates in minutes.\n\t * @default 5\n\t */\n\tsynchronisedStorageEntityUpdateIntervalMinutes?: string;\n\n\t/**\n\t * Interval to perform consolidation of changesets, only used if this is a trusted node.\n\t * @default 60\n\t */\n\tsynchronisedStorageConsolidationIntervalMinutes?: string;\n\n\t/**\n\t * The number of entities to process in a single consolidation batch, only used if this is a trusted node.\n\t * @default 1000\n\t */\n\tsynchronisedStorageConsolidationBatchSize?: string;\n\n\t/**\n\t * The maximum number of consolidations to keep in storage, only used if this is a trusted node.\n\t * @default 5\n\t */\n\tsynchronisedStorageMaxConsolidations?: string;\n\n\t/**\n\t * Is the federated catalogue enabled, defaults to false.\n\t */\n\tfederatedCatalogueEnabled?: string;\n\n\t/**\n\t * Federated catalog filters, command separated list of filters to add.\n\t */\n\tfederatedCatalogueFilters?: string;\n\n\t/**\n\t * Is the trust management enabled, defaults to false.\n\t */\n\ttrustEnabled?: string;\n\n\t/**\n\t * The trust generators to add to the factory, comma separated list.\n\t */\n\ttrustGenerators?: string;\n\n\t/**\n\t * The trust verifiers to add to the factory, comma separated list.\n\t */\n\ttrustVerifiers?: string;\n\n\t/**\n\t * The verification method to use for trust identities.\n\t * Defaults to node-authentication-assertion.\n\t */\n\ttrustVerificationMethodId?: string;\n\n\t/**\n\t * Is the rights management enabled, defaults to false.\n\t */\n\trightsManagementEnabled?: string;\n\n\t/**\n\t * What is the base callback url for rights management negotiations e.g. https://my-node/rights-management.\n\t */\n\trightsManagementBaseCallbackUrl?: string;\n\n\t/**\n\t * The rights management policy information sources to add to the factory.\n\t */\n\trightsManagementPolicyInformationSources?: string;\n\n\t/**\n\t * The rights management policy negotiators sources to add to the factory.\n\t */\n\trightsManagementPolicyNegotiators?: string;\n\n\t/**\n\t * The rights management policy requesters to add to the factory.\n\t */\n\trightsManagementPolicyRequesters?: string;\n\n\t/**\n\t * The rights management policy execution actions to add to the factory.\n\t */\n\trightsManagementPolicyExecutionActions?: string;\n\n\t/**\n\t * The rights management policy enforcement processors to add to the factory.\n\t */\n\trightsManagementPolicyEnforcementProcessors?: string;\n\n\t/**\n\t * The rights management policy arbiters to add to the factory.\n\t */\n\trightsManagementPolicyArbiters?: string;\n\n\t/**\n\t * The rights management data access handlers to add to the factory.\n\t */\n\trightsManagementDataAccessHandlers?: string;\n\n\t/**\n\t * Are background tasks enabled, defaults to false.\n\t */\n\tbackgroundTasksEnabled?: string;\n\n\t/**\n\t * Is the task scheduler enabled, defaults to false.\n\t */\n\ttaskSchedulerEnabled?: string;\n\n\t/**\n\t * Is the data space connector enabled, defaults to false.\n\t */\n\tdataSpaceConnectorEnabled?: string;\n\n\t/**\n\t * The length of time to retain the activity logs for in minutes, set to -1 to keep forever.\n\t * @default 10\n\t */\n\tdataSpaceConnectorRetainActivityLogsFor?: string;\n\n\t/**\n\t * The interval for cleaning up the activity logs.\n\t * @default 60\n\t */\n\tdataSpaceConnectorActivityLogsCleanUpInterval?: string;\n\n\t/**\n\t * Enable verifiable credential authentication for the API.\n\t */\n\tvcAuthenticationEnabled?: string;\n\n\t/**\n\t * Verifiable credential assertion for node to node communication.\n\t * Defaults to node-authentication-assertion.\n\t */\n\tvcAuthenticationVerificationMethodId?: string;\n\n\t/**\n\t * A comma separated list of additional node extensions to load, the initialiseExtension method will be called for each extension.\n\t */\n\textensions?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"INodeEngineState.js","sourceRoot":"","sources":["../../../src/models/INodeEngineState.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineState } from \"@twin.org/engine-models\";\n\n/**\n * The engine state for the node.\n */\nexport interface INodeEngineState extends IEngineState {\n\t/**\n\t * The identity for the node.\n\t */\n\tnodeId?: string;\n\n\t/**\n\t * The tenant id for the node.\n\t */\n\tnodeTenantId?: string;\n\n\t/**\n\t * The identity for the organization.\n\t */\n\tnodeOrganizationId?: string;\n\n\t/**\n\t * The identity for the admin user.\n\t */\n\tnodeAdminUserId?: string;\n}\n"]}
1
+ {"version":3,"file":"INodeEngineState.js","sourceRoot":"","sources":["../../../src/models/INodeEngineState.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineState } from \"@twin.org/engine-models\";\n\n/**\n * The engine state for the node.\n */\nexport interface INodeEngineState extends IEngineState {\n\t/**\n\t * The identity for the node.\n\t */\n\tnodeId?: string;\n\n\t/**\n\t * The tenant id for the node.\n\t */\n\tnodeTenantId?: string;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"INodeEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/INodeEnvironmentVariables.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineServerEnvironmentVariables } from \"./IEngineServerEnvironmentVariables.js\";\n\n/**\n * The environment variables for the node.\n */\nexport interface INodeEnvironmentVariables extends IEngineServerEnvironmentVariables {\n\t/**\n\t * The features that are enabled on the node.\n\t * @default []\n\t */\n\tfeatures?: string;\n\n\t/**\n\t * The identity of the node which, if empty and node-identity feature is enabled it will be generated.\n\t */\n\tnodeIdentity?: string;\n\n\t/**\n\t * The mnemonic for the identity, if empty and node-identity feature is enabled it will be randomly generated.\n\t */\n\tnodeMnemonic?: string;\n\n\t/**\n\t * If the node-admin-user feature is enabled, this will be the organization of the user, if one is not provided it will be generated\n\t */\n\torganizationIdentity?: string;\n\n\t/**\n\t * The mnemonic for the organization, if empty and node-admin-user feature is enabled it will be randomly generated.\n\t */\n\torganizationMnemonic?: string;\n\n\t/**\n\t * If the node-admin-user feature is enabled, this will be the identity of the user, if one is not provided it will be generated\n\t */\n\tadminUserIdentity?: string;\n\n\t/**\n\t * The mnemonic for the admin user, if empty and node-admin-user feature is enabled it will be randomly generated.\n\t */\n\tadminUserMnemonic?: string;\n\n\t/**\n\t * If the node-admin-user feature is enabled, this will be the name of the user.\n\t * @default admin@node\n\t */\n\tadminUserName?: string;\n\n\t/**\n\t * If the node-admin-user feature is enabled, this will be the password of the user, if empty it will be randomly generated.\n\t */\n\tadminUserPassword?: string;\n\n\t/**\n\t * Maximum size in MB for HTTPS extensions downloads.\n\t * @default 10\n\t */\n\textensionsMaxSizeMb?: number;\n\n\t/**\n\t * Whether to clear the extensions cache on startup.\n\t * @default false\n\t */\n\textensionsClearCache?: boolean;\n\n\t/**\n\t * Custom directory for extensions cache storage.\n\t * @default \".tmp\"\n\t */\n\textensionsCacheDirectory?: string;\n\n\t/**\n\t * TTL in hours for HTTPS extensions cache.\n\t * @default 24\n\t */\n\textensionsCacheTtlHours?: number;\n\n\t/**\n\t * Force refresh of all cached extensions.\n\t * @default false\n\t */\n\textensionsForceRefresh?: boolean;\n}\n"]}
1
+ {"version":3,"file":"INodeEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/INodeEnvironmentVariables.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineServerEnvironmentVariables } from \"./IEngineServerEnvironmentVariables.js\";\n\n/**\n * The environment variables for the node.\n */\nexport interface INodeEnvironmentVariables extends IEngineServerEnvironmentVariables {\n\t/**\n\t * Maximum size in MB for HTTPS extensions downloads.\n\t * @default 10\n\t */\n\textensionsMaxSizeMb?: number;\n\n\t/**\n\t * Whether to clear the extensions cache on startup.\n\t * @default false\n\t */\n\textensionsClearCache?: boolean;\n\n\t/**\n\t * Custom directory for extensions cache storage.\n\t * @default \".tmp\"\n\t */\n\textensionsCacheDirectory?: string;\n\n\t/**\n\t * TTL in hours for HTTPS extensions cache.\n\t * @default 24\n\t */\n\textensionsCacheTtlHours?: number;\n\n\t/**\n\t * Force refresh of all cached extensions.\n\t * @default false\n\t */\n\textensionsForceRefresh?: boolean;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2026 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=cliCommandParamType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cliCommandParamType.js","sourceRoot":"","sources":["../../../src/models/cliCommandParamType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2026 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Type for the properties in commands.\n */\nexport type CliCommandParamType = string | number | boolean;\n"]}