@twin.org/node-core 0.0.2-next.2 → 0.0.2-next.20

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 (52) hide show
  1. package/dist/cjs/index.cjs +863 -391
  2. package/dist/esm/index.mjs +851 -394
  3. package/dist/types/bootstrap.d.ts +9 -9
  4. package/dist/types/builders/engineEnvBuilder.d.ts +1 -1
  5. package/dist/types/builders/engineServerEnvBuilder.d.ts +3 -2
  6. package/dist/types/builders/extensionsBuilder.d.ts +32 -0
  7. package/dist/types/defaults.d.ts +6 -0
  8. package/dist/types/index.d.ts +4 -0
  9. package/dist/types/models/IEngineEnvironmentVariables.d.ts +188 -24
  10. package/dist/types/models/IEngineServerEnvironmentVariables.d.ts +12 -3
  11. package/dist/types/models/INodeEngineConfig.d.ts +6 -0
  12. package/dist/types/models/INodeEnvironmentVariables.d.ts +1 -2
  13. package/dist/types/models/INodeOptions.d.ts +6 -1
  14. package/dist/types/models/nodeExtensionMethods.d.ts +27 -0
  15. package/dist/types/models/nodeFeatures.d.ts +4 -0
  16. package/dist/types/node.d.ts +7 -2
  17. package/dist/types/server.d.ts +4 -2
  18. package/dist/types/utils.d.ts +24 -0
  19. package/docs/changelog.md +131 -0
  20. package/docs/reference/functions/{bootstrapAttestationMethod.md → bootstrapSynchronisedStorage.md} +3 -3
  21. package/docs/reference/functions/buildConfiguration.md +2 -2
  22. package/docs/reference/functions/buildEngineConfiguration.md +2 -2
  23. package/docs/reference/functions/buildEngineServerConfiguration.md +9 -3
  24. package/docs/reference/functions/directoryExists.md +19 -0
  25. package/docs/reference/functions/extensionsConfiguration.md +25 -0
  26. package/docs/reference/functions/extensionsInitialiseEngine.md +25 -0
  27. package/docs/reference/functions/extensionsInitialiseEngineServer.md +31 -0
  28. package/docs/reference/functions/getFiles.md +19 -0
  29. package/docs/reference/functions/getSubFolders.md +19 -0
  30. package/docs/reference/functions/loadTextFile.md +19 -0
  31. package/docs/reference/functions/overrideModuleImport.md +17 -0
  32. package/docs/reference/functions/shutdownExtensions.md +25 -0
  33. package/docs/reference/functions/start.md +4 -4
  34. package/docs/reference/index.md +21 -1
  35. package/docs/reference/interfaces/IEngineEnvironmentVariables.md +374 -36
  36. package/docs/reference/interfaces/IEngineServerEnvironmentVariables.md +1673 -5
  37. package/docs/reference/interfaces/INodeEngineConfig.md +7 -0
  38. package/docs/reference/interfaces/INodeEnvironmentVariables.md +643 -137
  39. package/docs/reference/interfaces/INodeOptions.md +14 -2
  40. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineMethod.md +18 -0
  41. package/docs/reference/type-aliases/NodeExtensionInitialiseEngineServerMethod.md +24 -0
  42. package/docs/reference/type-aliases/NodeExtensionInitialiseMethod.md +23 -0
  43. package/docs/reference/type-aliases/NodeExtensionShutdownMethod.md +10 -0
  44. package/docs/reference/variables/ATTESTATION_VERIFICATION_METHOD_ID.md +3 -0
  45. package/docs/reference/variables/AUTH_SIGNING_KEY_ID.md +3 -0
  46. package/docs/reference/variables/BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  47. package/docs/reference/variables/IMMUTABLE_PROOF_VERIFICATION_METHOD_ID.md +3 -0
  48. package/docs/reference/variables/NodeFeatures.md +7 -1
  49. package/docs/reference/variables/SYNCHRONISED_STORAGE_BLOB_STORAGE_ENCRYPTION_KEY_ID.md +3 -0
  50. package/docs/reference/variables/VC_AUTHENTICATION_VERIFICATION_METHOD_ID.md +3 -0
  51. package/locales/en.json +15 -6
  52. package/package.json +18 -2
@@ -85,6 +85,14 @@ The path to the OpenAPI spec file, defaults to docs/open-api/spec.json.
85
85
 
86
86
  ***
87
87
 
88
+ ### favIconFile?
89
+
90
+ > `optional` **favIconFile**: `string`
91
+
92
+ The path to the favicon, defaults to static/favicon.png.
93
+
94
+ ***
95
+
88
96
  ### extendEnvVars()?
89
97
 
90
98
  > `optional` **extendEnvVars**: (`envVars`) => `Promise`\<`void`\>
@@ -105,15 +113,19 @@ Method to extend the engine environment variables with any additional custom con
105
113
 
106
114
  ### extendConfig()?
107
115
 
108
- > `optional` **extendConfig**: (`config`) => `Promise`\<`void`\>
116
+ > `optional` **extendConfig**: (`envVars`, `config`) => `Promise`\<`void`\>
109
117
 
110
118
  Method to extend the engine configuration with any additional custom configuration.
111
119
 
112
120
  #### Parameters
113
121
 
122
+ ##### envVars
123
+
124
+ [`INodeEnvironmentVariables`](INodeEnvironmentVariables.md)
125
+
114
126
  ##### config
115
127
 
116
- `IEngineConfig`
128
+ [`INodeEngineConfig`](INodeEngineConfig.md)
117
129
 
118
130
  #### Returns
119
131
 
@@ -0,0 +1,18 @@
1
+ # Type Alias: NodeExtensionInitialiseEngineMethod()
2
+
3
+ > **NodeExtensionInitialiseEngineMethod** = (`engineCore`) => `Promise`\<`void`\>
4
+
5
+ The type for the initialise engine method of an extension module.
6
+ This is called when the engine has been constructed but not yet started.
7
+
8
+ ## Parameters
9
+
10
+ ### engineCore
11
+
12
+ `IEngineCore`
13
+
14
+ The engine core instance.
15
+
16
+ ## Returns
17
+
18
+ `Promise`\<`void`\>
@@ -0,0 +1,24 @@
1
+ # Type Alias: NodeExtensionInitialiseEngineServerMethod()
2
+
3
+ > **NodeExtensionInitialiseEngineServerMethod** = (`engineCore`, `engineServer`) => `Promise`\<`void`\>
4
+
5
+ The type for the initialise engine server method of an extension module.
6
+ This is called when the engine server has been constructed but not yet started.
7
+
8
+ ## Parameters
9
+
10
+ ### engineCore
11
+
12
+ `IEngineCore`
13
+
14
+ The engine core instance.
15
+
16
+ ### engineServer
17
+
18
+ `IEngineServer`
19
+
20
+ The engine server instance.
21
+
22
+ ## Returns
23
+
24
+ `Promise`\<`void`\>
@@ -0,0 +1,23 @@
1
+ # Type Alias: NodeExtensionInitialiseMethod()
2
+
3
+ > **NodeExtensionInitialiseMethod** = (`envVars`, `nodeEngineConfig`) => `Promise`\<`void`\>
4
+
5
+ The type for the initialise method of an extension module.
6
+
7
+ ## Parameters
8
+
9
+ ### envVars
10
+
11
+ [`INodeEnvironmentVariables`](../interfaces/INodeEnvironmentVariables.md)
12
+
13
+ The environment variables for the node.
14
+
15
+ ### nodeEngineConfig
16
+
17
+ [`INodeEngineConfig`](../interfaces/INodeEngineConfig.md)
18
+
19
+ The node engine config.
20
+
21
+ ## Returns
22
+
23
+ `Promise`\<`void`\>
@@ -0,0 +1,10 @@
1
+ # Type Alias: NodeExtensionShutdownMethod()
2
+
3
+ > **NodeExtensionShutdownMethod** = () => `Promise`\<`void`\>
4
+
5
+ The type for the shutdown method of an extension module.
6
+ This is called when the engine is shutting down.
7
+
8
+ ## Returns
9
+
10
+ `Promise`\<`void`\>
@@ -0,0 +1,3 @@
1
+ # Variable: ATTESTATION\_VERIFICATION\_METHOD\_ID
2
+
3
+ > `const` **ATTESTATION\_VERIFICATION\_METHOD\_ID**: `"attestation-assertion"` = `"attestation-assertion"`
@@ -0,0 +1,3 @@
1
+ # Variable: AUTH\_SIGNING\_KEY\_ID
2
+
3
+ > `const` **AUTH\_SIGNING\_KEY\_ID**: `"auth-signing"` = `"auth-signing"`
@@ -0,0 +1,3 @@
1
+ # Variable: BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID
2
+
3
+ > `const` **BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID**: `"blob-encryption"` = `"blob-encryption"`
@@ -0,0 +1,3 @@
1
+ # Variable: IMMUTABLE\_PROOF\_VERIFICATION\_METHOD\_ID
2
+
3
+ > `const` **IMMUTABLE\_PROOF\_VERIFICATION\_METHOD\_ID**: `"immutable-proof-assertion"` = `"immutable-proof-assertion"`
@@ -4,7 +4,7 @@
4
4
 
5
5
  The features that can be enabled on the node.
6
6
 
7
- ## Type declaration
7
+ ## Type Declaration
8
8
 
9
9
  ### NodeIdentity
10
10
 
@@ -17,3 +17,9 @@ NodeIdentity - generates an identity for the node if not provided in config.
17
17
  > `readonly` **NodeUser**: `"node-user"` = `"node-user"`
18
18
 
19
19
  NodeUser - generates a user for the node if not provided in config.
20
+
21
+ ### NodeWallet
22
+
23
+ > `readonly` **NodeWallet**: `"node-wallet"` = `"node-wallet"`
24
+
25
+ NodeWallet - generates a wallet for the node and funds it when there is a faucet available.
@@ -0,0 +1,3 @@
1
+ # Variable: SYNCHRONISED\_STORAGE\_BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID
2
+
3
+ > `const` **SYNCHRONISED\_STORAGE\_BLOB\_STORAGE\_ENCRYPTION\_KEY\_ID**: `"synchronised-storage-blob-encryption"` = `"synchronised-storage-blob-encryption"`
@@ -0,0 +1,3 @@
1
+ # Variable: VC\_AUTHENTICATION\_VERIFICATION\_METHOD\_ID
2
+
3
+ > `const` **VC\_AUTHENTICATION\_VERIFICATION\_METHOD\_ID**: `"node-authentication-assertion"` = `"node-authentication-assertion"`
package/locales/en.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "error": {
3
3
  "node": {
4
- "storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file"
4
+ "storageFileRootNotSet": "{storageFileRoot} is not set, the server will not start without it, please set it in the shell or create a .env file",
5
+ "extensionLoadingError": "Failed to load extension \"{extension}\""
5
6
  }
6
7
  },
7
8
  "node": {
@@ -19,16 +20,24 @@
19
20
  "existingNodeUser": "Node user already exists \"{email}\"",
20
21
  "creatingAuthKey": "Creating authentication key \"{keyName}\"",
21
22
  "existingAuthKey": "Authentication key already exists \"{keyName}\"",
22
- "addingAttestation": "Adding attestation verification method \"{methodId}\"",
23
- "existingAttestation": "Attestation verification method already exists \"{methodId}\"",
24
- "addingImmutableProof": "Adding immutable proof verification method \"{methodId}\"",
25
- "existingImmutableProof": "Immutable proof verification method already exists \"{methodId}\"",
23
+ "addingVerificationMethod": "Adding {title} verification method \"{methodId}\"",
24
+ "existingVerificationMethod": "Verification method for {title} already exists \"{methodId}\"",
25
+ "addingBlobEncryptionKey": "Adding blob encryption key \"{keyName}\"",
26
26
  "creatingBlobEncryptionKey": "Creating blob encryption key \"{keyName}\"",
27
+ "createdBlobEncryptionKey": "Created blob encryption key \"{keyName}\" with value \"{keyValue}\"",
27
28
  "existingBlobEncryptionKey": "Blob encryption key already exists \"{keyName}\"",
29
+ "addingSynchronisedStorageBlobEncryptionKey": "Adding synchronised storage blob encryption key \"{keyName}\"",
30
+ "existingSynchronisedStorageBlobEncryptionKey": "Synchronised storage blob encryption key already exists \"{keyName}\"",
28
31
  "creatingUserProfile": "Creating user profile \"{identity}\"",
29
32
  "existingUserProfile": "User profile already exists \"{identity}\"",
30
33
  "nodeIdentity": "Node identity \"{identity}\"",
31
34
  "nodeAdminUserEmail": "Node Admin User Email \"{email}\"",
32
- "nodeAdminUserPassword": "Node Admin User Password \"{password}\""
35
+ "nodeAdminUserPassword": "Node Admin User Password \"{password}\"",
36
+ "extensionLoading": "Loading Extension",
37
+ "extensionInitialisingEngine": "Initialising engine for extension \"{extension}\"",
38
+ "extensionInitialisingEngineServer": "Initialising engine server for extension \"{extension}\"",
39
+ "extensionShutdown": "Shutdown extension \"{extension}\"",
40
+ "extendingEngine": "Extending Engine",
41
+ "extendingEngineServer": "Extending Engine Server"
33
42
  }
34
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/node-core",
3
- "version": "0.0.2-next.2",
3
+ "version": "0.0.2-next.20",
4
4
  "description": "TWIN Node Core for serving APIs using the specified configuration",
5
5
  "repository": {
6
6
  "type": "git",
@@ -15,8 +15,10 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@twin.org/api-auth-entity-storage-service": "next",
18
+ "@twin.org/cli-core": "next",
18
19
  "@twin.org/core": "next",
19
20
  "@twin.org/crypto": "next",
21
+ "@twin.org/data-space-connector-models": "next",
20
22
  "@twin.org/engine": "next",
21
23
  "@twin.org/engine-core": "next",
22
24
  "@twin.org/engine-models": "next",
@@ -26,9 +28,12 @@
26
28
  "@twin.org/entity": "next",
27
29
  "@twin.org/entity-storage-models": "next",
28
30
  "@twin.org/identity-models": "next",
31
+ "@twin.org/modules": "next",
32
+ "@twin.org/rights-management-rest-client": "next",
33
+ "@twin.org/standards-w3c-odrl": "next",
29
34
  "@twin.org/vault-models": "next",
30
35
  "@twin.org/wallet-models": "next",
31
- "dotenv": "17.2.0",
36
+ "dotenv": "17.2.2",
32
37
  "schema-dts": "1.1.5"
33
38
  },
34
39
  "main": "./dist/cjs/index.cjs",
@@ -48,5 +53,16 @@
48
53
  "dist/types",
49
54
  "locales",
50
55
  "docs"
56
+ ],
57
+ "keywords": [
58
+ "twin",
59
+ "trade",
60
+ "iota",
61
+ "framework",
62
+ "blockchain",
63
+ "node",
64
+ "core",
65
+ "foundation",
66
+ "utilities"
51
67
  ]
52
68
  }