@twin.org/engine-types 0.0.3-next.46 → 0.0.3-next.48

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 (78) hide show
  1. package/dist/es/components/entityStorage.js +0 -18
  2. package/dist/es/components/entityStorage.js.map +1 -1
  3. package/dist/es/components/federatedCatalogue.js +2 -1
  4. package/dist/es/components/federatedCatalogue.js.map +1 -1
  5. package/dist/es/components/schemaVersionMigration.js +29 -0
  6. package/dist/es/components/schemaVersionMigration.js.map +1 -0
  7. package/dist/es/components/trustVerifier.js +6 -3
  8. package/dist/es/components/trustVerifier.js.map +1 -1
  9. package/dist/es/index.js +3 -8
  10. package/dist/es/index.js.map +1 -1
  11. package/dist/es/models/IEngineConfig.js.map +1 -1
  12. package/dist/es/models/config/entityStorageConnectorConfig.js.map +1 -1
  13. package/dist/es/models/config/schemaVersionMigrationComponentConfig.js +2 -0
  14. package/dist/es/models/config/schemaVersionMigrationComponentConfig.js.map +1 -0
  15. package/dist/es/models/config/trustVerifierComponentConfig.js.map +1 -1
  16. package/dist/es/models/types/entityStorageConnectorType.js +1 -5
  17. package/dist/es/models/types/entityStorageConnectorType.js.map +1 -1
  18. package/dist/es/models/types/schemaVersionMigrationComponentType.js +13 -0
  19. package/dist/es/models/types/schemaVersionMigrationComponentType.js.map +1 -0
  20. package/dist/es/models/types/trustVerifierComponentType.js +5 -1
  21. package/dist/es/models/types/trustVerifierComponentType.js.map +1 -1
  22. package/dist/types/components/schemaVersionMigration.d.ts +12 -0
  23. package/dist/types/index.d.ts +3 -8
  24. package/dist/types/models/IEngineConfig.d.ts +5 -15
  25. package/dist/types/models/config/entityStorageConnectorConfig.d.ts +0 -4
  26. package/dist/types/models/config/schemaVersionMigrationComponentConfig.d.ts +7 -0
  27. package/dist/types/models/config/trustVerifierComponentConfig.d.ts +4 -1
  28. package/dist/types/models/types/entityStorageConnectorType.d.ts +0 -4
  29. package/dist/types/models/types/schemaVersionMigrationComponentType.d.ts +13 -0
  30. package/dist/types/models/types/trustVerifierComponentType.d.ts +4 -0
  31. package/docs/changelog.md +30 -0
  32. package/docs/reference/functions/initialiseSchemaVersionMigrationComponent.md +31 -0
  33. package/docs/reference/index.md +4 -12
  34. package/docs/reference/interfaces/IEngineConfig.md +6 -18
  35. package/docs/reference/type-aliases/EntityStorageConnectorConfig.md +1 -1
  36. package/docs/reference/type-aliases/SchemaVersionMigrationComponentConfig.md +11 -0
  37. package/docs/reference/type-aliases/SchemaVersionMigrationComponentType.md +5 -0
  38. package/docs/reference/type-aliases/TrustVerifierComponentConfig.md +1 -13
  39. package/docs/reference/variables/EntityStorageConnectorType.md +0 -6
  40. package/docs/reference/variables/SchemaVersionMigrationComponentType.md +13 -0
  41. package/docs/reference/variables/TrustVerifierComponentType.md +6 -0
  42. package/package.json +3 -12
  43. package/dist/es/components/synchronisedStorage.js +0 -49
  44. package/dist/es/components/synchronisedStorage.js.map +0 -1
  45. package/dist/es/components/verifiableStorage.js +0 -77
  46. package/dist/es/components/verifiableStorage.js.map +0 -1
  47. package/dist/es/models/config/synchronisedStorageComponentConfig.js +0 -2
  48. package/dist/es/models/config/synchronisedStorageComponentConfig.js.map +0 -1
  49. package/dist/es/models/config/verifiableStorageComponentConfig.js +0 -2
  50. package/dist/es/models/config/verifiableStorageComponentConfig.js.map +0 -1
  51. package/dist/es/models/config/verifiableStorageConnectorConfig.js +0 -2
  52. package/dist/es/models/config/verifiableStorageConnectorConfig.js.map +0 -1
  53. package/dist/es/models/types/synchronisedStorageComponentType.js +0 -17
  54. package/dist/es/models/types/synchronisedStorageComponentType.js.map +0 -1
  55. package/dist/es/models/types/verifiableStorageComponentType.js +0 -17
  56. package/dist/es/models/types/verifiableStorageComponentType.js.map +0 -1
  57. package/dist/es/models/types/verifiableStorageConnectorType.js +0 -17
  58. package/dist/es/models/types/verifiableStorageConnectorType.js.map +0 -1
  59. package/dist/types/components/synchronisedStorage.d.ts +0 -12
  60. package/dist/types/components/verifiableStorage.d.ts +0 -22
  61. package/dist/types/models/config/synchronisedStorageComponentConfig.d.ts +0 -13
  62. package/dist/types/models/config/verifiableStorageComponentConfig.d.ts +0 -13
  63. package/dist/types/models/config/verifiableStorageConnectorConfig.d.ts +0 -13
  64. package/dist/types/models/types/synchronisedStorageComponentType.d.ts +0 -17
  65. package/dist/types/models/types/verifiableStorageComponentType.d.ts +0 -17
  66. package/dist/types/models/types/verifiableStorageConnectorType.d.ts +0 -17
  67. package/docs/reference/functions/initialiseSynchronisedStorageComponent.md +0 -31
  68. package/docs/reference/functions/initialiseVerifiableStorageComponent.md +0 -31
  69. package/docs/reference/functions/initialiseVerifiableStorageConnector.md +0 -31
  70. package/docs/reference/type-aliases/IVerifiableStorageComponentType.md +0 -5
  71. package/docs/reference/type-aliases/SynchronisedStorageComponentConfig.md +0 -5
  72. package/docs/reference/type-aliases/SynchronisedStorageComponentType.md +0 -5
  73. package/docs/reference/type-aliases/VerifiableStorageComponentConfig.md +0 -5
  74. package/docs/reference/type-aliases/VerifiableStorageConnectorConfig.md +0 -5
  75. package/docs/reference/type-aliases/VerifiableStorageConnectorType.md +0 -5
  76. package/docs/reference/variables/SynchronisedStorageComponentType.md +0 -19
  77. package/docs/reference/variables/VerifiableStorageComponentType.md +0 -19
  78. package/docs/reference/variables/VerifiableStorageConnectorType.md +0 -19
@@ -1,49 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
4
- import { ComponentFactory } from "@twin.org/core";
5
- import { SynchronisedStorageRestClient } from "@twin.org/synchronised-storage-rest-client";
6
- import { SynchronisedStorageService, initSchema as initSchemaSynchronisedStorage } from "@twin.org/synchronised-storage-service";
7
- import { initialiseEntityStorageConnector } from "./entityStorage.js";
8
- import { SynchronisedStorageComponentType } from "../models/types/synchronisedStorageComponentType.js";
9
- import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
10
- /**
11
- * Initialise the synchronised storage component.
12
- * @param engineCore The engine core.
13
- * @param context The context for the engine.
14
- * @param instanceConfig The instance config.
15
- * @returns The instance created and the factory for it.
16
- */
17
- export function initialiseSynchronisedStorageComponent(engineCore, context, instanceConfig) {
18
- let createComponent;
19
- let instanceTypeName;
20
- if (instanceConfig.type === SynchronisedStorageComponentType.Service) {
21
- createComponent = (createConfig) => {
22
- initSchemaSynchronisedStorage();
23
- initialiseEntityStorageConnector(engineCore, context, createConfig.options?.syncSnapshotStorageConnectorType, "SyncSnapshotEntry", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node]));
24
- return new SynchronisedStorageService(EngineTypeHelper.mergeConfig({
25
- loggingComponentType: engineCore.getRegisteredInstanceType("loggingComponent"),
26
- eventBusComponentType: engineCore.getRegisteredInstanceType("eventBusComponent"),
27
- vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
28
- verifiableStorageConnectorType: engineCore.getRegisteredInstanceType("verifiableStorageConnector"),
29
- taskSchedulerComponentType: engineCore.getRegisteredInstanceType("taskSchedulerComponent"),
30
- trustedSynchronisedStorageComponentType: engineCore.getRegisteredInstanceTypeOptional("synchronisedStorageComponent", ["trusted"]),
31
- blobStorageConnectorType: engineCore.getRegisteredInstanceType("blobStorageConnector", [
32
- "public"
33
- ]),
34
- trustComponentType: engineCore.getRegisteredInstanceType("trustComponent")
35
- }, createConfig.options));
36
- };
37
- instanceTypeName = "synchronised-storage-service";
38
- }
39
- else if (instanceConfig.type === SynchronisedStorageComponentType.RestClient) {
40
- createComponent = (createConfig) => new SynchronisedStorageRestClient(EngineTypeHelper.mergeConfig(createConfig.options));
41
- instanceTypeName = "synchronised-storage-rest-client";
42
- }
43
- return {
44
- createComponent: createComponent,
45
- instanceTypeName,
46
- factory: ComponentFactory
47
- };
48
- }
49
- //# sourceMappingURL=synchronisedStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorage.js","sourceRoot":"","sources":["../../../src/components/synchronisedStorage.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAmB,MAAM,gBAAgB,CAAC;AAOnE,OAAO,EAAE,6BAA6B,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,EAEN,0BAA0B,EAC1B,UAAU,IAAI,6BAA6B,EAC3C,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AAGtE,OAAO,EAAE,gCAAgC,EAAE,MAAM,qDAAqD,CAAC;AACvG,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,UAAU,sCAAsC,CACrD,UAAsC,EACtC,OAA0C,EAC1C,cAAkD;IAElD,IAAI,eAAe,CAAC;IACpB,IAAI,gBAAgB,CAAC;IAErB,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,OAAO,EAAE,CAAC;QACtE,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE;YACzD,6BAA6B,EAAE,CAAC;YAEhC,gCAAgC,CAC/B,UAAU,EACV,OAAO,EACP,YAAY,CAAC,OAAO,EAAE,gCAAgC,uBAEtD,eAAe,CAAC,qBAAqB,CAAC,UAAU,CAAC,gBAAgB,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAC1F,CAAC;YACF,OAAO,IAAI,0BAA0B,CACpC,gBAAgB,CAAC,WAAW,CAC3B;gBACC,oBAAoB,EAAE,UAAU,CAAC,yBAAyB,CAAC,kBAAkB,CAAC;gBAC9E,qBAAqB,EAAE,UAAU,CAAC,yBAAyB,CAAC,mBAAmB,CAAC;gBAChF,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;gBAC1E,8BAA8B,EAAE,UAAU,CAAC,yBAAyB,CACnE,4BAA4B,CAC5B;gBACD,0BAA0B,EACzB,UAAU,CAAC,yBAAyB,CAAC,wBAAwB,CAAC;gBAC/D,uCAAuC,EAAE,UAAU,CAAC,iCAAiC,CACpF,8BAA8B,EAC9B,CAAC,SAAS,CAAC,CACX;gBACD,wBAAwB,EAAE,UAAU,CAAC,yBAAyB,CAAC,sBAAsB,EAAE;oBACtF,QAAQ;iBACR,CAAC;gBACF,kBAAkB,EAAE,UAAU,CAAC,yBAAyB,CAAC,gBAAgB,CAAC;aAC1E,EACD,YAAY,CAAC,OAAO,CACpB,CACD,CAAC;QACH,CAAC,CAAC;QACF,gBAAgB,iCAA8C,CAAC;IAChE,CAAC;SAAM,IAAI,cAAc,CAAC,IAAI,KAAK,gCAAgC,CAAC,UAAU,EAAE,CAAC;QAChF,eAAe,GAAG,CAAC,YAAmC,EAAE,EAAE,CACzD,IAAI,6BAA6B,CAChC,gBAAgB,CAAC,WAAW,CAAqC,YAAY,CAAC,OAAO,CAAC,CACtF,CAAC;QACH,gBAAgB,qCAAiD,CAAC;IACnE,CAAC;IAED,OAAO;QACN,eAAe,EAAE,eAAsE;QACvF,gBAAgB;QAChB,OAAO,EAAE,gBAAgB;KACzB,CAAC;AACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport { ComponentFactory, type IComponent } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport { SynchronisedStorageRestClient } from \"@twin.org/synchronised-storage-rest-client\";\nimport {\n\ttype SyncSnapshotEntry,\n\tSynchronisedStorageService,\n\tinitSchema as initSchemaSynchronisedStorage\n} from \"@twin.org/synchronised-storage-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { SynchronisedStorageComponentConfig } from \"../models/config/synchronisedStorageComponentConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { SynchronisedStorageComponentType } from \"../models/types/synchronisedStorageComponentType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the synchronised storage component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseSynchronisedStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: SynchronisedStorageComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === SynchronisedStorageComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaSynchronisedStorage();\n\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.syncSnapshotStorageConnectorType,\n\t\t\t\tnameof<SyncSnapshotEntry>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [ContextIdKeys.Node])\n\t\t\t);\n\t\t\treturn new SynchronisedStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceType(\"loggingComponent\"),\n\t\t\t\t\t\teventBusComponentType: engineCore.getRegisteredInstanceType(\"eventBusComponent\"),\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\tverifiableStorageConnectorType: engineCore.getRegisteredInstanceType(\n\t\t\t\t\t\t\t\"verifiableStorageConnector\"\n\t\t\t\t\t\t),\n\t\t\t\t\t\ttaskSchedulerComponentType:\n\t\t\t\t\t\t\tengineCore.getRegisteredInstanceType(\"taskSchedulerComponent\"),\n\t\t\t\t\t\ttrustedSynchronisedStorageComponentType: engineCore.getRegisteredInstanceTypeOptional(\n\t\t\t\t\t\t\t\"synchronisedStorageComponent\",\n\t\t\t\t\t\t\t[\"trusted\"]\n\t\t\t\t\t\t),\n\t\t\t\t\t\tblobStorageConnectorType: engineCore.getRegisteredInstanceType(\"blobStorageConnector\", [\n\t\t\t\t\t\t\t\"public\"\n\t\t\t\t\t\t]),\n\t\t\t\t\t\ttrustComponentType: engineCore.getRegisteredInstanceType(\"trustComponent\")\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = nameofKebabCase(SynchronisedStorageService);\n\t} else if (instanceConfig.type === SynchronisedStorageComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew SynchronisedStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(SynchronisedStorageRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -1,77 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- import { ContextIdHelper, ContextIdKeys } from "@twin.org/context";
4
- import { ComponentFactory } from "@twin.org/core";
5
- import { EntityStorageVerifiableStorageConnector, initSchema as initSchemaVerifiableStorageStorage } from "@twin.org/verifiable-storage-connector-entity-storage";
6
- import { IotaVerifiableStorageConnector } from "@twin.org/verifiable-storage-connector-iota";
7
- import { VerifiableStorageConnectorFactory } from "@twin.org/verifiable-storage-models";
8
- import { VerifiableStorageRestClient } from "@twin.org/verifiable-storage-rest-client";
9
- import { VerifiableStorageService } from "@twin.org/verifiable-storage-service";
10
- import { initialiseEntityStorageConnector } from "./entityStorage.js";
11
- import { DltConfigType } from "../models/types/dltConfigType.js";
12
- import { VerifiableStorageComponentType } from "../models/types/verifiableStorageComponentType.js";
13
- import { VerifiableStorageConnectorType } from "../models/types/verifiableStorageConnectorType.js";
14
- import { EngineTypeHelper } from "../utils/engineTypeHelper.js";
15
- /**
16
- * Initialise the verifiable storage connector.
17
- * @param engineCore The engine core.
18
- * @param context The context for the engine.
19
- * @param instanceConfig The instance config.
20
- * @returns The instance created and the factory for it.
21
- */
22
- export function initialiseVerifiableStorageConnector(engineCore, context, instanceConfig) {
23
- let createComponent;
24
- let instanceTypeName;
25
- if (instanceConfig.type === VerifiableStorageConnectorType.Iota) {
26
- createComponent = (createConfig) => {
27
- const dltConfig = EngineTypeHelper.getConfigOfType(engineCore.getConfig(), "dltConfig", DltConfigType.Iota);
28
- return new IotaVerifiableStorageConnector(EngineTypeHelper.mergeConfig({
29
- vaultConnectorType: engineCore.getRegisteredInstanceType("vaultConnector"),
30
- loggingComponentType: engineCore.getRegisteredInstanceTypeOptional("loggingComponent"),
31
- config: dltConfig?.options?.config
32
- }, createConfig.options));
33
- };
34
- instanceTypeName = IotaVerifiableStorageConnector.NAMESPACE;
35
- }
36
- else if (instanceConfig.type === VerifiableStorageConnectorType.EntityStorage) {
37
- createComponent = (createConfig) => {
38
- initSchemaVerifiableStorageStorage();
39
- initialiseEntityStorageConnector(engineCore, context, createConfig.options?.verifiableStorageEntityStorageType, "VerifiableItem", ContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [
40
- ContextIdKeys.Node,
41
- ContextIdKeys.Tenant
42
- ]));
43
- return new EntityStorageVerifiableStorageConnector(EngineTypeHelper.mergeConfig(createConfig.options));
44
- };
45
- instanceTypeName = EntityStorageVerifiableStorageConnector.NAMESPACE;
46
- }
47
- return {
48
- createComponent: createComponent,
49
- instanceTypeName,
50
- factory: VerifiableStorageConnectorFactory
51
- };
52
- }
53
- /**
54
- * Initialise the verifiable storage component.
55
- * @param engineCore The engine core.
56
- * @param context The context for the engine.
57
- * @param instanceConfig The instance config.
58
- * @returns The instance created and the factory for it.
59
- */
60
- export function initialiseVerifiableStorageComponent(engineCore, context, instanceConfig) {
61
- let createComponent;
62
- let instanceTypeName;
63
- if (instanceConfig.type === VerifiableStorageComponentType.Service) {
64
- createComponent = (createConfig) => new VerifiableStorageService(EngineTypeHelper.mergeConfig(createConfig.options));
65
- instanceTypeName = "verifiable-storage-service";
66
- }
67
- else if (instanceConfig.type === VerifiableStorageComponentType.RestClient) {
68
- createComponent = (createConfig) => new VerifiableStorageRestClient(EngineTypeHelper.mergeConfig(createConfig.options));
69
- instanceTypeName = "verifiable-storage-rest-client";
70
- }
71
- return {
72
- createComponent: createComponent,
73
- instanceTypeName,
74
- factory: ComponentFactory
75
- };
76
- }
77
- //# sourceMappingURL=verifiableStorage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorage.js","sourceRoot":"","sources":["../../../src/components/verifiableStorage.ts"],"names":[],"mappings":"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","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { ContextIdHelper, ContextIdKeys } from \"@twin.org/context\";\nimport type { IComponent } from \"@twin.org/core\";\nimport { ComponentFactory } from \"@twin.org/core\";\nimport type {\n\tEngineTypeInitialiserReturn,\n\tIEngineCore,\n\tIEngineCoreContext\n} from \"@twin.org/engine-models\";\nimport { nameof, nameofKebabCase } from \"@twin.org/nameof\";\nimport {\n\tEntityStorageVerifiableStorageConnector,\n\tinitSchema as initSchemaVerifiableStorageStorage,\n\ttype VerifiableItem\n} from \"@twin.org/verifiable-storage-connector-entity-storage\";\nimport { IotaVerifiableStorageConnector } from \"@twin.org/verifiable-storage-connector-iota\";\nimport { VerifiableStorageConnectorFactory } from \"@twin.org/verifiable-storage-models\";\nimport { VerifiableStorageRestClient } from \"@twin.org/verifiable-storage-rest-client\";\nimport { VerifiableStorageService } from \"@twin.org/verifiable-storage-service\";\nimport { initialiseEntityStorageConnector } from \"./entityStorage.js\";\nimport type { DltConfig } from \"../models/config/dltConfig.js\";\nimport type { VerifiableStorageComponentConfig } from \"../models/config/verifiableStorageComponentConfig.js\";\nimport type { VerifiableStorageConnectorConfig } from \"../models/config/verifiableStorageConnectorConfig.js\";\nimport type { IEngineConfig } from \"../models/IEngineConfig.js\";\nimport { DltConfigType } from \"../models/types/dltConfigType.js\";\nimport { VerifiableStorageComponentType } from \"../models/types/verifiableStorageComponentType.js\";\nimport { VerifiableStorageConnectorType } from \"../models/types/verifiableStorageConnectorType.js\";\nimport { EngineTypeHelper } from \"../utils/engineTypeHelper.js\";\n\n/**\n * Initialise the verifiable storage connector.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseVerifiableStorageConnector(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: VerifiableStorageConnectorConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof VerifiableStorageConnectorFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === VerifiableStorageConnectorType.Iota) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tconst dltConfig = EngineTypeHelper.getConfigOfType<DltConfig>(\n\t\t\t\tengineCore.getConfig(),\n\t\t\t\t\"dltConfig\",\n\t\t\t\tDltConfigType.Iota\n\t\t\t);\n\t\t\treturn new IotaVerifiableStorageConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(\n\t\t\t\t\t{\n\t\t\t\t\t\tvaultConnectorType: engineCore.getRegisteredInstanceType(\"vaultConnector\"),\n\t\t\t\t\t\tloggingComponentType: engineCore.getRegisteredInstanceTypeOptional(\"loggingComponent\"),\n\t\t\t\t\t\tconfig: dltConfig?.options?.config\n\t\t\t\t\t},\n\t\t\t\t\tcreateConfig.options\n\t\t\t\t)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = IotaVerifiableStorageConnector.NAMESPACE;\n\t} else if (instanceConfig.type === VerifiableStorageConnectorType.EntityStorage) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) => {\n\t\t\tinitSchemaVerifiableStorageStorage();\n\t\t\tinitialiseEntityStorageConnector(\n\t\t\t\tengineCore,\n\t\t\t\tcontext,\n\t\t\t\tcreateConfig.options?.verifiableStorageEntityStorageType,\n\t\t\t\tnameof<VerifiableItem>(),\n\t\t\t\tContextIdHelper.pickKeysFromAvailable(engineCore.getContextIdKeys(), [\n\t\t\t\t\tContextIdKeys.Node,\n\t\t\t\t\tContextIdKeys.Tenant\n\t\t\t\t])\n\t\t\t);\n\t\t\treturn new EntityStorageVerifiableStorageConnector(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\t};\n\t\tinstanceTypeName = EntityStorageVerifiableStorageConnector.NAMESPACE;\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: VerifiableStorageConnectorFactory\n\t};\n}\n\n/**\n * Initialise the verifiable storage component.\n * @param engineCore The engine core.\n * @param context The context for the engine.\n * @param instanceConfig The instance config.\n * @returns The instance created and the factory for it.\n */\nexport function initialiseVerifiableStorageComponent(\n\tengineCore: IEngineCore<IEngineConfig>,\n\tcontext: IEngineCoreContext<IEngineConfig>,\n\tinstanceConfig: VerifiableStorageComponentConfig\n): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory> {\n\tlet createComponent;\n\tlet instanceTypeName;\n\n\tif (instanceConfig.type === VerifiableStorageComponentType.Service) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew VerifiableStorageService(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(VerifiableStorageService);\n\t} else if (instanceConfig.type === VerifiableStorageComponentType.RestClient) {\n\t\tcreateComponent = (createConfig: typeof instanceConfig) =>\n\t\t\tnew VerifiableStorageRestClient(\n\t\t\t\tEngineTypeHelper.mergeConfig<(typeof instanceConfig)[\"options\"]>(createConfig.options)\n\t\t\t);\n\t\tinstanceTypeName = nameofKebabCase(VerifiableStorageRestClient);\n\t}\n\n\treturn {\n\t\tcreateComponent: createComponent as (createConfig: typeof instanceConfig) => IComponent,\n\t\tinstanceTypeName,\n\t\tfactory: ComponentFactory\n\t};\n}\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=synchronisedStorageComponentConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorageComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/synchronisedStorageComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { ISynchronisedStorageServiceConstructorOptions } from \"@twin.org/synchronised-storage-service\";\nimport type { SynchronisedStorageComponentType } from \"../types/synchronisedStorageComponentType.js\";\n\n/**\n * Synchronised storage component config types.\n */\nexport type SynchronisedStorageComponentConfig =\n\t| {\n\t\t\ttype: typeof SynchronisedStorageComponentType.Service;\n\t\t\toptions: ISynchronisedStorageServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof SynchronisedStorageComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verifiableStorageComponentConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageComponentConfig.js","sourceRoot":"","sources":["../../../../src/models/config/verifiableStorageComponentConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IBaseRestClientConfig } from \"@twin.org/api-models\";\nimport type { IVerifiableStorageServiceConstructorOptions } from \"@twin.org/verifiable-storage-service\";\nimport type { VerifiableStorageComponentType } from \"../types/verifiableStorageComponentType.js\";\n\n/**\n * Verifiable storage component config types.\n */\nexport type VerifiableStorageComponentConfig =\n\t| {\n\t\t\ttype: typeof VerifiableStorageComponentType.Service;\n\t\t\toptions?: IVerifiableStorageServiceConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof VerifiableStorageComponentType.RestClient;\n\t\t\toptions: IBaseRestClientConfig;\n\t };\n"]}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=verifiableStorageConnectorConfig.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageConnectorConfig.js","sourceRoot":"","sources":["../../../../src/models/config/verifiableStorageConnectorConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEntityStorageVerifiableStorageConnectorConstructorOptions } from \"@twin.org/verifiable-storage-connector-entity-storage\";\nimport type { IIotaVerifiableStorageConnectorConstructorOptions } from \"@twin.org/verifiable-storage-connector-iota\";\nimport type { VerifiableStorageConnectorType } from \"../types/verifiableStorageConnectorType.js\";\n\n/**\n * Verifiable storage connector config types.\n */\nexport type VerifiableStorageConnectorConfig =\n\t| {\n\t\t\ttype: typeof VerifiableStorageConnectorType.EntityStorage;\n\t\t\toptions?: IEntityStorageVerifiableStorageConnectorConstructorOptions;\n\t }\n\t| {\n\t\t\ttype: typeof VerifiableStorageConnectorType.Iota;\n\t\t\toptions: IIotaVerifiableStorageConnectorConstructorOptions;\n\t };\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Synchronised storage component types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const SynchronisedStorageComponentType = {
8
- /**
9
- * Service.
10
- */
11
- Service: "service",
12
- /**
13
- * REST client.
14
- */
15
- RestClient: "rest-client"
16
- };
17
- //# sourceMappingURL=synchronisedStorageComponentType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"synchronisedStorageComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/synchronisedStorageComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,gCAAgC,GAAG;IAC/C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Synchronised storage component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const SynchronisedStorageComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Synchronised storage component types.\n */\nexport type SynchronisedStorageComponentType =\n\t(typeof SynchronisedStorageComponentType)[keyof typeof SynchronisedStorageComponentType];\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Verifiable storage component types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const VerifiableStorageComponentType = {
8
- /**
9
- * Service.
10
- */
11
- Service: "service",
12
- /**
13
- * REST client.
14
- */
15
- RestClient: "rest-client"
16
- };
17
- //# sourceMappingURL=verifiableStorageComponentType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageComponentType.js","sourceRoot":"","sources":["../../../../src/models/types/verifiableStorageComponentType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C;;OAEG;IACH,OAAO,EAAE,SAAS;IAElB;;OAEG;IACH,UAAU,EAAE,aAAa;CAChB,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Verifiable storage component types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const VerifiableStorageComponentType = {\n\t/**\n\t * Service.\n\t */\n\tService: \"service\",\n\n\t/**\n\t * REST client.\n\t */\n\tRestClient: \"rest-client\"\n} as const;\n\n/**\n * Verifiable storage component types.\n */\nexport type IVerifiableStorageComponentType =\n\t(typeof VerifiableStorageComponentType)[keyof typeof VerifiableStorageComponentType];\n"]}
@@ -1,17 +0,0 @@
1
- // Copyright 2024 IOTA Stiftung.
2
- // SPDX-License-Identifier: Apache-2.0.
3
- /**
4
- * Verifiable storage connector types.
5
- */
6
- // eslint-disable-next-line @typescript-eslint/naming-convention
7
- export const VerifiableStorageConnectorType = {
8
- /**
9
- * Entity storage.
10
- */
11
- EntityStorage: "entity-storage",
12
- /**
13
- * IOTA.
14
- */
15
- Iota: "iota"
16
- };
17
- //# sourceMappingURL=verifiableStorageConnectorType.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"verifiableStorageConnectorType.js","sourceRoot":"","sources":["../../../../src/models/types/verifiableStorageConnectorType.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AAEvC;;GAEG;AACH,gEAAgE;AAChE,MAAM,CAAC,MAAM,8BAA8B,GAAG;IAC7C;;OAEG;IACH,aAAa,EAAE,gBAAgB;IAE/B;;OAEG;IACH,IAAI,EAAE,MAAM;CACH,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Verifiable storage connector types.\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const VerifiableStorageConnectorType = {\n\t/**\n\t * Entity storage.\n\t */\n\tEntityStorage: \"entity-storage\",\n\n\t/**\n\t * IOTA.\n\t */\n\tIota: \"iota\"\n} as const;\n\n/**\n * Verifiable storage connector types.\n */\nexport type VerifiableStorageConnectorType =\n\t(typeof VerifiableStorageConnectorType)[keyof typeof VerifiableStorageConnectorType];\n"]}
@@ -1,12 +0,0 @@
1
- import { ComponentFactory } from "@twin.org/core";
2
- import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
3
- import type { SynchronisedStorageComponentConfig } from "../models/config/synchronisedStorageComponentConfig.js";
4
- import type { IEngineConfig } from "../models/IEngineConfig.js";
5
- /**
6
- * Initialise the synchronised storage component.
7
- * @param engineCore The engine core.
8
- * @param context The context for the engine.
9
- * @param instanceConfig The instance config.
10
- * @returns The instance created and the factory for it.
11
- */
12
- export declare function initialiseSynchronisedStorageComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: SynchronisedStorageComponentConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory>;
@@ -1,22 +0,0 @@
1
- import { ComponentFactory } from "@twin.org/core";
2
- import type { EngineTypeInitialiserReturn, IEngineCore, IEngineCoreContext } from "@twin.org/engine-models";
3
- import { VerifiableStorageConnectorFactory } from "@twin.org/verifiable-storage-models";
4
- import type { VerifiableStorageComponentConfig } from "../models/config/verifiableStorageComponentConfig.js";
5
- import type { VerifiableStorageConnectorConfig } from "../models/config/verifiableStorageConnectorConfig.js";
6
- import type { IEngineConfig } from "../models/IEngineConfig.js";
7
- /**
8
- * Initialise the verifiable storage connector.
9
- * @param engineCore The engine core.
10
- * @param context The context for the engine.
11
- * @param instanceConfig The instance config.
12
- * @returns The instance created and the factory for it.
13
- */
14
- export declare function initialiseVerifiableStorageConnector(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: VerifiableStorageConnectorConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof VerifiableStorageConnectorFactory>;
15
- /**
16
- * Initialise the verifiable storage component.
17
- * @param engineCore The engine core.
18
- * @param context The context for the engine.
19
- * @param instanceConfig The instance config.
20
- * @returns The instance created and the factory for it.
21
- */
22
- export declare function initialiseVerifiableStorageComponent(engineCore: IEngineCore<IEngineConfig>, context: IEngineCoreContext<IEngineConfig>, instanceConfig: VerifiableStorageComponentConfig): EngineTypeInitialiserReturn<typeof instanceConfig, typeof ComponentFactory>;
@@ -1,13 +0,0 @@
1
- import type { IBaseRestClientConfig } from "@twin.org/api-models";
2
- import type { ISynchronisedStorageServiceConstructorOptions } from "@twin.org/synchronised-storage-service";
3
- import type { SynchronisedStorageComponentType } from "../types/synchronisedStorageComponentType.js";
4
- /**
5
- * Synchronised storage component config types.
6
- */
7
- export type SynchronisedStorageComponentConfig = {
8
- type: typeof SynchronisedStorageComponentType.Service;
9
- options: ISynchronisedStorageServiceConstructorOptions;
10
- } | {
11
- type: typeof SynchronisedStorageComponentType.RestClient;
12
- options: IBaseRestClientConfig;
13
- };
@@ -1,13 +0,0 @@
1
- import type { IBaseRestClientConfig } from "@twin.org/api-models";
2
- import type { IVerifiableStorageServiceConstructorOptions } from "@twin.org/verifiable-storage-service";
3
- import type { VerifiableStorageComponentType } from "../types/verifiableStorageComponentType.js";
4
- /**
5
- * Verifiable storage component config types.
6
- */
7
- export type VerifiableStorageComponentConfig = {
8
- type: typeof VerifiableStorageComponentType.Service;
9
- options?: IVerifiableStorageServiceConstructorOptions;
10
- } | {
11
- type: typeof VerifiableStorageComponentType.RestClient;
12
- options: IBaseRestClientConfig;
13
- };
@@ -1,13 +0,0 @@
1
- import type { IEntityStorageVerifiableStorageConnectorConstructorOptions } from "@twin.org/verifiable-storage-connector-entity-storage";
2
- import type { IIotaVerifiableStorageConnectorConstructorOptions } from "@twin.org/verifiable-storage-connector-iota";
3
- import type { VerifiableStorageConnectorType } from "../types/verifiableStorageConnectorType.js";
4
- /**
5
- * Verifiable storage connector config types.
6
- */
7
- export type VerifiableStorageConnectorConfig = {
8
- type: typeof VerifiableStorageConnectorType.EntityStorage;
9
- options?: IEntityStorageVerifiableStorageConnectorConstructorOptions;
10
- } | {
11
- type: typeof VerifiableStorageConnectorType.Iota;
12
- options: IIotaVerifiableStorageConnectorConstructorOptions;
13
- };
@@ -1,17 +0,0 @@
1
- /**
2
- * Synchronised storage component types.
3
- */
4
- export declare const SynchronisedStorageComponentType: {
5
- /**
6
- * Service.
7
- */
8
- readonly Service: "service";
9
- /**
10
- * REST client.
11
- */
12
- readonly RestClient: "rest-client";
13
- };
14
- /**
15
- * Synchronised storage component types.
16
- */
17
- export type SynchronisedStorageComponentType = (typeof SynchronisedStorageComponentType)[keyof typeof SynchronisedStorageComponentType];
@@ -1,17 +0,0 @@
1
- /**
2
- * Verifiable storage component types.
3
- */
4
- export declare const VerifiableStorageComponentType: {
5
- /**
6
- * Service.
7
- */
8
- readonly Service: "service";
9
- /**
10
- * REST client.
11
- */
12
- readonly RestClient: "rest-client";
13
- };
14
- /**
15
- * Verifiable storage component types.
16
- */
17
- export type IVerifiableStorageComponentType = (typeof VerifiableStorageComponentType)[keyof typeof VerifiableStorageComponentType];
@@ -1,17 +0,0 @@
1
- /**
2
- * Verifiable storage connector types.
3
- */
4
- export declare const VerifiableStorageConnectorType: {
5
- /**
6
- * Entity storage.
7
- */
8
- readonly EntityStorage: "entity-storage";
9
- /**
10
- * IOTA.
11
- */
12
- readonly Iota: "iota";
13
- };
14
- /**
15
- * Verifiable storage connector types.
16
- */
17
- export type VerifiableStorageConnectorType = (typeof VerifiableStorageConnectorType)[keyof typeof VerifiableStorageConnectorType];
@@ -1,31 +0,0 @@
1
- # Function: initialiseSynchronisedStorageComponent()
2
-
3
- > **initialiseSynchronisedStorageComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md), `Factory`\<`IComponent`\>\>
4
-
5
- Initialise the synchronised storage component.
6
-
7
- ## Parameters
8
-
9
- ### engineCore
10
-
11
- `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
12
-
13
- The engine core.
14
-
15
- ### context
16
-
17
- `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
18
-
19
- The context for the engine.
20
-
21
- ### instanceConfig
22
-
23
- [`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md)
24
-
25
- The instance config.
26
-
27
- ## Returns
28
-
29
- `EngineTypeInitialiserReturn`\<[`SynchronisedStorageComponentConfig`](../type-aliases/SynchronisedStorageComponentConfig.md), `Factory`\<`IComponent`\>\>
30
-
31
- The instance created and the factory for it.
@@ -1,31 +0,0 @@
1
- # Function: initialiseVerifiableStorageComponent()
2
-
3
- > **initialiseVerifiableStorageComponent**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`VerifiableStorageComponentConfig`](../type-aliases/VerifiableStorageComponentConfig.md), `Factory`\<`IComponent`\>\>
4
-
5
- Initialise the verifiable storage component.
6
-
7
- ## Parameters
8
-
9
- ### engineCore
10
-
11
- `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
12
-
13
- The engine core.
14
-
15
- ### context
16
-
17
- `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
18
-
19
- The context for the engine.
20
-
21
- ### instanceConfig
22
-
23
- [`VerifiableStorageComponentConfig`](../type-aliases/VerifiableStorageComponentConfig.md)
24
-
25
- The instance config.
26
-
27
- ## Returns
28
-
29
- `EngineTypeInitialiserReturn`\<[`VerifiableStorageComponentConfig`](../type-aliases/VerifiableStorageComponentConfig.md), `Factory`\<`IComponent`\>\>
30
-
31
- The instance created and the factory for it.
@@ -1,31 +0,0 @@
1
- # Function: initialiseVerifiableStorageConnector()
2
-
3
- > **initialiseVerifiableStorageConnector**(`engineCore`, `context`, `instanceConfig`): `EngineTypeInitialiserReturn`\<[`VerifiableStorageConnectorConfig`](../type-aliases/VerifiableStorageConnectorConfig.md), `Factory`\<`IVerifiableStorageConnector`\>\>
4
-
5
- Initialise the verifiable storage connector.
6
-
7
- ## Parameters
8
-
9
- ### engineCore
10
-
11
- `IEngineCore`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
12
-
13
- The engine core.
14
-
15
- ### context
16
-
17
- `IEngineCoreContext`\<[`IEngineConfig`](../interfaces/IEngineConfig.md)\>
18
-
19
- The context for the engine.
20
-
21
- ### instanceConfig
22
-
23
- [`VerifiableStorageConnectorConfig`](../type-aliases/VerifiableStorageConnectorConfig.md)
24
-
25
- The instance config.
26
-
27
- ## Returns
28
-
29
- `EngineTypeInitialiserReturn`\<[`VerifiableStorageConnectorConfig`](../type-aliases/VerifiableStorageConnectorConfig.md), `Factory`\<`IVerifiableStorageConnector`\>\>
30
-
31
- The instance created and the factory for it.
@@ -1,5 +0,0 @@
1
- # Type Alias: IVerifiableStorageComponentType
2
-
3
- > **IVerifiableStorageComponentType** = *typeof* [`VerifiableStorageComponentType`](../variables/VerifiableStorageComponentType.md)\[keyof *typeof* [`VerifiableStorageComponentType`](../variables/VerifiableStorageComponentType.md)\]
4
-
5
- Verifiable storage component types.
@@ -1,5 +0,0 @@
1
- # Type Alias: SynchronisedStorageComponentConfig
2
-
3
- > **SynchronisedStorageComponentConfig** = \{ `type`: *typeof* [`Service`](../variables/SynchronisedStorageComponentType.md#service); `options`: `ISynchronisedStorageServiceConstructorOptions`; \} \| \{ `type`: *typeof* [`RestClient`](../variables/SynchronisedStorageComponentType.md#restclient); `options`: `IBaseRestClientConfig`; \}
4
-
5
- Synchronised storage component config types.
@@ -1,5 +0,0 @@
1
- # Type Alias: SynchronisedStorageComponentType
2
-
3
- > **SynchronisedStorageComponentType** = *typeof* [`SynchronisedStorageComponentType`](../variables/SynchronisedStorageComponentType.md)\[keyof *typeof* [`SynchronisedStorageComponentType`](../variables/SynchronisedStorageComponentType.md)\]
4
-
5
- Synchronised storage component types.
@@ -1,5 +0,0 @@
1
- # Type Alias: VerifiableStorageComponentConfig
2
-
3
- > **VerifiableStorageComponentConfig** = \{ `type`: *typeof* [`Service`](../variables/VerifiableStorageComponentType.md#service); `options?`: `IVerifiableStorageServiceConstructorOptions`; \} \| \{ `type`: *typeof* [`RestClient`](../variables/VerifiableStorageComponentType.md#restclient); `options`: `IBaseRestClientConfig`; \}
4
-
5
- Verifiable storage component config types.
@@ -1,5 +0,0 @@
1
- # Type Alias: VerifiableStorageConnectorConfig
2
-
3
- > **VerifiableStorageConnectorConfig** = \{ `type`: *typeof* [`EntityStorage`](../variables/VerifiableStorageConnectorType.md#entitystorage); `options?`: `IEntityStorageVerifiableStorageConnectorConstructorOptions`; \} \| \{ `type`: *typeof* [`Iota`](../variables/VerifiableStorageConnectorType.md#iota); `options`: `IIotaVerifiableStorageConnectorConstructorOptions`; \}
4
-
5
- Verifiable storage connector config types.
@@ -1,5 +0,0 @@
1
- # Type Alias: VerifiableStorageConnectorType
2
-
3
- > **VerifiableStorageConnectorType** = *typeof* [`VerifiableStorageConnectorType`](../variables/VerifiableStorageConnectorType.md)\[keyof *typeof* [`VerifiableStorageConnectorType`](../variables/VerifiableStorageConnectorType.md)\]
4
-
5
- Verifiable storage connector types.
@@ -1,19 +0,0 @@
1
- # Variable: SynchronisedStorageComponentType
2
-
3
- > `const` **SynchronisedStorageComponentType**: `object`
4
-
5
- Synchronised storage component types.
6
-
7
- ## Type Declaration
8
-
9
- ### Service {#service}
10
-
11
- > `readonly` **Service**: `"service"` = `"service"`
12
-
13
- Service.
14
-
15
- ### RestClient {#restclient}
16
-
17
- > `readonly` **RestClient**: `"rest-client"` = `"rest-client"`
18
-
19
- REST client.
@@ -1,19 +0,0 @@
1
- # Variable: VerifiableStorageComponentType
2
-
3
- > `const` **VerifiableStorageComponentType**: `object`
4
-
5
- Verifiable storage component types.
6
-
7
- ## Type Declaration
8
-
9
- ### Service {#service}
10
-
11
- > `readonly` **Service**: `"service"` = `"service"`
12
-
13
- Service.
14
-
15
- ### RestClient {#restclient}
16
-
17
- > `readonly` **RestClient**: `"rest-client"` = `"rest-client"`
18
-
19
- REST client.
@@ -1,19 +0,0 @@
1
- # Variable: VerifiableStorageConnectorType
2
-
3
- > `const` **VerifiableStorageConnectorType**: `object`
4
-
5
- Verifiable storage connector types.
6
-
7
- ## Type Declaration
8
-
9
- ### EntityStorage {#entitystorage}
10
-
11
- > `readonly` **EntityStorage**: `"entity-storage"` = `"entity-storage"`
12
-
13
- Entity storage.
14
-
15
- ### Iota {#iota}
16
-
17
- > `readonly` **Iota**: `"iota"` = `"iota"`
18
-
19
- IOTA.