@twin.org/node-core 0.0.3-next.2 → 0.0.3-next.21

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 (151) hide show
  1. package/dist/es/builders/engineEnvBuilder.js +168 -105
  2. package/dist/es/builders/engineEnvBuilder.js.map +1 -1
  3. package/dist/es/builders/engineServerEnvBuilder.js +49 -25
  4. package/dist/es/builders/engineServerEnvBuilder.js.map +1 -1
  5. package/dist/es/cli.js +247 -0
  6. package/dist/es/cli.js.map +1 -0
  7. package/dist/es/commands/bootstrapLegacy.js +183 -0
  8. package/dist/es/commands/bootstrapLegacy.js.map +1 -0
  9. package/dist/es/commands/help.js +85 -0
  10. package/dist/es/commands/help.js.map +1 -0
  11. package/dist/es/commands/identityCreate.js +316 -0
  12. package/dist/es/commands/identityCreate.js.map +1 -0
  13. package/dist/es/commands/identityImports.js +82 -0
  14. package/dist/es/commands/identityImports.js.map +1 -0
  15. package/dist/es/commands/identityVerifiableCredentialCreate.js +146 -0
  16. package/dist/es/commands/identityVerifiableCredentialCreate.js.map +1 -0
  17. package/dist/es/commands/identityVerificationMethodCreate.js +214 -0
  18. package/dist/es/commands/identityVerificationMethodCreate.js.map +1 -0
  19. package/dist/es/commands/identityVerificationMethodImport.js +126 -0
  20. package/dist/es/commands/identityVerificationMethodImport.js.map +1 -0
  21. package/dist/es/commands/nodeSetIdentity.js +64 -0
  22. package/dist/es/commands/nodeSetIdentity.js.map +1 -0
  23. package/dist/es/commands/nodeSetTenant.js +68 -0
  24. package/dist/es/commands/nodeSetTenant.js.map +1 -0
  25. package/dist/es/commands/tenantCreate.js +139 -0
  26. package/dist/es/commands/tenantCreate.js.map +1 -0
  27. package/dist/es/commands/tenantImport.js +97 -0
  28. package/dist/es/commands/tenantImport.js.map +1 -0
  29. package/dist/es/commands/tenantUpdate.js +94 -0
  30. package/dist/es/commands/tenantUpdate.js.map +1 -0
  31. package/dist/es/commands/userCreate.js +212 -0
  32. package/dist/es/commands/userCreate.js.map +1 -0
  33. package/dist/es/commands/userUpdate.js +132 -0
  34. package/dist/es/commands/userUpdate.js.map +1 -0
  35. package/dist/es/commands/vaultKeyCreate.js +191 -0
  36. package/dist/es/commands/vaultKeyCreate.js.map +1 -0
  37. package/dist/es/commands/vaultKeyImport.js +104 -0
  38. package/dist/es/commands/vaultKeyImport.js.map +1 -0
  39. package/dist/es/defaults.js +19 -1
  40. package/dist/es/defaults.js.map +1 -1
  41. package/dist/es/index.js +7 -3
  42. package/dist/es/index.js.map +1 -1
  43. package/dist/es/models/ICliArgs.js +4 -0
  44. package/dist/es/models/ICliArgs.js.map +1 -0
  45. package/dist/es/models/ICliCommand.js +2 -0
  46. package/dist/es/models/ICliCommand.js.map +1 -0
  47. package/dist/es/models/ICliCommandDefinition.js +2 -0
  48. package/dist/es/models/ICliCommandDefinition.js.map +1 -0
  49. package/dist/es/models/ICliCommandDefinitionParam.js +2 -0
  50. package/dist/es/models/ICliCommandDefinitionParam.js.map +1 -0
  51. package/dist/es/models/IEngineEnvironmentVariables.js.map +1 -1
  52. package/dist/es/models/IEngineServerEnvironmentVariables.js.map +1 -1
  53. package/dist/es/models/INodeEngineState.js.map +1 -1
  54. package/dist/es/models/INodeEnvironmentVariables.js.map +1 -1
  55. package/dist/es/models/INodeOptions.js.map +1 -1
  56. package/dist/es/models/cliCommandParamType.js +4 -0
  57. package/dist/es/models/cliCommandParamType.js.map +1 -0
  58. package/dist/es/node.js +78 -41
  59. package/dist/es/node.js.map +1 -1
  60. package/dist/es/start.js +139 -0
  61. package/dist/es/start.js.map +1 -0
  62. package/dist/es/utils.js +11 -21
  63. package/dist/es/utils.js.map +1 -1
  64. package/dist/types/builders/engineEnvBuilder.d.ts +4 -1
  65. package/dist/types/builders/engineServerEnvBuilder.d.ts +5 -2
  66. package/dist/types/cli.d.ts +56 -0
  67. package/dist/types/commands/bootstrapLegacy.d.ts +66 -0
  68. package/dist/types/commands/help.d.ts +23 -0
  69. package/dist/types/commands/identityCreate.d.ts +39 -0
  70. package/dist/types/commands/identityImports.d.ts +24 -0
  71. package/dist/types/commands/identityVerifiableCredentialCreate.d.ts +43 -0
  72. package/dist/types/commands/identityVerificationMethodCreate.d.ts +47 -0
  73. package/dist/types/commands/identityVerificationMethodImport.d.ts +31 -0
  74. package/dist/types/commands/nodeSetIdentity.d.ts +22 -0
  75. package/dist/types/commands/nodeSetTenant.d.ts +22 -0
  76. package/dist/types/commands/tenantCreate.d.ts +38 -0
  77. package/dist/types/commands/tenantImport.d.ts +26 -0
  78. package/dist/types/commands/tenantUpdate.d.ts +26 -0
  79. package/dist/types/commands/userCreate.d.ts +49 -0
  80. package/dist/types/commands/userUpdate.d.ts +38 -0
  81. package/dist/types/commands/vaultKeyCreate.d.ts +43 -0
  82. package/dist/types/commands/vaultKeyImport.d.ts +28 -0
  83. package/dist/types/defaults.d.ts +11 -1
  84. package/dist/types/index.d.ts +7 -3
  85. package/dist/types/models/ICliArgs.d.ts +20 -0
  86. package/dist/types/models/ICliCommand.d.ts +17 -0
  87. package/dist/types/models/ICliCommandDefinition.d.ts +46 -0
  88. package/dist/types/models/ICliCommandDefinitionParam.d.ts +35 -0
  89. package/dist/types/models/IEngineEnvironmentVariables.d.ts +62 -53
  90. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +4 -0
  91. package/dist/types/models/INodeEngineState.d.ts +0 -8
  92. package/dist/types/models/INodeEnvironmentVariables.d.ts +0 -38
  93. package/dist/types/models/INodeOptions.d.ts +6 -2
  94. package/dist/types/models/cliCommandParamType.d.ts +4 -0
  95. package/dist/types/node.d.ts +8 -4
  96. package/dist/types/{server.d.ts → start.d.ts} +7 -2
  97. package/dist/types/utils.d.ts +6 -8
  98. package/docs/changelog.md +136 -0
  99. package/docs/reference/functions/buildConfiguration.md +3 -3
  100. package/docs/reference/functions/buildEngineConfiguration.md +1 -1
  101. package/docs/reference/functions/buildEngineServerConfiguration.md +3 -3
  102. package/docs/reference/functions/constructCliCommand.md +27 -0
  103. package/docs/reference/functions/executeCommand.md +29 -0
  104. package/docs/reference/functions/getEnvDefaults.md +19 -0
  105. package/docs/reference/functions/getScriptDirectory.md +19 -0
  106. package/docs/reference/functions/parseCommandLineArgs.md +19 -0
  107. package/docs/reference/functions/processEnvOptions.md +27 -0
  108. package/docs/reference/functions/registerCommands.md +9 -0
  109. package/docs/reference/functions/run.md +8 -2
  110. package/docs/reference/functions/start.md +10 -4
  111. package/docs/reference/functions/substituteEnvOptions.md +25 -0
  112. package/docs/reference/index.md +16 -13
  113. package/docs/reference/interfaces/ICliArgs.md +35 -0
  114. package/docs/reference/interfaces/ICliCommand.md +23 -0
  115. package/docs/reference/interfaces/ICliCommandDefinition.md +101 -0
  116. package/docs/reference/interfaces/ICliCommandDefinitionParam.md +65 -0
  117. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +110 -85
  118. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +166 -117
  119. package/docs/reference/interfaces/INodeEngineState.md +0 -16
  120. package/docs/reference/interfaces/INodeEnvironmentVariables.md +170 -201
  121. package/docs/reference/interfaces/INodeOptions.md +10 -2
  122. package/docs/reference/type-aliases/CliCommandParamType.md +5 -0
  123. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_DID.md +3 -0
  124. package/docs/reference/variables/CONTEXT_ID_HANDLER_FEATURE_TENANT.md +3 -0
  125. package/docs/reference/variables/TRUST_VERIFICATION_METHOD_ID.md +3 -0
  126. package/locales/en.json +589 -30
  127. package/package.json +3 -1
  128. package/dist/es/bootstrap.js +0 -374
  129. package/dist/es/bootstrap.js.map +0 -1
  130. package/dist/es/identity.js +0 -169
  131. package/dist/es/identity.js.map +0 -1
  132. package/dist/es/models/nodeFeatures.js +0 -21
  133. package/dist/es/models/nodeFeatures.js.map +0 -1
  134. package/dist/es/server.js +0 -78
  135. package/dist/es/server.js.map +0 -1
  136. package/dist/types/bootstrap.d.ts +0 -76
  137. package/dist/types/identity.d.ts +0 -14
  138. package/dist/types/models/nodeFeatures.d.ts +0 -21
  139. package/docs/reference/functions/bootstrap.md +0 -29
  140. package/docs/reference/functions/bootstrapAuth.md +0 -35
  141. package/docs/reference/functions/bootstrapBlobEncryption.md +0 -35
  142. package/docs/reference/functions/bootstrapContextIdHandlers.md +0 -35
  143. package/docs/reference/functions/bootstrapImmutableProofMethod.md +0 -35
  144. package/docs/reference/functions/bootstrapNodeAdminUser.md +0 -35
  145. package/docs/reference/functions/bootstrapNodeId.md +0 -35
  146. package/docs/reference/functions/bootstrapSynchronisedStorage.md +0 -35
  147. package/docs/reference/functions/bootstrapTenantId.md +0 -35
  148. package/docs/reference/functions/getFeatures.md +0 -19
  149. package/docs/reference/type-aliases/NodeFeatures.md +0 -5
  150. package/docs/reference/variables/NodeFeatures.md +0 -25
  151. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +0 -3
package/locales/en.json CHANGED
@@ -1,42 +1,60 @@
1
1
  {
2
2
  "error": {
3
3
  "node": {
4
+ "nodeIdentityNotSet": "The node identity is enabled in config but is not set, please set it using the \"node-set-identity\" CLI command.",
5
+ "nodeTenantNotSet": "Multi-tenancy is enabled but node tenant is not set, please set it using the \"node-set-tenant\" CLI command.",
4
6
  "storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file",
5
7
  "extensionLoadingError": "Failed to load extension \"{extension}\"",
6
8
  "insecureProtocol": "Cannot load extension from insecure protocol: {protocol}. Only HTTPS is allowed for remote extensions.",
7
9
  "extensionDownloadFailed": "Failed to download extension from {url}",
8
10
  "extensionNpmInstallFailed": "Failed to install npm extension: {package}",
9
- "extensionSizeLimitExceeded": "Extension download size exceeds limit: {size} bytes > {limit} bytes"
11
+ "extensionSizeLimitExceeded": "Extension download size exceeds limit: {size} bytes > {limit} bytes",
12
+ "cliCommandMissing": "CLI command \"{command}\" is not recognised",
13
+ "cliCommandParamMissing": "Parameter \"{param}\" is required for command \"{command}\"",
14
+ "cliCommandParamExtra": "Parameter(s) \"{params}\" are not recognised for command \"{command}\"",
15
+ "cliEnvVarMissing": "Environment variable \"{envVar}\" does not exist",
16
+ "invalidPublicOrigin": "The public origin \"{publicOrigin}\" is not a valid origin URL, it should be in the format \"protocol://host[:port]\"."
17
+ },
18
+ "bootstrapLegacy": {
19
+ "noFeaturesEnabled": "No features are enabled in legacy bootstrap mode, at least one feature must be enabled."
20
+ },
21
+ "identityCreate": {
22
+ "invalidMnemonic": "The mnemonic is invalid, it should be 24 words from the standard wordlist."
23
+ },
24
+ "identityImport": {
25
+ "identityNotFound": "The identity was not found, it must be created on-chain already.",
26
+ "invalidMnemonic": "The mnemonic is invalid, it should be 24 words from the standard wordlist."
27
+ },
28
+ "identityVerificationMethodCreate": {
29
+ "verificationMethodAlreadyExists": "The verification method with ID already exists and overwriteMode is set to \"error\"."
30
+ },
31
+ "identityVerifiableCredentialCreate": {
32
+ "subjectJsonLoadFailed": "Failed to load subject JSON from file: \"{subjectFilename}\""
33
+ },
34
+ "tenantCreate": {
35
+ "tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
36
+ },
37
+ "tenantImport": {
38
+ "tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
39
+ },
40
+ "tenantUpdate": {
41
+ "tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
42
+ },
43
+ "userCreate": {
44
+ "passwordTooShort": "The password provided is too short, it must be at least {minLength} characters long.",
45
+ "userAlreadyExists": "The user with ID already exists and overwriteMode is set to \"error\"."
46
+ },
47
+ "vaultKeyCreate": {
48
+ "vaultKeyAlreadyExists": "The vault key with ID already exists and overwriteMode is set to \"error\"."
49
+ },
50
+ "nodeSetTenant": {
51
+ "tenantAdminComponentNotRegistered": "Multi-tenant support must be enabled to use this command."
52
+ },
53
+ "nodeSetIdentity": {
54
+ "identityNotFound": "The identity with DID \"{notFoundId}\" was not found in the system."
10
55
  }
11
56
  },
12
57
  "node": {
13
- "generatingMnemonic": "Generating mnemonic \"{mnemonic}\"",
14
- "storingMnemonic": "Storing mnemonic",
15
- "existingMnemonic": "Mnemonic already exists",
16
- "fundingWallet": "Funding wallet \"{address}\"",
17
- "fundedWallet": "Wallet already funded",
18
- "processingIdentity": "Processing identity of type \"{identityType}\"",
19
- "generatingIdentity": "Generating identity of type \"{identityType}\"",
20
- "existingIdentity": "Identity already exists \"{identity}\"",
21
- "createdIdentity": "Identity created \"{identity}\"",
22
- "identityExplorer": "Identity explorer \"{url}\"",
23
- "creatingUser": "Creating user \"{email}\"",
24
- "existingUser": "User already exists \"{email}\"",
25
- "creatingAuthKey": "Creating authentication key \"{keyName}\"",
26
- "existingAuthKey": "Authentication key already exists \"{keyName}\"",
27
- "addingVerificationMethod": "Adding {title} verification method \"{methodId}\"",
28
- "existingVerificationMethod": "Verification method for {title} already exists \"{methodId}\"",
29
- "addingBlobEncryptionKey": "Adding blob encryption key \"{keyName}\"",
30
- "creatingBlobEncryptionKey": "Creating blob encryption key \"{keyName}\"",
31
- "createdBlobEncryptionKey": "Created blob encryption key \"{keyName}\" with value \"{keyValue}\"",
32
- "existingBlobEncryptionKey": "Blob encryption key already exists \"{keyName}\"",
33
- "addingSynchronisedStorageBlobEncryptionKey": "Adding synchronised storage blob encryption key \"{keyName}\"",
34
- "existingSynchronisedStorageBlobEncryptionKey": "Synchronised storage blob encryption key already exists \"{keyName}\"",
35
- "creatingUserProfile": "Creating user profile \"{identity}\"",
36
- "existingUserProfile": "User profile already exists \"{identity}\"",
37
- "nodeId": "Node identity \"{identity}\"",
38
- "nodeAdminUserEmail": "Node Admin User Email \"{email}\"",
39
- "nodeAdminUserPassword": "Node Admin User Password \"{password}\"",
40
58
  "extensionLoading": "Loading Extension",
41
59
  "extensionInitialisingEngine": "Initialising engine for extension \"{extension}\"",
42
60
  "extensionInitialisingEngineServer": "Initialising engine server for extension \"{extension}\"",
@@ -48,7 +66,548 @@
48
66
  "extensionHttpsDownloading": "Downloading HTTPS extension",
49
67
  "extensionCacheExpired": "Cache expired for extension: {url}",
50
68
  "extensionForceRefresh": "Force refresh enabled for extension: {url}",
51
- "createdTenantId": "Created tenant id \"{identity}\" with api key \"{apiKey}\"",
52
- "existingTenantId": "Existing tenant id \"{identity}\""
69
+ "cli": {
70
+ "commands": {
71
+ "command": "Command",
72
+ "help": {
73
+ "description": "Display help information about CLI commands",
74
+ "labels": {
75
+ "commands": "All the commands available are listed below, for more information use the --help option with a specific command.",
76
+ "example": "Example",
77
+ "optional": "optional",
78
+ "required": "required",
79
+ "default": "default",
80
+ "options": "options"
81
+ }
82
+ },
83
+ "bootstrap-legacy": {
84
+ "description": "Bootstrap in legacy mode for backwards compatibility, **will be deprecated in future versions**",
85
+ "example": "bootstrap-legacy --load-env=\"./.env.bootstrap-legacy\"",
86
+ "params": {
87
+ "env-prefix": {
88
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
89
+ },
90
+ "load-env": {
91
+ "description": "Comma separated list of paths to .env files to read input parameters from."
92
+ }
93
+ },
94
+ "labels": {
95
+ "nodeIdentityCreate": "Creating node identity",
96
+ "nodeAuthKeyCreate": "Creating node auth key",
97
+ "trustVerificationMethodCreate": "Creating trust verification method for node identity",
98
+ "synchronisedStorageKeyAdd": "Adding synchronised storage key for node identity",
99
+ "nodeIdentitySet": "Setting node identity",
100
+ "nodeTenantCreate": "Creating node tenant",
101
+ "nodeTenantSet": "Setting node tenant",
102
+ "organisationCreate": "Creating organisation identity",
103
+ "blobStorageKeyCreate": "Creating blob storage encryption key for organisation identity",
104
+ "attestationMethodCreate": "Creating attestation method for organisation identity",
105
+ "immutableProofMethodCreate": "Creating immutable proof method for organisation identity",
106
+ "adminIdentityCreate": "Creating admin user identity",
107
+ "adminUserCreate": "Creating admin user"
108
+ }
109
+ },
110
+ "identity-create": {
111
+ "description": "Create an identity",
112
+ "example": "identity-create --mnemonic=\"...\" --fund-wallet=true",
113
+ "params": {
114
+ "env-prefix": {
115
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
116
+ },
117
+ "mnemonic": {
118
+ "description": "The mnemonic phrase to use for the identity. If not provided, a random mnemonic will be generated."
119
+ },
120
+ "identity": {
121
+ "description": "The DID of the identity to create. If not provided, a new DID will be generated."
122
+ },
123
+ "controller": {
124
+ "description": "The controller DID for the identity. If not provided, the identity will be its own controller."
125
+ },
126
+ "fund-wallet": {
127
+ "description": "Whether to fund the wallet associated with the identity from a faucet."
128
+ },
129
+ "load-env": {
130
+ "description": "Comma separated list of paths to .env files to read input parameters from."
131
+ },
132
+ "output-json": {
133
+ "description": "Path to a .json file to store the command output."
134
+ },
135
+ "output-env": {
136
+ "description": "Path to a .env file to store the command output."
137
+ },
138
+ "output-env-prefix": {
139
+ "description": "Prefix to use for variables in the output .env file."
140
+ }
141
+ },
142
+ "labels": {
143
+ "mnemonic": "Mnemonic",
144
+ "processingMnemonic": "Processing mnemonic",
145
+ "readingMnemonic": "Reading mnemonic",
146
+ "storingMnemonic": "Storing mnemonic",
147
+ "existingMnemonic": "Mnemonic already exists",
148
+ "noExistingMnemonic": "No existing mnemonic found",
149
+ "generatingMnemonic": "Generating mnemonic",
150
+ "processingIdentity": "Processing identity",
151
+ "resolvingIdentity": "Resolving identity",
152
+ "existingIdentity": "Identity already exists",
153
+ "noIdentityFound": "No identity found",
154
+ "creatingIdentity": "Creating identity",
155
+ "createdIdentity": "Created identity",
156
+ "fundingWallet": "Funding wallet",
157
+ "addressIndex": "Address Index",
158
+ "addingTokens": "Adding tokens to address \"{address}\"",
159
+ "explorer": "Explorer",
160
+ "walletAddress": "Wallet Address",
161
+ "did": "DID"
162
+ }
163
+ },
164
+ "identity-import": {
165
+ "description": "Import an identity",
166
+ "example": "identity-import --identity=\"did:iota:...\" --mnemonic=\"...\"",
167
+ "params": {
168
+ "env-prefix": {
169
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
170
+ },
171
+ "identity": {
172
+ "description": "The DID of the identity to import."
173
+ },
174
+ "mnemonic": {
175
+ "description": "The mnemonic phrase to use for the identity."
176
+ },
177
+ "load-env": {
178
+ "description": "Comma separated list of paths to .env files to read input parameters from."
179
+ }
180
+ },
181
+ "labels": {
182
+ "resolvingIdentity": "Resolving identity",
183
+ "storingMnemonic": "Storing mnemonic"
184
+ }
185
+ },
186
+ "identity-verifiable-credential-create": {
187
+ "description": "Create a verifiable credential",
188
+ "example": "identity-verifiable-credential-create --identity=\"did:iota:....\" --verification-method-id=\"my-id\" --subject-json=\"./subject.json\"",
189
+ "params": {
190
+ "env-prefix": {
191
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
192
+ },
193
+ "identity": {
194
+ "description": "The DID of the identity to use to create the credential."
195
+ },
196
+ "verification-method-id": {
197
+ "description": "The ID of the verification method to use to create the credential."
198
+ },
199
+ "controller": {
200
+ "description": "The controller DID for the identity. If not provided, the identity will be its own controller."
201
+ },
202
+ "subject-json": {
203
+ "description": "The subject JSON file to load."
204
+ },
205
+ "credential-id": {
206
+ "description": "The id of the verifiable credential."
207
+ },
208
+ "expiration-date": {
209
+ "description": "The expiration date of the verifiable credential."
210
+ },
211
+ "load-env": {
212
+ "description": "Comma separated list of paths to .env files to read input parameters from."
213
+ },
214
+ "output-json": {
215
+ "description": "Path to a .json file to store the command output."
216
+ },
217
+ "output-env": {
218
+ "description": "Path to a .env file to store the command output."
219
+ },
220
+ "output-env-prefix": {
221
+ "description": "Prefix to use for variables in the output .env file."
222
+ }
223
+ },
224
+ "labels": {
225
+ "creating": "Creating verifiable credential",
226
+ "created": "Created verifiable credential",
227
+ "jwtToken": "JWT Token"
228
+ }
229
+ },
230
+ "identity-verification-method-import": {
231
+ "description": "Import an identity verification method",
232
+ "example": "identity-verification-method-import --identity=\"did:iota:....\" --verification-method-type=\"verificationMethod\" --verification-method-id=\"my-key-1\" ----private-key-hex=\"15...a2\"",
233
+ "params": {
234
+ "env-prefix": {
235
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
236
+ },
237
+ "identity": {
238
+ "description": "The DID of the identity to import the verification method to."
239
+ },
240
+ "verification-method-type": {
241
+ "description": "The type of verification method to import."
242
+ },
243
+ "verification-method-id": {
244
+ "description": "The ID of the verification method to import."
245
+ },
246
+ "controller": {
247
+ "description": "The controller DID for the identity. If not provided, the identity will be its own controller."
248
+ },
249
+ "private-key-hex": {
250
+ "description": "The private key in hex format."
251
+ },
252
+ "load-env": {
253
+ "description": "Comma separated list of paths to .env files to read input parameters from."
254
+ }
255
+ },
256
+ "labels": {
257
+ "resolvingIdentity": "Resolving identity",
258
+ "importing": "Importing verification method",
259
+ "imported": "Imported verification method"
260
+ }
261
+ },
262
+ "identity-verification-method-create": {
263
+ "description": "Create an identity verification method",
264
+ "example": "identity-verification-method-create --identity=\"did:iota:....\" --verification-method-type=\"verificationMethod\" --verification-method-id=\"my-key-1\" --controller=\"did:iota:....\"",
265
+ "params": {
266
+ "env-prefix": {
267
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
268
+ },
269
+ "identity": {
270
+ "description": "The DID of the identity to add the verification method to."
271
+ },
272
+ "verification-method-type": {
273
+ "description": "The type of verification method to add."
274
+ },
275
+ "verification-method-id": {
276
+ "description": "The ID of the verification method to add."
277
+ },
278
+ "controller": {
279
+ "description": "The controller DID for the identity. If not provided, the identity will be its own controller."
280
+ },
281
+ "overwrite-mode": {
282
+ "description": "The mode to use when a verification method with the same ID already exists."
283
+ },
284
+ "load-env": {
285
+ "description": "Comma separated list of paths to .env files to read input parameters from."
286
+ },
287
+ "output-json": {
288
+ "description": "Path to a .json file to store the command output."
289
+ },
290
+ "output-env": {
291
+ "description": "Path to a .env file to store the command output."
292
+ },
293
+ "output-env-prefix": {
294
+ "description": "Prefix to use for variables in the output .env file."
295
+ }
296
+ },
297
+ "labels": {
298
+ "resolvingIdentity": "Resolving identity",
299
+ "skipping": "The verification method with ID already exists, skipping creation",
300
+ "creatingVerificationMethod": "Creating verification method",
301
+ "createdVerificationMethod": "Created verification method",
302
+ "verificationMethodId": "Verification Method ID",
303
+ "verificationMethodType": "Verification Method Type",
304
+ "kid": "Key Id",
305
+ "privateKeyBase64Url": "Private Key Base64Url",
306
+ "publicKeyBase64Url": "Public Key Base64Url",
307
+ "privateKeyBase64": "Private Key Base64",
308
+ "publicKeyBase64": "Public Key Base64",
309
+ "privateKeyHex": "Private Key Hex",
310
+ "publicKeyHex": "Public Key Hex"
311
+ }
312
+ },
313
+ "node-set-identity": {
314
+ "description": "Set the node identity",
315
+ "example": "node-set-identity --identity=\"did:iota...\"",
316
+ "params": {
317
+ "env-prefix": {
318
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
319
+ },
320
+ "identity": {
321
+ "description": "The identity to set in the node."
322
+ },
323
+ "load-env": {
324
+ "description": "Comma separated list of paths to .env files to read input parameters from."
325
+ }
326
+ },
327
+ "labels": {
328
+ "resolvingIdentity": "Resolving identity",
329
+ "stored": "The node identity has been stored"
330
+ }
331
+ },
332
+ "tenant-create": {
333
+ "description": "Create a tenant with associated api key",
334
+ "example": "tenant-create --tenant-id=\"0011..aabb\" --api-key=\"aabb..0099\" --label=\"My Tenant\" --public-origin=\"https://example.com:1234\"",
335
+ "params": {
336
+ "env-prefix": {
337
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
338
+ },
339
+ "tenant-id": {
340
+ "description": "The tenant ID to add. If not provided a random tenant id will be generated."
341
+ },
342
+ "api-key": {
343
+ "description": "The API key to associate with the tenant id. If not provided, a random key will be generated."
344
+ },
345
+ "label": {
346
+ "description": "A descriptive label for the tenant."
347
+ },
348
+ "public-origin": {
349
+ "description": "The public URL origin for the tenant e.g. https://example.com:1234"
350
+ },
351
+ "load-env": {
352
+ "description": "Comma separated list of paths to .env files to read input parameters from."
353
+ },
354
+ "output-json": {
355
+ "description": "Path to a .json file to store the command output."
356
+ },
357
+ "output-env": {
358
+ "description": "Path to a .env file to store the command output."
359
+ },
360
+ "output-env-prefix": {
361
+ "description": "Prefix to use for variables in the output .env file."
362
+ }
363
+ },
364
+ "labels": {
365
+ "creating": "Creating tenant",
366
+ "tenantId": "Tenant ID",
367
+ "apiKey": "API Key",
368
+ "label": "Label",
369
+ "publicOrigin": "Public Origin"
370
+ }
371
+ },
372
+ "tenant-import": {
373
+ "description": "Import a tenant with associated api key",
374
+ "example": "tenant-import --tenant-id=\"0011..aabb\" --api-key=\"aabb..0099\" --label=\"My Tenant\" --public-origin=\"https://example.com:1234\"",
375
+ "params": {
376
+ "env-prefix": {
377
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
378
+ },
379
+ "tenant-id": {
380
+ "description": "The tenant ID to import."
381
+ },
382
+ "api-key": {
383
+ "description": "The API key to associate with the tenant id."
384
+ },
385
+ "label": {
386
+ "description": "A descriptive label for the tenant."
387
+ },
388
+ "public-origin": {
389
+ "description": "The public URL origin for the tenant e.g. https://example.com:1234"
390
+ },
391
+ "load-env": {
392
+ "description": "Comma separated list of paths to .env files to read input parameters from."
393
+ }
394
+ },
395
+ "labels": {
396
+ "importing": "Importing tenant",
397
+ "imported": "Imported tenant"
398
+ }
399
+ },
400
+ "tenant-update": {
401
+ "description": "Update a tenant with associated api key",
402
+ "example": "tenant-update --tenant-id=\"0011..aabb\" --api-key=\"aabb..0099\" --label=\"My Tenant\" --public-origin=\"https://example.com:1234\"",
403
+ "params": {
404
+ "env-prefix": {
405
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
406
+ },
407
+ "tenant-id": {
408
+ "description": "The tenant ID to update."
409
+ },
410
+ "api-key": {
411
+ "description": "The API key to associate with the tenant id."
412
+ },
413
+ "label": {
414
+ "description": "A descriptive label for the tenant."
415
+ },
416
+ "public-origin": {
417
+ "description": "The public URL origin for the tenant e.g. https://example.com:1234"
418
+ },
419
+ "load-env": {
420
+ "description": "Comma separated list of paths to .env files to read input parameters from."
421
+ }
422
+ },
423
+ "labels": {
424
+ "updating": "Updating tenant",
425
+ "updated": "Updated tenant"
426
+ }
427
+ },
428
+ "node-set-tenant": {
429
+ "description": "Set the node tenant",
430
+ "example": "node-set-tenant --tenant-id=\"0011..aabb\"",
431
+ "params": {
432
+ "env-prefix": {
433
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
434
+ },
435
+ "tenant-id": {
436
+ "description": "The tenant ID to add. If not provided a random tenant id will be generated."
437
+ },
438
+ "load-env": {
439
+ "description": "Comma separated list of paths to .env files to read input parameters from."
440
+ }
441
+ },
442
+ "labels": {
443
+ "stored": "The tenant id has been stored"
444
+ }
445
+ },
446
+ "user-create": {
447
+ "description": "Create a user",
448
+ "example": "user-create --user-identity=\"did:iota:....\" --organization-identity=\"did:iota:....\" --email=\"bob@examples.com\" --password=\"pass1234\" --scope=\"tenant-admin\" --givenName=\"Bob\" --familyName=\"Smith\"",
449
+ "params": {
450
+ "env-prefix": {
451
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
452
+ },
453
+ "user-identity": {
454
+ "description": "The DID to associate the user with."
455
+ },
456
+ "organization-identity": {
457
+ "description": "The organization DID to associate the user with."
458
+ },
459
+ "email": {
460
+ "description": "The email address of the user."
461
+ },
462
+ "password": {
463
+ "description": "The password for the user."
464
+ },
465
+ "scope": {
466
+ "description": "List of scopes to associate with the user, comma separated."
467
+ },
468
+ "given-name": {
469
+ "description": "The given name of the user."
470
+ },
471
+ "family-name": {
472
+ "description": "The family name of the user."
473
+ },
474
+ "overwrite-mode": {
475
+ "description": "The mode to use when a user with the same identity already exists."
476
+ },
477
+ "load-env": {
478
+ "description": "Comma separated list of paths to .env files to read input parameters from."
479
+ },
480
+ "output-json": {
481
+ "description": "Path to a .json file to store the command output."
482
+ },
483
+ "output-env": {
484
+ "description": "Path to a .env file to store the command output."
485
+ },
486
+ "output-env-prefix": {
487
+ "description": "Prefix to use for variables in the output .env file."
488
+ }
489
+ },
490
+ "labels": {
491
+ "creating": "Creating user",
492
+ "storingUser": "Storing user",
493
+ "storingProfile": "Storing profile",
494
+ "userCreated": "User created",
495
+ "skipping": "The user with ID already exists, skipping creation",
496
+ "overwriting": "Overwriting existing user with ID",
497
+ "email": "Email",
498
+ "password": "Password"
499
+ }
500
+ },
501
+ "user-update": {
502
+ "description": "Update a user",
503
+ "example": "user-update --email=\"bob@examples.com\" --user-identity=\"did:iota:....\" --organization-identity=\"did:iota:....\" --scope=\"tenant-admin\" --givenName=\"Bob\" --familyName=\"Smith\"",
504
+ "params": {
505
+ "env-prefix": {
506
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
507
+ },
508
+ "user-identity": {
509
+ "description": "The DID to associate the user with."
510
+ },
511
+ "organization-identity": {
512
+ "description": "The organization DID to associate the user with."
513
+ },
514
+ "email": {
515
+ "description": "The email address of the user."
516
+ },
517
+ "scope": {
518
+ "description": "List of scopes to associate with the user, comma separated."
519
+ },
520
+ "given-name": {
521
+ "description": "The given name of the user."
522
+ },
523
+ "family-name": {
524
+ "description": "The family name of the user."
525
+ },
526
+ "load-env": {
527
+ "description": "Comma separated list of paths to .env files to read input parameters from."
528
+ }
529
+ },
530
+ "labels": {
531
+ "updating": "Updating user",
532
+ "storingUser": "Storing user",
533
+ "storingProfile": "Storing profile",
534
+ "userUpdated": "User updated"
535
+ }
536
+ },
537
+ "vault-key-create": {
538
+ "description": "Create a vault key for an identity",
539
+ "example": "vault-key-create --identity=\"did:iota:....\" --key-id=\"my-key\" --type=\"Ed25519\"",
540
+ "params": {
541
+ "env-prefix": {
542
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
543
+ },
544
+ "identity": {
545
+ "description": "The DID to associate the key with."
546
+ },
547
+ "key-id": {
548
+ "description": "The ID of the key."
549
+ },
550
+ "key-type": {
551
+ "description": "The type of the key."
552
+ },
553
+ "overwrite-mode": {
554
+ "description": "The mode to use when a key with the same id already exists."
555
+ },
556
+ "load-env": {
557
+ "description": "Comma separated list of paths to .env files to read input parameters from."
558
+ },
559
+ "output-json": {
560
+ "description": "Path to a .json file to store the command output."
561
+ },
562
+ "output-env": {
563
+ "description": "Path to a .env file to store the command output."
564
+ },
565
+ "output-env-prefix": {
566
+ "description": "Prefix to use for variables in the output .env file."
567
+ }
568
+ },
569
+ "labels": {
570
+ "creating": "Creating key",
571
+ "created": "Created key",
572
+ "skipping": "The key with ID already exists, skipping creation",
573
+ "overwriting": "Overwriting existing key with ID",
574
+ "keyId": "Key ID",
575
+ "keyType": "Key Type",
576
+ "privateKeyBase64": "Private Key Base64",
577
+ "publicKeyBase64": "Public Key Base64",
578
+ "privateKeyHex": "Private Key Hex",
579
+ "publicKeyHex": "Public Key Hex"
580
+ }
581
+ },
582
+ "vault-key-import": {
583
+ "description": "Import a vault key for an identity",
584
+ "example": "vault-key-import --identity=\"did:iota:....\" --key-id=\"my-key\" --key-type=Ed25519 --private-key-hex=\"15...a2\"",
585
+ "params": {
586
+ "env-prefix": {
587
+ "description": "Prefix to use for standard .env files e.g. TWIN_."
588
+ },
589
+ "identity": {
590
+ "description": "The DID to associate the key with."
591
+ },
592
+ "key-id": {
593
+ "description": "The ID of the key."
594
+ },
595
+ "key-type": {
596
+ "description": "The type of the key."
597
+ },
598
+ "private-key-hex": {
599
+ "description": "The private key in hex format."
600
+ },
601
+ "load-env": {
602
+ "description": "Comma separated list of paths to .env files to read input parameters from."
603
+ }
604
+ },
605
+ "labels": {
606
+ "importing": "Importing key",
607
+ "imported": "Imported key"
608
+ }
609
+ }
610
+ }
611
+ }
53
612
  }
54
613
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node-core",
3
- "version": "0.0.3-next.2",
3
+ "version": "0.0.3-next.21",
4
4
  "description": "TWIN Node Core for serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,7 +32,9 @@
32
32
  "@twin.org/identity-models": "next",
33
33
  "@twin.org/modules": "next",
34
34
  "@twin.org/rights-management-rest-client": "next",
35
+ "@twin.org/standards-w3c-did": "next",
35
36
  "@twin.org/standards-w3c-odrl": "next",
37
+ "@twin.org/trust-models": "next",
36
38
  "@twin.org/vault-models": "next",
37
39
  "@twin.org/wallet-models": "next",
38
40
  "dotenv": "17.2.3",