@twin.org/synchronised-storage-service 0.0.1-next.8 → 0.0.1-next.9

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.
@@ -278,9 +278,9 @@ function initSchema() {
278
278
  entity.EntitySchemaFactory.register("SyncSnapshotEntry", () => entity.EntitySchemaHelper.getSchema(exports.SyncSnapshotEntry));
279
279
  }
280
280
 
281
- var mainnet = "";
282
- var testnet = "";
283
- var devnet = "";
281
+ var mainnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
282
+ var testnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
283
+ var devnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
284
284
  var verifiableStorageKeys = {
285
285
  mainnet: mainnet,
286
286
  testnet: testnet,
@@ -1866,6 +1866,7 @@ class SynchronisedStorageService {
1866
1866
  constructor(options) {
1867
1867
  core.Guards.object(this.CLASS_NAME, "options", options);
1868
1868
  core.Guards.object(this.CLASS_NAME, "options.config", options.config);
1869
+ core.Guards.stringValue(this.CLASS_NAME, "options.config.verifiableStorageKeyId", options.config.verifiableStorageKeyId);
1869
1870
  this._eventBusComponent = core.ComponentFactory.get(options.eventBusComponentType ?? "event-bus");
1870
1871
  this._loggingComponent = core.ComponentFactory.getIfExists(options.loggingComponentType ?? "logging");
1871
1872
  this._vaultConnector = vaultModels.VaultConnectorFactory.get(options.vaultConnectorType ?? "vault");
@@ -1896,6 +1897,7 @@ class SynchronisedStorageService {
1896
1897
  };
1897
1898
  this._synchronisedStorageKey =
1898
1899
  verifiableStorageKeys[options.config.verifiableStorageKeyId] ?? options.config.verifiableStorageKeyId;
1900
+ core.Guards.stringValue(this.CLASS_NAME, "synchronisedStorageKey", this._synchronisedStorageKey);
1899
1901
  this._blobStorageHelper = new BlobStorageHelper(this._loggingComponent, this._vaultConnector, this._blobStorageConnector, this._config.blobStorageEncryptionKeyId, isTrustedNode);
1900
1902
  this._changeSetHelper = new ChangeSetHelper(this._loggingComponent, this._eventBusComponent, this._identityConnector, this._blobStorageHelper, this._config.synchronisedStorageMethodId);
1901
1903
  this._localSyncStateHelper = new LocalSyncStateHelper(this._loggingComponent, this._localSyncSnapshotEntryEntityStorage, this._changeSetHelper);
@@ -276,9 +276,9 @@ function initSchema() {
276
276
  EntitySchemaFactory.register("SyncSnapshotEntry", () => EntitySchemaHelper.getSchema(SyncSnapshotEntry));
277
277
  }
278
278
 
279
- var mainnet = "";
280
- var testnet = "";
281
- var devnet = "";
279
+ var mainnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
280
+ var testnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
281
+ var devnet = "verifiable:iota:0x0000000000000000000000000000000000000000000000000000000000000000:0x0000000000000000000000000000000000000000000000000000000000000000";
282
282
  var verifiableStorageKeys = {
283
283
  mainnet: mainnet,
284
284
  testnet: testnet,
@@ -1864,6 +1864,7 @@ class SynchronisedStorageService {
1864
1864
  constructor(options) {
1865
1865
  Guards.object(this.CLASS_NAME, "options", options);
1866
1866
  Guards.object(this.CLASS_NAME, "options.config", options.config);
1867
+ Guards.stringValue(this.CLASS_NAME, "options.config.verifiableStorageKeyId", options.config.verifiableStorageKeyId);
1867
1868
  this._eventBusComponent = ComponentFactory.get(options.eventBusComponentType ?? "event-bus");
1868
1869
  this._loggingComponent = ComponentFactory.getIfExists(options.loggingComponentType ?? "logging");
1869
1870
  this._vaultConnector = VaultConnectorFactory.get(options.vaultConnectorType ?? "vault");
@@ -1894,6 +1895,7 @@ class SynchronisedStorageService {
1894
1895
  };
1895
1896
  this._synchronisedStorageKey =
1896
1897
  verifiableStorageKeys[options.config.verifiableStorageKeyId] ?? options.config.verifiableStorageKeyId;
1898
+ Guards.stringValue(this.CLASS_NAME, "synchronisedStorageKey", this._synchronisedStorageKey);
1897
1899
  this._blobStorageHelper = new BlobStorageHelper(this._loggingComponent, this._vaultConnector, this._blobStorageConnector, this._config.blobStorageEncryptionKeyId, isTrustedNode);
1898
1900
  this._changeSetHelper = new ChangeSetHelper(this._loggingComponent, this._eventBusComponent, this._identityConnector, this._blobStorageHelper, this._config.synchronisedStorageMethodId);
1899
1901
  this._localSyncStateHelper = new LocalSyncStateHelper(this._loggingComponent, this._localSyncSnapshotEntryEntityStorage, this._changeSetHelper);
package/docs/changelog.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.0.1-next.9](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.8...synchronised-storage-service-v0.0.1-next.9) (2025-08-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * add guards for verifiable storage keys ([5182e8b](https://github.com/twinfoundation/synchronised-storage/commit/5182e8b2a7868e8d396fd02964b0ed7f0c0a5947))
9
+
10
+
11
+ ### Dependencies
12
+
13
+ * The following workspace dependencies were updated
14
+ * dependencies
15
+ * @twin.org/synchronised-storage-models bumped from 0.0.1-next.8 to 0.0.1-next.9
16
+
3
17
  ## [0.0.1-next.8](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-service-v0.0.1-next.7...synchronised-storage-service-v0.0.1-next.8) (2025-08-13)
4
18
 
5
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@twin.org/synchronised-storage-service",
3
- "version": "0.0.1-next.8",
3
+ "version": "0.0.1-next.9",
4
4
  "description": "Synchronised storage contract implementation and REST endpoint definitions",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@twin.org/logging-models": "next",
27
27
  "@twin.org/nameof": "next",
28
28
  "@twin.org/standards-w3c-did": "next",
29
- "@twin.org/synchronised-storage-models": "0.0.1-next.8",
29
+ "@twin.org/synchronised-storage-models": "0.0.1-next.9",
30
30
  "@twin.org/verifiable-storage-models": "next",
31
31
  "@twin.org/web": "next"
32
32
  },