@twin.org/node-core 0.0.2-next.9 → 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 (195) hide show
  1. package/README.md +1 -1
  2. package/dist/es/builders/engineEnvBuilder.js +1132 -0
  3. package/dist/es/builders/engineEnvBuilder.js.map +1 -0
  4. package/dist/es/builders/engineServerEnvBuilder.js +206 -0
  5. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -0
  6. package/dist/es/builders/extensionsBuilder.js +109 -0
  7. package/dist/es/builders/extensionsBuilder.js.map +1 -0
  8. package/dist/es/cli.js +255 -0
  9. package/dist/es/cli.js.map +1 -0
  10. package/dist/es/commands/bootstrapLegacy.js +175 -0
  11. package/dist/es/commands/bootstrapLegacy.js.map +1 -0
  12. package/dist/es/commands/help.js +85 -0
  13. package/dist/es/commands/help.js.map +1 -0
  14. package/dist/es/commands/identityCreate.js +310 -0
  15. package/dist/es/commands/identityCreate.js.map +1 -0
  16. package/dist/es/commands/identityImports.js +76 -0
  17. package/dist/es/commands/identityImports.js.map +1 -0
  18. package/dist/es/commands/identityVerifiableCredentialCreate.js +140 -0
  19. package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
  20. package/dist/es/commands/identityVerificationMethodCreate.js +208 -0
  21. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
  22. package/dist/es/commands/identityVerificationMethodImport.js +120 -0
  23. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
  24. package/dist/es/commands/nodeSetIdentity.js +51 -0
  25. package/dist/es/commands/nodeSetIdentity.js.map +1 -0
  26. package/dist/es/commands/nodeSetTenant.js +49 -0
  27. package/dist/es/commands/nodeSetTenant.js.map +1 -0
  28. package/dist/es/commands/tenantCreate.js +120 -0
  29. package/dist/es/commands/tenantCreate.js.map +1 -0
  30. package/dist/es/commands/tenantImport.js +78 -0
  31. package/dist/es/commands/tenantImport.js.map +1 -0
  32. package/dist/es/commands/userCreate.js +197 -0
  33. package/dist/es/commands/userCreate.js.map +1 -0
  34. package/dist/es/commands/vaultKeyCreate.js +185 -0
  35. package/dist/es/commands/vaultKeyCreate.js.map +1 -0
  36. package/dist/es/commands/vaultKeyImport.js +98 -0
  37. package/dist/es/commands/vaultKeyImport.js.map +1 -0
  38. package/dist/es/defaults.js +28 -0
  39. package/dist/es/defaults.js.map +1 -0
  40. package/dist/es/index.js +27 -0
  41. package/dist/es/index.js.map +1 -0
  42. package/dist/es/models/ICacheMetadata.js +4 -0
  43. package/dist/es/models/ICacheMetadata.js.map +1 -0
  44. package/dist/es/models/ICliArgs.js +4 -0
  45. package/dist/es/models/ICliArgs.js.map +1 -0
  46. package/dist/es/models/ICliCommand.js +2 -0
  47. package/dist/es/models/ICliCommand.js.map +1 -0
  48. package/dist/es/models/ICliCommandDefinition.js +2 -0
  49. package/dist/es/models/ICliCommandDefinition.js.map +1 -0
  50. package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
  51. package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
  52. package/dist/es/models/IEngineEnvironmentVariables.js +4 -0
  53. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -0
  54. package/dist/es/models/IEngineServerEnvironmentVariables.js +2 -0
  55. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -0
  56. package/dist/es/models/IModuleProtocol.js +2 -0
  57. package/dist/es/models/IModuleProtocol.js.map +1 -0
  58. package/dist/es/models/INodeEngineConfig.js +2 -0
  59. package/dist/es/models/INodeEngineConfig.js.map +1 -0
  60. package/dist/es/models/INodeEngineState.js +2 -0
  61. package/dist/es/models/INodeEngineState.js.map +1 -0
  62. package/dist/es/models/INodeEnvironmentVariables.js +2 -0
  63. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -0
  64. package/dist/es/models/INodeOptions.js +2 -0
  65. package/dist/es/models/INodeOptions.js.map +1 -0
  66. package/dist/es/models/IProtocolHandlerResult.js +4 -0
  67. package/dist/es/models/IProtocolHandlerResult.js.map +1 -0
  68. package/dist/es/models/cliCommandParamType.js +4 -0
  69. package/dist/es/models/cliCommandParamType.js.map +1 -0
  70. package/dist/es/models/moduleProtocol.js +29 -0
  71. package/dist/es/models/moduleProtocol.js.map +1 -0
  72. package/dist/es/models/nodeExtensionMethods.js +2 -0
  73. package/dist/es/models/nodeExtensionMethods.js.map +1 -0
  74. package/dist/es/node.js +285 -0
  75. package/dist/es/node.js.map +1 -0
  76. package/dist/es/start.js +128 -0
  77. package/dist/es/start.js.map +1 -0
  78. package/dist/es/utils.js +397 -0
  79. package/dist/es/utils.js.map +1 -0
  80. package/dist/types/builders/engineEnvBuilder.d.ts +6 -2
  81. package/dist/types/builders/engineServerEnvBuilder.d.ts +7 -3
  82. package/dist/types/builders/extensionsBuilder.d.ts +32 -0
  83. package/dist/types/cli.d.ts +66 -0
  84. package/dist/types/commands/bootstrapLegacy.d.ts +66 -0
  85. package/dist/types/commands/help.d.ts +23 -0
  86. package/dist/types/commands/identityCreate.d.ts +39 -0
  87. package/dist/types/commands/identityImports.d.ts +24 -0
  88. package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
  89. package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
  90. package/dist/types/commands/identityVerificationMethodImport.d.ts +31 -0
  91. package/dist/types/commands/nodeSetIdentity.d.ts +22 -0
  92. package/dist/types/commands/nodeSetTenant.d.ts +22 -0
  93. package/dist/types/commands/tenantCreate.d.ts +35 -0
  94. package/dist/types/commands/tenantImport.d.ts +24 -0
  95. package/dist/types/commands/userCreate.d.ts +46 -0
  96. package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
  97. package/dist/types/commands/vaultKeyImport.d.ts +28 -0
  98. package/dist/types/defaults.d.ts +16 -0
  99. package/dist/types/index.d.ts +24 -11
  100. package/dist/types/models/ICacheMetadata.d.ts +17 -0
  101. package/dist/types/models/ICliArgs.d.ts +20 -0
  102. package/dist/types/models/ICliCommand.d.ts +17 -0
  103. package/dist/types/models/ICliCommandDefinition.d.ts +46 -0
  104. package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
  105. package/dist/types/models/IEngineEnvironmentVariables.d.ts +154 -37
  106. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +12 -3
  107. package/dist/types/models/IModuleProtocol.d.ts +18 -0
  108. package/dist/types/models/INodeEngineConfig.d.ts +6 -0
  109. package/dist/types/models/INodeEngineState.d.ts +14 -0
  110. package/dist/types/models/INodeEnvironmentVariables.d.ts +17 -15
  111. package/dist/types/models/INodeOptions.d.ts +14 -3
  112. package/dist/types/models/IProtocolHandlerResult.d.ts +13 -0
  113. package/dist/types/models/cliCommandParamType.d.ts +4 -0
  114. package/dist/types/models/moduleProtocol.d.ts +29 -0
  115. package/dist/types/models/nodeExtensionMethods.d.ts +27 -0
  116. package/dist/types/node.d.ts +21 -7
  117. package/dist/types/start.d.ts +25 -0
  118. package/dist/types/utils.d.ts +83 -6
  119. package/docs/changelog.md +241 -0
  120. package/docs/detailed-guide.md +129 -0
  121. package/docs/reference/functions/buildConfiguration.md +2 -2
  122. package/docs/reference/functions/buildEngineConfiguration.md +8 -2
  123. package/docs/reference/functions/buildEngineServerConfiguration.md +9 -3
  124. package/docs/reference/functions/constructCliCommand.md +27 -0
  125. package/docs/reference/functions/createModuleImportUrl.md +21 -0
  126. package/docs/reference/functions/directoryExists.md +19 -0
  127. package/docs/reference/functions/executeCommand.md +29 -0
  128. package/docs/reference/functions/extensionsConfiguration.md +25 -0
  129. package/docs/reference/functions/extensionsInitialiseEngine.md +25 -0
  130. package/docs/reference/functions/extensionsInitialiseEngineServer.md +31 -0
  131. package/docs/reference/functions/getEnvDefaults.md +19 -0
  132. package/docs/reference/functions/getExtensionsCacheDir.md +31 -0
  133. package/docs/reference/functions/getFiles.md +19 -0
  134. package/docs/reference/functions/getSubFolders.md +19 -0
  135. package/docs/reference/functions/handleHttpsProtocol.md +49 -0
  136. package/docs/reference/functions/handleNpmProtocol.md +31 -0
  137. package/docs/reference/functions/hashUrl.md +19 -0
  138. package/docs/reference/functions/initCli.md +27 -0
  139. package/docs/reference/functions/isCacheExpired.md +31 -0
  140. package/docs/reference/functions/overrideModuleImport.md +8 -2
  141. package/docs/reference/functions/parseCommandLineArgs.md +19 -0
  142. package/docs/reference/functions/parseModuleProtocol.md +19 -0
  143. package/docs/reference/functions/processEnvOptions.md +27 -0
  144. package/docs/reference/functions/registerCommands.md +9 -0
  145. package/docs/reference/functions/resolvePackageEntryPoint.md +32 -0
  146. package/docs/reference/functions/run.md +9 -3
  147. package/docs/reference/functions/shutdownExtensions.md +25 -0
  148. package/docs/reference/functions/start.md +17 -5
  149. package/docs/reference/functions/substituteEnvOptions.md +25 -0
  150. package/docs/reference/index.md +47 -10
  151. package/docs/reference/interfaces/ICacheMetadata.md +27 -0
  152. package/docs/reference/interfaces/ICliArgs.md +35 -0
  153. package/docs/reference/interfaces/ICliCommand.md +23 -0
  154. package/docs/reference/interfaces/ICliCommandDefinition.md +101 -0
  155. package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
  156. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +303 -60
  157. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1737 -5
  158. package/docs/reference/interfaces/IModuleProtocol.md +27 -0
  159. package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
  160. package/docs/reference/interfaces/INodeEngineState.md +23 -0
  161. package/docs/reference/interfaces/INodeEnvironmentVariables.md +599 -198
  162. package/docs/reference/interfaces/INodeOptions.md +27 -3
  163. package/docs/reference/interfaces/IProtocolHandlerResult.md +19 -0
  164. package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
  165. package/docs/reference/type-aliases/ModuleProtocol.md +5 -0
  166. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +18 -0
  167. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +24 -0
  168. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +23 -0
  169. package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +10 -0
  170. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +3 -0
  171. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +3 -0
  172. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  173. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +3 -0
  174. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +3 -0
  175. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +3 -0
  176. package/docs/reference/variables/ModuleProtocol.md +37 -0
  177. package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  178. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
  179. package/locales/en.json +479 -28
  180. package/package.json +29 -9
  181. package/dist/cjs/index.cjs +0 -1910
  182. package/dist/esm/index.mjs +0 -1870
  183. package/dist/types/bootstrap.d.ts +0 -59
  184. package/dist/types/models/nodeFeatures.d.ts +0 -21
  185. package/dist/types/server.d.ts +0 -17
  186. package/docs/reference/functions/bootstrap.md +0 -29
  187. package/docs/reference/functions/bootstrapAuth.md +0 -35
  188. package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
  189. package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
  190. package/docs/reference/functions/bootstrapNodeIdentity.md +0 -35
  191. package/docs/reference/functions/bootstrapNodeUser.md +0 -35
  192. package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
  193. package/docs/reference/functions/getFeatures.md +0 -19
  194. package/docs/reference/type-aliases/NodeFeatures.md +0 -5
  195. package/docs/reference/variables/NodeFeatures.md +0 -25
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultKeyCreate.js","sourceRoot":"","sources":["../../../src/commands/vaultKeyCreate.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uC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O,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/vaultKeyIm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AAC;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"]}
@@ -0,0 +1,28 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export const ATTESTATION_VERIFICATION_METHOD_ID = "attestation-assertion";
4
+ export const IMMUTABLE_PROOF_VERIFICATION_METHOD_ID = "immutable-proof-assertion";
5
+ export const BLOB_STORAGE_ENCRYPTION_KEY_ID = "blob-encryption";
6
+ export const SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID = "synchronised-storage-blob-encryption";
7
+ export const VC_AUTHENTICATION_VERIFICATION_METHOD_ID = "vc-authentication-assertion";
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
+ }
28
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +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,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"]}
@@ -0,0 +1,27 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export * from "./builders/engineEnvBuilder.js";
4
+ export * from "./builders/engineServerEnvBuilder.js";
5
+ export * from "./builders/extensionsBuilder.js";
6
+ export * from "./cli.js";
7
+ export * from "./defaults.js";
8
+ export * from "./models/cliCommandParamType.js";
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";
14
+ export * from "./models/IEngineEnvironmentVariables.js";
15
+ export * from "./models/IEngineServerEnvironmentVariables.js";
16
+ export * from "./models/IModuleProtocol.js";
17
+ export * from "./models/INodeEngineConfig.js";
18
+ export * from "./models/INodeEngineState.js";
19
+ export * from "./models/INodeEnvironmentVariables.js";
20
+ export * from "./models/INodeOptions.js";
21
+ export * from "./models/IProtocolHandlerResult.js";
22
+ export * from "./models/moduleProtocol.js";
23
+ export * from "./models/nodeExtensionMethods.js";
24
+ export * from "./node.js";
25
+ export * from "./start.js";
26
+ export * from "./utils.js";
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
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 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=ICacheMetadata.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ICacheMetadata.js","sourceRoot":"","sources":["../../../src/models/ICacheMetadata.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Metadata for cached HTTPS extensions.\n */\nexport interface ICacheMetadata {\n\t/**\n\t * Timestamp when the file was downloaded.\n\t */\n\tdownloadedAt: number;\n\n\t/**\n\t * Original URL of the cached file.\n\t */\n\turl: string;\n\n\t/**\n\t * Size of the cached file in bytes.\n\t */\n\tsize: number;\n}\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"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IEngineEnvironmentVariables.js.map
@@ -0,0 +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 * 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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IEngineServerEnvironmentVariables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEngineServerEnvironmentVariables.js","sourceRoot":"","sources":["../../../src/models/IEngineServerEnvironmentVariables.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineEnvironmentVariables } from \"./IEngineEnvironmentVariables.js\";\n\n/**\n * The engine server environment variables.\n */\nexport interface IEngineServerEnvironmentVariables extends IEngineEnvironmentVariables {\n\t/**\n\t * The port to serve the API from.\n\t */\n\tport?: string;\n\n\t/**\n\t * The host to serve the API from.\n\t */\n\thost?: string;\n\n\t/**\n\t * The CORS origins to allow, defaults to *.\n\t */\n\tcorsOrigins?: string;\n\n\t/**\n\t * The CORS methods to allow, defaults to GET, POST, PUT, DELETE, OPTIONS.\n\t */\n\thttpMethods?: string;\n\n\t/**\n\t * The CORS headers to allow.\n\t */\n\thttpAllowedHeaders?: string;\n\n\t/**\n\t * The CORS headers to expose.\n\t */\n\thttpExposedHeaders?: string;\n\n\t/**\n\t * The type of auth admin processor to use on the API: entity-storage.\n\t */\n\tauthAdminProcessorType?: string;\n\n\t/**\n\t * The type of auth processor to use on the API: entity-storage.\n\t */\n\tauthProcessorType?: string;\n\n\t/**\n\t * The id of the key in the vault to use for signing in auth operations.\n\t */\n\tauthSigningKeyId?: string;\n\n\t/**\n\t * Additional MIME type processors to include, comma separated.\n\t */\n\tmimeTypeProcessors?: string;\n\n\t/**\n\t * Include the body in the REST logging output, useful for debugging.\n\t */\n\trouteLoggingIncludeBody?: string;\n\n\t/**\n\t * Include the full base 64 output in the REST logging output, useful for debugging.\n\t */\n\trouteLoggingFullBase64?: string;\n\n\t/**\n\t * List of properties to obfuscate in the REST logging output, comma separated.\n\t */\n\trouteLoggingObfuscateProperties?: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=IModuleProtocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IModuleProtocol.js","sourceRoot":"","sources":["../../../src/models/IModuleProtocol.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { ModuleProtocol } from \"./moduleProtocol.js\";\n\n/**\n * The parsed module protocol information.\n */\nexport interface IModuleProtocol {\n\t/**\n\t * The protocol type.\n\t */\n\tprotocol: ModuleProtocol;\n\n\t/**\n\t * The identifier after the protocol (or the original if no protocol).\n\t */\n\tidentifier: string;\n\n\t/**\n\t * The original module string.\n\t */\n\toriginal: string;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=INodeEngineConfig.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"INodeEngineConfig.js","sourceRoot":"","sources":["../../../src/models/INodeEngineConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineServerConfig } from \"@twin.org/engine-server-types\";\n\n/**\n * The config for the node.\n */\n// eslint-disable-next-line @typescript-eslint/no-empty-interface\nexport interface INodeEngineConfig extends IEngineServerConfig {}\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=INodeEngineState.js.map
@@ -0,0 +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"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=INodeEnvironmentVariables.js.map
@@ -0,0 +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 * 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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=INodeOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"INodeOptions.js","sourceRoot":"","sources":["../../../src/models/INodeOptions.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCore, IEngineServer, IEngineStateStorage } from \"@twin.org/engine-models\";\nimport type { IEngineConfig } from \"@twin.org/engine-types\";\nimport type { INodeEngineConfig } from \"./INodeEngineConfig.js\";\nimport type { INodeEnvironmentVariables } from \"./INodeEnvironmentVariables.js\";\n\n/**\n * The options when running the node.\n */\nexport interface INodeOptions {\n\t/**\n\t * The name of the server, defaults to \"TWIN Node Server\".\n\t * @default \"TWIN Node Server\"\n\t */\n\tserverName?: string;\n\n\t/**\n\t * The version of the server, defaults to the current version.\n\t */\n\tserverVersion?: string;\n\n\t/**\n\t * Additional environment variables to set.\n\t */\n\tenvVars?: { [key: string]: string };\n\n\t/**\n\t * Additional environment variable filenames to load, defaults to .env.\n\t */\n\tenvFilenames?: string[];\n\n\t/**\n\t * The prefix for environment variables, defaults to \"TWIN_\".\n\t */\n\tenvPrefix?: string;\n\n\t/**\n\t * A list of JSON files to load as configuration files.\n\t * The files will be loaded in the order they are provided, and the last one will\n\t * override any previous values.\n\t */\n\tconfigFilenames?: string[];\n\n\t/**\n\t * Provides the ability to have some initial custom configuration for the engine.\n\t * This will be merged with any configuration loaded from the environment variables.\n\t */\n\tconfig?: IEngineConfig;\n\n\t/**\n\t * The directory to override the execution location, defaults to process directory.\n\t */\n\texecutionDirectory?: string;\n\n\t/**\n\t * The directory to override the locales directory, defaults to the locales directory.\n\t */\n\tlocalesDirectory?: string;\n\n\t/**\n\t * The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.\n\t */\n\topenApiSpecFile?: string;\n\n\t/**\n\t * The path to the favicon, defaults to static/favicon.png.\n\t */\n\tfavIconFile?: string;\n\n\t/**\n\t * Method to extend the engine environment variables with any additional custom configuration.\n\t */\n\textendEnvVars?: (envVars: INodeEnvironmentVariables) => Promise<void>;\n\n\t/**\n\t * Method to extend the engine configuration with any additional custom configuration.\n\t */\n\textendConfig?: (envVars: INodeEnvironmentVariables, config: INodeEngineConfig) => Promise<void>;\n\n\t/**\n\t * Method to extend the engine with any additional options.\n\t */\n\textendEngine?: (engine: IEngineCore) => Promise<void>;\n\n\t/**\n\t * Method to extend the engine server with any additional options.\n\t */\n\textendEngineServer?: (engineServer: IEngineServer) => Promise<void>;\n\n\t/**\n\t * The state storage to use for the engine.\n\t * If not provided, a default file-based state storage will be used.\n\t */\n\tstateStorage?: IEngineStateStorage;\n\n\t/**\n\t * Disables process.exit calls on fatal errors and throws instead.\n\t */\n\tdisableProcessExitOnFailure?: boolean;\n}\n"]}
@@ -0,0 +1,4 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ export {};
4
+ //# sourceMappingURL=IProtocolHandlerResult.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IProtocolHandlerResult.js","sourceRoot":"","sources":["../../../src/models/IProtocolHandlerResult.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The result from a protocol handler.\n */\nexport interface IProtocolHandlerResult {\n\t/**\n\t * The resolved path to the module file.\n\t */\n\tresolvedPath: string;\n\n\t/**\n\t * Whether the module was cached.\n\t */\n\tcached: 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"]}
@@ -0,0 +1,29 @@
1
+ // Copyright 2024 IOTA Stiftung.
2
+ // SPDX-License-Identifier: Apache-2.0.
3
+ /**
4
+ * The protocol types for modules.
5
+ */
6
+ // eslint-disable-next-line @typescript-eslint/naming-convention
7
+ export const ModuleProtocol = {
8
+ /**
9
+ * Local module (starts with . or / or file://).
10
+ */
11
+ Local: "local",
12
+ /**
13
+ * NPM package (starts with npm:).
14
+ */
15
+ Npm: "npm",
16
+ /**
17
+ * HTTPS URL (starts with https://).
18
+ */
19
+ Https: "https",
20
+ /**
21
+ * HTTP URL (starts with http://).
22
+ */
23
+ Http: "http",
24
+ /**
25
+ * Default/standard module resolution.
26
+ */
27
+ Default: "default"
28
+ };
29
+ //# sourceMappingURL=moduleProtocol.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"moduleProtocol.js","sourceRoot":"","sources":["../../../src/models/moduleProtocol.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,cAAc,GAAG;IAC7B;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,GAAG,EAAE,KAAK;IAEV;;OAEG;IACH,KAAK,EAAE,OAAO;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM;IAEZ;;OAEG;IACH,OAAO,EAAE,SAAS;CACT,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * The protocol types for modules.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const ModuleProtocol = {\n\t/**\n\t * Local module (starts with . or / or file://).\n\t */\n\tLocal: \"local\",\n\n\t/**\n\t * NPM package (starts with npm:).\n\t */\n\tNpm: \"npm\",\n\n\t/**\n\t * HTTPS URL (starts with https://).\n\t */\n\tHttps: \"https\",\n\n\t/**\n\t * HTTP URL (starts with http://).\n\t */\n\tHttp: \"http\",\n\n\t/**\n\t * Default/standard module resolution.\n\t */\n\tDefault: \"default\"\n} as const;\n\n/**\n * The protocol type for a module.\n */\nexport type ModuleProtocol = (typeof ModuleProtocol)[keyof typeof ModuleProtocol];\n"]}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=nodeExtensionMethods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodeExtensionMethods.js","sourceRoot":"","sources":["../../../src/models/nodeExtensionMethods.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCore, IEngineServer } from \"@twin.org/engine-models\";\nimport type { INodeEngineConfig } from \"./INodeEngineConfig.js\";\nimport type { INodeEnvironmentVariables } from \"./INodeEnvironmentVariables.js\";\n\n/**\n * The type for the initialise method of an extension module.\n * @param envVars The environment variables for the node.\n * @param nodeEngineConfig The node engine config.\n */\nexport type NodeExtensionInitialiseMethod = (\n\tenvVars: INodeEnvironmentVariables,\n\tnodeEngineConfig: INodeEngineConfig\n) => Promise<void>;\n\n/**\n * The type for the initialise engine method of an extension module.\n * This is called when the engine has been constructed but not yet started.\n * @param engineCore The engine core instance.\n */\nexport type NodeExtensionInitialiseEngineMethod = (engineCore: IEngineCore) => Promise<void>;\n\n/**\n * The type for the initialise engine server method of an extension module.\n * This is called when the engine server has been constructed but not yet started.\n * @param engineCore The engine core instance.\n * @param engineServer The engine server instance.\n */\nexport type NodeExtensionInitialiseEngineServerMethod = (\n\tengineCore: IEngineCore,\n\tengineServer: IEngineServer\n) => Promise<void>;\n\n/**\n * The type for the shutdown method of an extension module.\n * This is called when the engine is shutting down.\n */\nexport type NodeExtensionShutdownMethod = () => Promise<void>;\n"]}