@twin.org/synchronised-storage-rest-client 0.0.3-next.9 → 0.9.0

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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # TWIN Synchronised Storage REST Client
1
+ # Synchronised Storage REST Client
2
2
 
3
- Synchronised storage contract implementation which can connect to REST endpoints.
3
+ This package provides a client for calling trusted synchronised storage REST endpoints, including decryption key retrieval and submission of change sets from connected nodes.
4
4
 
5
5
  ## Installation
6
6
 
@@ -44,7 +44,7 @@ export class SynchronisedStorageRestClient extends BaseRestClient {
44
44
  * Synchronise a set of changes from an untrusted node, assumes this is a trusted node.
45
45
  * @param syncChangeSet The change set to synchronise.
46
46
  * @param trustPayload Trust payload to verify the requesters identity.
47
- * @returns Nothing.
47
+ * @returns A promise that resolves when the change set has been accepted by the trusted node.
48
48
  */
49
49
  async syncChangeSet(syncChangeSet, trustPayload) {
50
50
  Guards.object(SynchronisedStorageRestClient.CLASS_NAME, "syncChangeSet", syncChangeSet);
@@ -1 +1 @@
1
- {"version":3,"file":"synchronisedStorageRestClient.js","sourceRoot":"","sources":["../../src/synchronisedStorageRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AASxC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,6BACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,mCAAmD;IAEpF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,CAAC,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACjF,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,6BAA6B,CAAC,UAAU,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAAC,YAAqB;QAClD,MAAM,CAAC,WAAW,CACjB,6BAA6B,CAAC,UAAU,kBAExC,YAAY,CACZ,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,iBAAiB,EACjB,KAAK,EACL;YACC,OAAO,EAAE;gBACR,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC;aACpE;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,aAAa,CAAC,aAA6B,EAAE,YAAqB;QAC9E,MAAM,CAAC,MAAM,CACZ,6BAA6B,CAAC,UAAU,mBAExC,aAAa,CACb,CAAC;QAEF,MAAM,CAAC,WAAW,CACjB,6BAA6B,CAAC,UAAU,kBAExC,YAAY,CACZ,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAA4C,iBAAiB,EAAE,MAAM,EAAE;YACtF,OAAO,EAAE;gBACR,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC;aACpE;YACD,IAAI,EAAE,aAAa;SACnB,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, INoContentResponse } from \"@twin.org/api-models\";\nimport { Guards } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tISyncChangeSet,\n\tISyncChangeSetRequest,\n\tISyncDecryptionKeyRequest,\n\tISyncDecryptionKeyResponse,\n\tISynchronisedStorageComponent\n} from \"@twin.org/synchronised-storage-models\";\nimport { HeaderHelper, HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing synchronised storage through to REST endpoints.\n */\nexport class SynchronisedStorageRestClient\n\textends BaseRestClient\n\timplements ISynchronisedStorageComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<SynchronisedStorageRestClient>();\n\n\t/**\n\t * Create a new instance of SynchronisedStorageRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(SynchronisedStorageRestClient.CLASS_NAME, config, \"synchronised-storage\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn SynchronisedStorageRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the decryption key for the synchronised storage.\n\t * This is used to decrypt the data stored in the synchronised storage.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The decryption key.\n\t */\n\tpublic async getDecryptionKey(trustPayload: unknown): Promise<string> {\n\t\tGuards.stringValue(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(trustPayload),\n\t\t\ttrustPayload\n\t\t);\n\n\t\tconst response = await this.fetch<ISyncDecryptionKeyRequest, ISyncDecryptionKeyResponse>(\n\t\t\t\"/decryption-key\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Authorization]: HeaderHelper.createBearer(trustPayload)\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body.decryptionKey;\n\t}\n\n\t/**\n\t * Synchronise a set of changes from an untrusted node, assumes this is a trusted node.\n\t * @param syncChangeSet The change set to synchronise.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns Nothing.\n\t */\n\tpublic async syncChangeSet(syncChangeSet: ISyncChangeSet, trustPayload: unknown): Promise<void> {\n\t\tGuards.object<ISyncChangeSet>(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(syncChangeSet),\n\t\t\tsyncChangeSet\n\t\t);\n\n\t\tGuards.stringValue(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(trustPayload),\n\t\t\ttrustPayload\n\t\t);\n\n\t\tawait this.fetch<ISyncChangeSetRequest, INoContentResponse>(\"/sync-changeset\", \"POST\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Authorization]: HeaderHelper.createBearer(trustPayload)\n\t\t\t},\n\t\t\tbody: syncChangeSet\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"file":"synchronisedStorageRestClient.js","sourceRoot":"","sources":["../../src/synchronisedStorageRestClient.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AASxC,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE1D;;GAEG;AACH,MAAM,OAAO,6BACZ,SAAQ,cAAc;IAGtB;;OAEG;IACI,MAAM,CAAU,UAAU,mCAAmD;IAEpF;;;OAGG;IACH,YAAY,MAA6B;QACxC,KAAK,CAAC,6BAA6B,CAAC,UAAU,EAAE,MAAM,EAAE,sBAAsB,CAAC,CAAC;IACjF,CAAC;IAED;;;OAGG;IACI,SAAS;QACf,OAAO,6BAA6B,CAAC,UAAU,CAAC;IACjD,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,gBAAgB,CAAC,YAAqB;QAClD,MAAM,CAAC,WAAW,CACjB,6BAA6B,CAAC,UAAU,kBAExC,YAAY,CACZ,CAAC;QAEF,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAChC,iBAAiB,EACjB,KAAK,EACL;YACC,OAAO,EAAE;gBACR,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC;aACpE;SACD,CACD,CAAC;QAEF,OAAO,QAAQ,CAAC,IAAI,CAAC,aAAa,CAAC;IACpC,CAAC;IAED;;;;;OAKG;IACI,KAAK,CAAC,aAAa,CAAC,aAA6B,EAAE,YAAqB;QAC9E,MAAM,CAAC,MAAM,CACZ,6BAA6B,CAAC,UAAU,mBAExC,aAAa,CACb,CAAC;QAEF,MAAM,CAAC,WAAW,CACjB,6BAA6B,CAAC,UAAU,kBAExC,YAAY,CACZ,CAAC;QAEF,MAAM,IAAI,CAAC,KAAK,CAA4C,iBAAiB,EAAE,MAAM,EAAE;YACtF,OAAO,EAAE;gBACR,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,YAAY,CAAC;aACpE;YACD,IAAI,EAAE,aAAa;SACnB,CAAC,CAAC;IACJ,CAAC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport { BaseRestClient } from \"@twin.org/api-core\";\nimport type { IBaseRestClientConfig, INoContentResponse } from \"@twin.org/api-models\";\nimport { Guards } from \"@twin.org/core\";\nimport { nameof } from \"@twin.org/nameof\";\nimport type {\n\tISyncChangeSet,\n\tISyncChangeSetRequest,\n\tISyncDecryptionKeyRequest,\n\tISyncDecryptionKeyResponse,\n\tISynchronisedStorageComponent\n} from \"@twin.org/synchronised-storage-models\";\nimport { HeaderHelper, HeaderTypes } from \"@twin.org/web\";\n\n/**\n * Client for performing synchronised storage through to REST endpoints.\n */\nexport class SynchronisedStorageRestClient\n\textends BaseRestClient\n\timplements ISynchronisedStorageComponent\n{\n\t/**\n\t * Runtime name for the class.\n\t */\n\tpublic static readonly CLASS_NAME: string = nameof<SynchronisedStorageRestClient>();\n\n\t/**\n\t * Create a new instance of SynchronisedStorageRestClient.\n\t * @param config The configuration for the client.\n\t */\n\tconstructor(config: IBaseRestClientConfig) {\n\t\tsuper(SynchronisedStorageRestClient.CLASS_NAME, config, \"synchronised-storage\");\n\t}\n\n\t/**\n\t * Returns the class name of the component.\n\t * @returns The class name of the component.\n\t */\n\tpublic className(): string {\n\t\treturn SynchronisedStorageRestClient.CLASS_NAME;\n\t}\n\n\t/**\n\t * Get the decryption key for the synchronised storage.\n\t * This is used to decrypt the data stored in the synchronised storage.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns The decryption key.\n\t */\n\tpublic async getDecryptionKey(trustPayload: unknown): Promise<string> {\n\t\tGuards.stringValue(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(trustPayload),\n\t\t\ttrustPayload\n\t\t);\n\n\t\tconst response = await this.fetch<ISyncDecryptionKeyRequest, ISyncDecryptionKeyResponse>(\n\t\t\t\"/decryption-key\",\n\t\t\t\"GET\",\n\t\t\t{\n\t\t\t\theaders: {\n\t\t\t\t\t[HeaderTypes.Authorization]: HeaderHelper.createBearer(trustPayload)\n\t\t\t\t}\n\t\t\t}\n\t\t);\n\n\t\treturn response.body.decryptionKey;\n\t}\n\n\t/**\n\t * Synchronise a set of changes from an untrusted node, assumes this is a trusted node.\n\t * @param syncChangeSet The change set to synchronise.\n\t * @param trustPayload Trust payload to verify the requesters identity.\n\t * @returns A promise that resolves when the change set has been accepted by the trusted node.\n\t */\n\tpublic async syncChangeSet(syncChangeSet: ISyncChangeSet, trustPayload: unknown): Promise<void> {\n\t\tGuards.object<ISyncChangeSet>(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(syncChangeSet),\n\t\t\tsyncChangeSet\n\t\t);\n\n\t\tGuards.stringValue(\n\t\t\tSynchronisedStorageRestClient.CLASS_NAME,\n\t\t\tnameof(trustPayload),\n\t\t\ttrustPayload\n\t\t);\n\n\t\tawait this.fetch<ISyncChangeSetRequest, INoContentResponse>(\"/sync-changeset\", \"POST\", {\n\t\t\theaders: {\n\t\t\t\t[HeaderTypes.Authorization]: HeaderHelper.createBearer(trustPayload)\n\t\t\t},\n\t\t\tbody: syncChangeSet\n\t\t});\n\t}\n}\n"]}
@@ -30,7 +30,7 @@ export declare class SynchronisedStorageRestClient extends BaseRestClient implem
30
30
  * Synchronise a set of changes from an untrusted node, assumes this is a trusted node.
31
31
  * @param syncChangeSet The change set to synchronise.
32
32
  * @param trustPayload Trust payload to verify the requesters identity.
33
- * @returns Nothing.
33
+ * @returns A promise that resolves when the change set has been accepted by the trusted node.
34
34
  */
35
35
  syncChangeSet(syncChangeSet: ISyncChangeSet, trustPayload: unknown): Promise<void>;
36
36
  }
package/docs/changelog.md CHANGED
@@ -1,6 +1,128 @@
1
1
  # Changelog
2
2
 
3
- ## [0.0.3-next.9](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.8...synchronised-storage-rest-client-v0.0.3-next.9) (2026-03-04)
3
+ ## [0.9.0](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.9.0...synchronised-storage-rest-client-v0.9.0) (2026-06-25)
4
+
5
+
6
+ ### Features
7
+
8
+ * initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
9
+ * release to production ([#55](https://github.com/iotaledger/twin-synchronised-storage/issues/55)) ([8e5df2f](https://github.com/iotaledger/twin-synchronised-storage/commit/8e5df2fd3ef9c7a39d7bd9f366fe54b266eb0d5b))
10
+
11
+ ## [0.9.0-next.1](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.9.0-next.0...synchronised-storage-rest-client-v0.9.0-next.1) (2026-06-24)
12
+
13
+
14
+ ### Features
15
+
16
+ * add context id features ([#24](https://github.com/iotaledger/twin-synchronised-storage/issues/24)) ([5266b18](https://github.com/iotaledger/twin-synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
17
+ * add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
18
+ * add trustPayload guards ([cf1622f](https://github.com/iotaledger/twin-synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
19
+ * add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
20
+ * blob storage connector instead of component ([#7](https://github.com/iotaledger/twin-synchronised-storage/issues/7)) ([ea27241](https://github.com/iotaledger/twin-synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
21
+ * eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
22
+ * initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
23
+ * remove unused dependencies ([518c460](https://github.com/iotaledger/twin-synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
24
+ * typescript 6 update ([b0e6d52](https://github.com/iotaledger/twin-synchronised-storage/commit/b0e6d52f622dc1ff2273f5e09e8370382742ae50))
25
+ * update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
26
+ * update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
27
+ * use trust component ([424f0d6](https://github.com/iotaledger/twin-synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
28
+
29
+
30
+ ### Bug Fixes
31
+
32
+ * remove redundant code ([19edb23](https://github.com/iotaledger/twin-synchronised-storage/commit/19edb236f318b9c9454a64259d0ab5098a0c8173))
33
+
34
+
35
+ ### Dependencies
36
+
37
+ * The following workspace dependencies were updated
38
+ * dependencies
39
+ * @twin.org/synchronised-storage-models bumped from 0.9.0-next.0 to 0.9.0-next.1
40
+
41
+ ## [0.0.3-next.15](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.14...synchronised-storage-rest-client-v0.0.3-next.15) (2026-06-11)
42
+
43
+
44
+ ### Miscellaneous Chores
45
+
46
+ * **synchronised-storage-rest-client:** Synchronize repo versions
47
+
48
+
49
+ ### Dependencies
50
+
51
+ * The following workspace dependencies were updated
52
+ * dependencies
53
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.14 to 0.0.3-next.15
54
+
55
+ ## [0.0.3-next.14](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.13...synchronised-storage-rest-client-v0.0.3-next.14) (2026-05-20)
56
+
57
+
58
+ ### Miscellaneous Chores
59
+
60
+ * **synchronised-storage-rest-client:** Synchronize repo versions
61
+
62
+
63
+ ### Dependencies
64
+
65
+ * The following workspace dependencies were updated
66
+ * dependencies
67
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.13 to 0.0.3-next.14
68
+
69
+ ## [0.0.3-next.13](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.12...synchronised-storage-rest-client-v0.0.3-next.13) (2026-05-12)
70
+
71
+
72
+ ### Features
73
+
74
+ * typescript 6 update ([b0e6d52](https://github.com/iotaledger/twin-synchronised-storage/commit/b0e6d52f622dc1ff2273f5e09e8370382742ae50))
75
+
76
+
77
+ ### Dependencies
78
+
79
+ * The following workspace dependencies were updated
80
+ * dependencies
81
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.12 to 0.0.3-next.13
82
+
83
+ ## [0.0.3-next.12](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.11...synchronised-storage-rest-client-v0.0.3-next.12) (2026-05-07)
84
+
85
+
86
+ ### Miscellaneous Chores
87
+
88
+ * **synchronised-storage-rest-client:** Synchronize repo versions
89
+
90
+
91
+ ### Dependencies
92
+
93
+ * The following workspace dependencies were updated
94
+ * dependencies
95
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.11 to 0.0.3-next.12
96
+
97
+ ## [0.0.3-next.11](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.10...synchronised-storage-rest-client-v0.0.3-next.11) (2026-04-10)
98
+
99
+
100
+ ### Miscellaneous Chores
101
+
102
+ * **synchronised-storage-rest-client:** Synchronize repo versions
103
+
104
+
105
+ ### Dependencies
106
+
107
+ * The following workspace dependencies were updated
108
+ * dependencies
109
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.10 to 0.0.3-next.11
110
+
111
+ ## [0.0.3-next.10](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.9...synchronised-storage-rest-client-v0.0.3-next.10) (2026-03-20)
112
+
113
+
114
+ ### Bug Fixes
115
+
116
+ * remove redundant code ([19edb23](https://github.com/iotaledger/twin-synchronised-storage/commit/19edb236f318b9c9454a64259d0ab5098a0c8173))
117
+
118
+
119
+ ### Dependencies
120
+
121
+ * The following workspace dependencies were updated
122
+ * dependencies
123
+ * @twin.org/synchronised-storage-models bumped from 0.0.3-next.9 to 0.0.3-next.10
124
+
125
+ ## [0.0.3-next.9](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.8...synchronised-storage-rest-client-v0.0.3-next.9) (2026-03-04)
4
126
 
5
127
 
6
128
  ### Miscellaneous Chores
@@ -14,7 +136,7 @@
14
136
  * dependencies
15
137
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
16
138
 
17
- ## [0.0.3-next.8](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.7...synchronised-storage-rest-client-v0.0.3-next.8) (2026-02-25)
139
+ ## [0.0.3-next.8](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.7...synchronised-storage-rest-client-v0.0.3-next.8) (2026-02-25)
18
140
 
19
141
 
20
142
  ### Miscellaneous Chores
@@ -28,7 +150,7 @@
28
150
  * dependencies
29
151
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
30
152
 
31
- ## [0.0.3-next.7](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.6...synchronised-storage-rest-client-v0.0.3-next.7) (2026-01-28)
153
+ ## [0.0.3-next.7](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.6...synchronised-storage-rest-client-v0.0.3-next.7) (2026-01-28)
32
154
 
33
155
 
34
156
  ### Miscellaneous Chores
@@ -42,7 +164,7 @@
42
164
  * dependencies
43
165
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
44
166
 
45
- ## [0.0.3-next.6](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.5...synchronised-storage-rest-client-v0.0.3-next.6) (2026-01-22)
167
+ ## [0.0.3-next.6](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.5...synchronised-storage-rest-client-v0.0.3-next.6) (2026-01-22)
46
168
 
47
169
 
48
170
  ### Miscellaneous Chores
@@ -56,12 +178,12 @@
56
178
  * dependencies
57
179
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
58
180
 
59
- ## [0.0.3-next.5](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.4...synchronised-storage-rest-client-v0.0.3-next.5) (2026-01-19)
181
+ ## [0.0.3-next.5](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.4...synchronised-storage-rest-client-v0.0.3-next.5) (2026-01-19)
60
182
 
61
183
 
62
184
  ### Features
63
185
 
64
- * remove unused dependencies ([518c460](https://github.com/twinfoundation/synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
186
+ * remove unused dependencies ([518c460](https://github.com/iotaledger/twin-synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
65
187
 
66
188
 
67
189
  ### Dependencies
@@ -70,7 +192,7 @@
70
192
  * dependencies
71
193
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
72
194
 
73
- ## [0.0.3-next.4](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.3...synchronised-storage-rest-client-v0.0.3-next.4) (2026-01-15)
195
+ ## [0.0.3-next.4](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.3...synchronised-storage-rest-client-v0.0.3-next.4) (2026-01-15)
74
196
 
75
197
 
76
198
  ### Miscellaneous Chores
@@ -84,12 +206,12 @@
84
206
  * dependencies
85
207
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
86
208
 
87
- ## [0.0.3-next.3](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.2...synchronised-storage-rest-client-v0.0.3-next.3) (2026-01-12)
209
+ ## [0.0.3-next.3](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.2...synchronised-storage-rest-client-v0.0.3-next.3) (2026-01-12)
88
210
 
89
211
 
90
212
  ### Features
91
213
 
92
- * add trustPayload guards ([cf1622f](https://github.com/twinfoundation/synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
214
+ * add trustPayload guards ([cf1622f](https://github.com/iotaledger/twin-synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
93
215
 
94
216
 
95
217
  ### Dependencies
@@ -98,12 +220,12 @@
98
220
  * dependencies
99
221
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
100
222
 
101
- ## [0.0.3-next.2](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.1...synchronised-storage-rest-client-v0.0.3-next.2) (2025-12-04)
223
+ ## [0.0.3-next.2](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.1...synchronised-storage-rest-client-v0.0.3-next.2) (2025-12-04)
102
224
 
103
225
 
104
226
  ### Features
105
227
 
106
- * use trust component ([424f0d6](https://github.com/twinfoundation/synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
228
+ * use trust component ([424f0d6](https://github.com/iotaledger/twin-synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
107
229
 
108
230
 
109
231
  ### Dependencies
@@ -112,19 +234,19 @@
112
234
  * dependencies
113
235
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
114
236
 
115
- ## [0.0.3-next.1](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.0...synchronised-storage-rest-client-v0.0.3-next.1) (2025-11-12)
237
+ ## [0.0.3-next.1](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.3-next.0...synchronised-storage-rest-client-v0.0.3-next.1) (2025-11-12)
116
238
 
117
239
 
118
240
  ### Features
119
241
 
120
- * add context id features ([#24](https://github.com/twinfoundation/synchronised-storage/issues/24)) ([5266b18](https://github.com/twinfoundation/synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
121
- * add rights management integration ([d003d33](https://github.com/twinfoundation/synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
122
- * add validate-locales ([e3d7b98](https://github.com/twinfoundation/synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
123
- * blob storage connector instead of component ([#7](https://github.com/twinfoundation/synchronised-storage/issues/7)) ([ea27241](https://github.com/twinfoundation/synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
124
- * eslint migration to flat config ([f601c14](https://github.com/twinfoundation/synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
125
- * initial commit ([16949b8](https://github.com/twinfoundation/synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
126
- * update framework core ([99f09cc](https://github.com/twinfoundation/synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
127
- * update to in built vc auth mechanism ([411a371](https://github.com/twinfoundation/synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
242
+ * add context id features ([#24](https://github.com/iotaledger/twin-synchronised-storage/issues/24)) ([5266b18](https://github.com/iotaledger/twin-synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
243
+ * add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
244
+ * add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
245
+ * blob storage connector instead of component ([#7](https://github.com/iotaledger/twin-synchronised-storage/issues/7)) ([ea27241](https://github.com/iotaledger/twin-synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
246
+ * eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
247
+ * initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
248
+ * update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
249
+ * update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
128
250
 
129
251
 
130
252
  ### Dependencies
@@ -133,12 +255,12 @@
133
255
  * dependencies
134
256
  * @twin.org/synchronised-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
135
257
 
136
- ## [0.0.1-next.16](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.15...synchronised-storage-rest-client-v0.0.1-next.16) (2025-10-09)
258
+ ## [0.0.1-next.16](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.15...synchronised-storage-rest-client-v0.0.1-next.16) (2025-10-09)
137
259
 
138
260
 
139
261
  ### Features
140
262
 
141
- * add validate-locales ([e3d7b98](https://github.com/twinfoundation/synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
263
+ * add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
142
264
 
143
265
 
144
266
  ### Dependencies
@@ -147,12 +269,12 @@
147
269
  * dependencies
148
270
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.15 to 0.0.1-next.16
149
271
 
150
- ## [0.0.1-next.15](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.14...synchronised-storage-rest-client-v0.0.1-next.15) (2025-09-23)
272
+ ## [0.0.1-next.15](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.14...synchronised-storage-rest-client-v0.0.1-next.15) (2025-09-23)
151
273
 
152
274
 
153
275
  ### Features
154
276
 
155
- * update to in built vc auth mechanism ([411a371](https://github.com/twinfoundation/synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
277
+ * update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
156
278
 
157
279
 
158
280
  ### Dependencies
@@ -161,12 +283,12 @@
161
283
  * dependencies
162
284
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.14 to 0.0.1-next.15
163
285
 
164
- ## [0.0.1-next.14](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.13...synchronised-storage-rest-client-v0.0.1-next.14) (2025-09-22)
286
+ ## [0.0.1-next.14](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.13...synchronised-storage-rest-client-v0.0.1-next.14) (2025-09-22)
165
287
 
166
288
 
167
289
  ### Features
168
290
 
169
- * add rights management integration ([d003d33](https://github.com/twinfoundation/synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
291
+ * add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
170
292
 
171
293
 
172
294
  ### Dependencies
@@ -175,12 +297,12 @@
175
297
  * dependencies
176
298
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.13 to 0.0.1-next.14
177
299
 
178
- ## [0.0.1-next.13](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.12...synchronised-storage-rest-client-v0.0.1-next.13) (2025-08-29)
300
+ ## [0.0.1-next.13](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.12...synchronised-storage-rest-client-v0.0.1-next.13) (2025-08-29)
179
301
 
180
302
 
181
303
  ### Features
182
304
 
183
- * eslint migration to flat config ([f601c14](https://github.com/twinfoundation/synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
305
+ * eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
184
306
 
185
307
 
186
308
  ### Dependencies
@@ -189,12 +311,12 @@
189
311
  * dependencies
190
312
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.12 to 0.0.1-next.13
191
313
 
192
- ## [0.0.1-next.12](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.11...synchronised-storage-rest-client-v0.0.1-next.12) (2025-08-21)
314
+ ## [0.0.1-next.12](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.11...synchronised-storage-rest-client-v0.0.1-next.12) (2025-08-21)
193
315
 
194
316
 
195
317
  ### Features
196
318
 
197
- * update framework core ([99f09cc](https://github.com/twinfoundation/synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
319
+ * update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
198
320
 
199
321
 
200
322
  ### Dependencies
@@ -203,7 +325,7 @@
203
325
  * dependencies
204
326
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.11 to 0.0.1-next.12
205
327
 
206
- ## [0.0.1-next.11](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.10...synchronised-storage-rest-client-v0.0.1-next.11) (2025-08-15)
328
+ ## [0.0.1-next.11](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.10...synchronised-storage-rest-client-v0.0.1-next.11) (2025-08-15)
207
329
 
208
330
 
209
331
  ### Miscellaneous Chores
@@ -217,7 +339,7 @@
217
339
  * dependencies
218
340
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.10 to 0.0.1-next.11
219
341
 
220
- ## [0.0.1-next.10](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.9...synchronised-storage-rest-client-v0.0.1-next.10) (2025-08-15)
342
+ ## [0.0.1-next.10](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.9...synchronised-storage-rest-client-v0.0.1-next.10) (2025-08-15)
221
343
 
222
344
 
223
345
  ### Miscellaneous Chores
@@ -231,7 +353,7 @@
231
353
  * dependencies
232
354
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.9 to 0.0.1-next.10
233
355
 
234
- ## [0.0.1-next.9](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.8...synchronised-storage-rest-client-v0.0.1-next.9) (2025-08-13)
356
+ ## [0.0.1-next.9](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.8...synchronised-storage-rest-client-v0.0.1-next.9) (2025-08-13)
235
357
 
236
358
 
237
359
  ### Miscellaneous Chores
@@ -245,7 +367,7 @@
245
367
  * dependencies
246
368
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.8 to 0.0.1-next.9
247
369
 
248
- ## [0.0.1-next.8](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.7...synchronised-storage-rest-client-v0.0.1-next.8) (2025-08-13)
370
+ ## [0.0.1-next.8](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.7...synchronised-storage-rest-client-v0.0.1-next.8) (2025-08-13)
249
371
 
250
372
 
251
373
  ### Miscellaneous Chores
@@ -259,7 +381,7 @@
259
381
  * dependencies
260
382
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.7 to 0.0.1-next.8
261
383
 
262
- ## [0.0.1-next.7](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.6...synchronised-storage-rest-client-v0.0.1-next.7) (2025-08-12)
384
+ ## [0.0.1-next.7](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.6...synchronised-storage-rest-client-v0.0.1-next.7) (2025-08-12)
263
385
 
264
386
 
265
387
  ### Miscellaneous Chores
@@ -273,7 +395,7 @@
273
395
  * dependencies
274
396
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.6 to 0.0.1-next.7
275
397
 
276
- ## [0.0.1-next.6](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.5...synchronised-storage-rest-client-v0.0.1-next.6) (2025-08-11)
398
+ ## [0.0.1-next.6](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.5...synchronised-storage-rest-client-v0.0.1-next.6) (2025-08-11)
277
399
 
278
400
 
279
401
  ### Miscellaneous Chores
@@ -287,7 +409,7 @@
287
409
  * dependencies
288
410
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.5 to 0.0.1-next.6
289
411
 
290
- ## [0.0.1-next.5](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.4...synchronised-storage-rest-client-v0.0.1-next.5) (2025-08-11)
412
+ ## [0.0.1-next.5](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.4...synchronised-storage-rest-client-v0.0.1-next.5) (2025-08-11)
291
413
 
292
414
 
293
415
  ### Miscellaneous Chores
@@ -301,12 +423,12 @@
301
423
  * dependencies
302
424
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.4 to 0.0.1-next.5
303
425
 
304
- ## [0.0.1-next.4](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.3...synchronised-storage-rest-client-v0.0.1-next.4) (2025-08-08)
426
+ ## [0.0.1-next.4](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.3...synchronised-storage-rest-client-v0.0.1-next.4) (2025-08-08)
305
427
 
306
428
 
307
429
  ### Features
308
430
 
309
- * blob storage connector instead of component ([#7](https://github.com/twinfoundation/synchronised-storage/issues/7)) ([ea27241](https://github.com/twinfoundation/synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
431
+ * blob storage connector instead of component ([#7](https://github.com/iotaledger/twin-synchronised-storage/issues/7)) ([ea27241](https://github.com/iotaledger/twin-synchronised-storage/commit/ea27241cf0810b52ab7a6be7346809d127b7109a))
310
432
 
311
433
 
312
434
  ### Dependencies
@@ -315,7 +437,7 @@
315
437
  * dependencies
316
438
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.3 to 0.0.1-next.4
317
439
 
318
- ## [0.0.1-next.3](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.2...synchronised-storage-rest-client-v0.0.1-next.3) (2025-07-25)
440
+ ## [0.0.1-next.3](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.2...synchronised-storage-rest-client-v0.0.1-next.3) (2025-07-25)
319
441
 
320
442
 
321
443
  ### Miscellaneous Chores
@@ -329,7 +451,7 @@
329
451
  * dependencies
330
452
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.2 to 0.0.1-next.3
331
453
 
332
- ## [0.0.1-next.2](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.1...synchronised-storage-rest-client-v0.0.1-next.2) (2025-07-22)
454
+ ## [0.0.1-next.2](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.1...synchronised-storage-rest-client-v0.0.1-next.2) (2025-07-22)
333
455
 
334
456
 
335
457
  ### Miscellaneous Chores
@@ -343,12 +465,12 @@
343
465
  * dependencies
344
466
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.1 to 0.0.1-next.2
345
467
 
346
- ## [0.0.1-next.1](https://github.com/twinfoundation/synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.0...synchronised-storage-rest-client-v0.0.1-next.1) (2025-07-18)
468
+ ## [0.0.1-next.1](https://github.com/iotaledger/twin-synchronised-storage/compare/synchronised-storage-rest-client-v0.0.1-next.0...synchronised-storage-rest-client-v0.0.1-next.1) (2025-07-18)
347
469
 
348
470
 
349
471
  ### Features
350
472
 
351
- * initial commit ([16949b8](https://github.com/twinfoundation/synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
473
+ * initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
352
474
 
353
475
 
354
476
  ### Dependencies
@@ -357,4 +479,4 @@
357
479
  * dependencies
358
480
  * @twin.org/synchronised-storage-models bumped from 0.0.1-next.0 to 0.0.1-next.1
359
481
 
360
- ## @twin.org/synchronised-storage-rest-client - Changelog
482
+ ## Changelog
package/docs/examples.md CHANGED
@@ -1 +1,56 @@
1
- # @twin.org/synchronised-storage-rest-client - Examples
1
+ # Synchronised Storage REST Client Examples
2
+
3
+ These snippets show how to call trusted synchronisation endpoints from a node or backend process using strongly typed request data.
4
+
5
+ ## SynchronisedStorageRestClient
6
+
7
+ ```typescript
8
+ import { SynchronisedStorageRestClient } from '@twin.org/synchronised-storage-rest-client';
9
+
10
+ const client = new SynchronisedStorageRestClient({
11
+ endpoint: 'https://api.example.net'
12
+ });
13
+
14
+ const className = client.className();
15
+
16
+ console.log(className); // SynchronisedStorageRestClient
17
+ ```
18
+
19
+ ```typescript
20
+ import {
21
+ SynchronisedStorageContexts,
22
+ SynchronisedStorageTypes,
23
+ type ISyncChangeSet
24
+ } from '@twin.org/synchronised-storage-models';
25
+ import { SynchronisedStorageRestClient } from '@twin.org/synchronised-storage-rest-client';
26
+
27
+ const client = new SynchronisedStorageRestClient({
28
+ endpoint: 'https://api.example.net'
29
+ });
30
+
31
+ const trustPayload = 'eyJhbGciOiJFZERTQSJ9.sample-payload.signature';
32
+ const decryptionKey = await client.getDecryptionKey(trustPayload);
33
+
34
+ console.log(decryptionKey.length); // 44
35
+
36
+ const changeSet: ISyncChangeSet = {
37
+ '@context': SynchronisedStorageContexts.Context,
38
+ type: SynchronisedStorageTypes.ChangeSet,
39
+ id: 'changeset-20260310-01',
40
+ storageKey: 'profile',
41
+ dateCreated: '2026-03-10T10:00:00.000Z',
42
+ dateModified: '2026-03-10T10:00:00.000Z',
43
+ nodeIdentity: 'did:iota:node-2',
44
+ changes: [
45
+ {
46
+ operation: 'set',
47
+ id: 'profile-4',
48
+ entity: {
49
+ dateModified: '2026-03-10T10:00:00.000Z'
50
+ }
51
+ }
52
+ ]
53
+ };
54
+
55
+ await client.syncChangeSet(changeSet, trustPayload);
56
+ ```
@@ -36,7 +36,7 @@ The configuration for the client.
36
36
 
37
37
  ## Properties
38
38
 
39
- ### CLASS\_NAME
39
+ ### CLASS\_NAME {#class_name}
40
40
 
41
41
  > `readonly` `static` **CLASS\_NAME**: `string`
42
42
 
@@ -44,7 +44,7 @@ Runtime name for the class.
44
44
 
45
45
  ## Methods
46
46
 
47
- ### className()
47
+ ### className() {#classname}
48
48
 
49
49
  > **className**(): `string`
50
50
 
@@ -62,7 +62,7 @@ The class name of the component.
62
62
 
63
63
  ***
64
64
 
65
- ### getDecryptionKey()
65
+ ### getDecryptionKey() {#getdecryptionkey}
66
66
 
67
67
  > **getDecryptionKey**(`trustPayload`): `Promise`\<`string`\>
68
68
 
@@ -89,7 +89,7 @@ The decryption key.
89
89
 
90
90
  ***
91
91
 
92
- ### syncChangeSet()
92
+ ### syncChangeSet() {#syncchangeset}
93
93
 
94
94
  > **syncChangeSet**(`syncChangeSet`, `trustPayload`): `Promise`\<`void`\>
95
95
 
@@ -113,7 +113,7 @@ Trust payload to verify the requesters identity.
113
113
 
114
114
  `Promise`\<`void`\>
115
115
 
116
- Nothing.
116
+ A promise that resolves when the change set has been accepted by the trusted node.
117
117
 
118
118
  #### Implementation of
119
119
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@twin.org/synchronised-storage-rest-client",
3
- "version": "0.0.3-next.9",
4
- "description": "Synchronised storage contract implementation which can connect to REST endpoints",
3
+ "version": "0.9.0",
4
+ "description": "REST client for trusted decryption key retrieval and change set synchronisation.",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "git+https://github.com/twinfoundation/synchronised-storage.git",
7
+ "url": "git+https://github.com/iotaledger/twin-synchronised-storage.git",
8
8
  "directory": "packages/synchronised-storage-rest-client"
9
9
  },
10
10
  "author": "martyn.janes@iota.org",
@@ -14,15 +14,14 @@
14
14
  "node": ">=20.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@twin.org/api-core": "next",
18
- "@twin.org/api-models": "next",
19
- "@twin.org/context": "next",
20
- "@twin.org/core": "next",
21
- "@twin.org/entity": "next",
22
- "@twin.org/nameof": "next",
23
- "@twin.org/standards-w3c-did": "next",
24
- "@twin.org/synchronised-storage-models": "0.0.3-next.9",
25
- "@twin.org/web": "next"
17
+ "@twin.org/api-core": "^0.9.0",
18
+ "@twin.org/api-models": "^0.9.0",
19
+ "@twin.org/context": "^0.9.0",
20
+ "@twin.org/core": "^0.9.0",
21
+ "@twin.org/entity": "^0.9.0",
22
+ "@twin.org/nameof": "^0.9.0",
23
+ "@twin.org/synchronised-storage-models": "^0.9.0",
24
+ "@twin.org/web": "^0.9.0"
26
25
  },
27
26
  "main": "./dist/es/index.js",
28
27
  "types": "./dist/types/index.d.ts",
@@ -49,7 +48,7 @@
49
48
  "synchronised-storage"
50
49
  ],
51
50
  "bugs": {
52
- "url": "git+https://github.com/twinfoundation/synchronised-storage/issues"
51
+ "url": "git+https://github.com/iotaledger/twin-synchronised-storage/issues"
53
52
  },
54
53
  "homepage": "https://twindev.org"
55
54
  }