@twin.org/synchronised-storage-rest-client 0.0.3-next.9 → 0.9.0-next.1
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 +2 -2
- package/dist/es/synchronisedStorageRestClient.js +1 -1
- package/dist/es/synchronisedStorageRestClient.js.map +1 -1
- package/dist/types/synchronisedStorageRestClient.d.ts +1 -1
- package/docs/changelog.md +158 -44
- package/docs/examples.md +56 -1
- package/docs/reference/classes/SynchronisedStorageRestClient.md +5 -5
- package/package.json +12 -13
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Synchronised Storage REST Client
|
|
2
2
|
|
|
3
|
-
|
|
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
|
|
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
|
|
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
|
|
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,120 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [0.0
|
|
3
|
+
## [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)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add context id features ([#24](https://github.com/iotaledger/twin-synchronised-storage/issues/24)) ([5266b18](https://github.com/iotaledger/twin-synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
|
|
9
|
+
* add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
|
|
10
|
+
* add trustPayload guards ([cf1622f](https://github.com/iotaledger/twin-synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
|
|
11
|
+
* add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
|
|
12
|
+
* 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))
|
|
13
|
+
* eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
|
|
14
|
+
* initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
|
|
15
|
+
* remove unused dependencies ([518c460](https://github.com/iotaledger/twin-synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
|
|
16
|
+
* typescript 6 update ([b0e6d52](https://github.com/iotaledger/twin-synchronised-storage/commit/b0e6d52f622dc1ff2273f5e09e8370382742ae50))
|
|
17
|
+
* update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
|
|
18
|
+
* update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
|
|
19
|
+
* use trust component ([424f0d6](https://github.com/iotaledger/twin-synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* remove redundant code ([19edb23](https://github.com/iotaledger/twin-synchronised-storage/commit/19edb236f318b9c9454a64259d0ab5098a0c8173))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
### Dependencies
|
|
28
|
+
|
|
29
|
+
* The following workspace dependencies were updated
|
|
30
|
+
* dependencies
|
|
31
|
+
* @twin.org/synchronised-storage-models bumped from 0.9.0-next.0 to 0.9.0-next.1
|
|
32
|
+
|
|
33
|
+
## [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)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Miscellaneous Chores
|
|
37
|
+
|
|
38
|
+
* **synchronised-storage-rest-client:** Synchronize repo versions
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
### Dependencies
|
|
42
|
+
|
|
43
|
+
* The following workspace dependencies were updated
|
|
44
|
+
* dependencies
|
|
45
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.14 to 0.0.3-next.15
|
|
46
|
+
|
|
47
|
+
## [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)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Miscellaneous Chores
|
|
51
|
+
|
|
52
|
+
* **synchronised-storage-rest-client:** Synchronize repo versions
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### Dependencies
|
|
56
|
+
|
|
57
|
+
* The following workspace dependencies were updated
|
|
58
|
+
* dependencies
|
|
59
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.13 to 0.0.3-next.14
|
|
60
|
+
|
|
61
|
+
## [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)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Features
|
|
65
|
+
|
|
66
|
+
* typescript 6 update ([b0e6d52](https://github.com/iotaledger/twin-synchronised-storage/commit/b0e6d52f622dc1ff2273f5e09e8370382742ae50))
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Dependencies
|
|
70
|
+
|
|
71
|
+
* The following workspace dependencies were updated
|
|
72
|
+
* dependencies
|
|
73
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.12 to 0.0.3-next.13
|
|
74
|
+
|
|
75
|
+
## [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)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### Miscellaneous Chores
|
|
79
|
+
|
|
80
|
+
* **synchronised-storage-rest-client:** Synchronize repo versions
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Dependencies
|
|
84
|
+
|
|
85
|
+
* The following workspace dependencies were updated
|
|
86
|
+
* dependencies
|
|
87
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.11 to 0.0.3-next.12
|
|
88
|
+
|
|
89
|
+
## [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)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
### Miscellaneous Chores
|
|
93
|
+
|
|
94
|
+
* **synchronised-storage-rest-client:** Synchronize repo versions
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
### Dependencies
|
|
98
|
+
|
|
99
|
+
* The following workspace dependencies were updated
|
|
100
|
+
* dependencies
|
|
101
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.10 to 0.0.3-next.11
|
|
102
|
+
|
|
103
|
+
## [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)
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
### Bug Fixes
|
|
107
|
+
|
|
108
|
+
* remove redundant code ([19edb23](https://github.com/iotaledger/twin-synchronised-storage/commit/19edb236f318b9c9454a64259d0ab5098a0c8173))
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
### Dependencies
|
|
112
|
+
|
|
113
|
+
* The following workspace dependencies were updated
|
|
114
|
+
* dependencies
|
|
115
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.9 to 0.0.3-next.10
|
|
116
|
+
|
|
117
|
+
## [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
118
|
|
|
5
119
|
|
|
6
120
|
### Miscellaneous Chores
|
|
@@ -14,7 +128,7 @@
|
|
|
14
128
|
* dependencies
|
|
15
129
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
16
130
|
|
|
17
|
-
## [0.0.3-next.8](https://github.com/
|
|
131
|
+
## [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
132
|
|
|
19
133
|
|
|
20
134
|
### Miscellaneous Chores
|
|
@@ -28,7 +142,7 @@
|
|
|
28
142
|
* dependencies
|
|
29
143
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
30
144
|
|
|
31
|
-
## [0.0.3-next.7](https://github.com/
|
|
145
|
+
## [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
146
|
|
|
33
147
|
|
|
34
148
|
### Miscellaneous Chores
|
|
@@ -42,7 +156,7 @@
|
|
|
42
156
|
* dependencies
|
|
43
157
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
44
158
|
|
|
45
|
-
## [0.0.3-next.6](https://github.com/
|
|
159
|
+
## [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
160
|
|
|
47
161
|
|
|
48
162
|
### Miscellaneous Chores
|
|
@@ -56,12 +170,12 @@
|
|
|
56
170
|
* dependencies
|
|
57
171
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
58
172
|
|
|
59
|
-
## [0.0.3-next.5](https://github.com/
|
|
173
|
+
## [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
174
|
|
|
61
175
|
|
|
62
176
|
### Features
|
|
63
177
|
|
|
64
|
-
* remove unused dependencies ([518c460](https://github.com/
|
|
178
|
+
* remove unused dependencies ([518c460](https://github.com/iotaledger/twin-synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
|
|
65
179
|
|
|
66
180
|
|
|
67
181
|
### Dependencies
|
|
@@ -70,7 +184,7 @@
|
|
|
70
184
|
* dependencies
|
|
71
185
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
72
186
|
|
|
73
|
-
## [0.0.3-next.4](https://github.com/
|
|
187
|
+
## [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
188
|
|
|
75
189
|
|
|
76
190
|
### Miscellaneous Chores
|
|
@@ -84,12 +198,12 @@
|
|
|
84
198
|
* dependencies
|
|
85
199
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
86
200
|
|
|
87
|
-
## [0.0.3-next.3](https://github.com/
|
|
201
|
+
## [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
202
|
|
|
89
203
|
|
|
90
204
|
### Features
|
|
91
205
|
|
|
92
|
-
* add trustPayload guards ([cf1622f](https://github.com/
|
|
206
|
+
* add trustPayload guards ([cf1622f](https://github.com/iotaledger/twin-synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
|
|
93
207
|
|
|
94
208
|
|
|
95
209
|
### Dependencies
|
|
@@ -98,12 +212,12 @@
|
|
|
98
212
|
* dependencies
|
|
99
213
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
100
214
|
|
|
101
|
-
## [0.0.3-next.2](https://github.com/
|
|
215
|
+
## [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
216
|
|
|
103
217
|
|
|
104
218
|
### Features
|
|
105
219
|
|
|
106
|
-
* use trust component ([424f0d6](https://github.com/
|
|
220
|
+
* use trust component ([424f0d6](https://github.com/iotaledger/twin-synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
|
|
107
221
|
|
|
108
222
|
|
|
109
223
|
### Dependencies
|
|
@@ -112,19 +226,19 @@
|
|
|
112
226
|
* dependencies
|
|
113
227
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
114
228
|
|
|
115
|
-
## [0.0.3-next.1](https://github.com/
|
|
229
|
+
## [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
230
|
|
|
117
231
|
|
|
118
232
|
### Features
|
|
119
233
|
|
|
120
|
-
* add context id features ([#24](https://github.com/
|
|
121
|
-
* add rights management integration ([d003d33](https://github.com/
|
|
122
|
-
* add validate-locales ([e3d7b98](https://github.com/
|
|
123
|
-
* blob storage connector instead of component ([#7](https://github.com/
|
|
124
|
-
* eslint migration to flat config ([f601c14](https://github.com/
|
|
125
|
-
* initial commit ([16949b8](https://github.com/
|
|
126
|
-
* update framework core ([99f09cc](https://github.com/
|
|
127
|
-
* update to in built vc auth mechanism ([411a371](https://github.com/
|
|
234
|
+
* add context id features ([#24](https://github.com/iotaledger/twin-synchronised-storage/issues/24)) ([5266b18](https://github.com/iotaledger/twin-synchronised-storage/commit/5266b18088317c7dc274a209a79102a6fc88a8e4))
|
|
235
|
+
* add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
|
|
236
|
+
* add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
|
|
237
|
+
* 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))
|
|
238
|
+
* eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
|
|
239
|
+
* initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
|
|
240
|
+
* update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
|
|
241
|
+
* update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
|
|
128
242
|
|
|
129
243
|
|
|
130
244
|
### Dependencies
|
|
@@ -133,12 +247,12 @@
|
|
|
133
247
|
* dependencies
|
|
134
248
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
135
249
|
|
|
136
|
-
## [0.0.1-next.16](https://github.com/
|
|
250
|
+
## [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
251
|
|
|
138
252
|
|
|
139
253
|
### Features
|
|
140
254
|
|
|
141
|
-
* add validate-locales ([e3d7b98](https://github.com/
|
|
255
|
+
* add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
|
|
142
256
|
|
|
143
257
|
|
|
144
258
|
### Dependencies
|
|
@@ -147,12 +261,12 @@
|
|
|
147
261
|
* dependencies
|
|
148
262
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
149
263
|
|
|
150
|
-
## [0.0.1-next.15](https://github.com/
|
|
264
|
+
## [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
265
|
|
|
152
266
|
|
|
153
267
|
### Features
|
|
154
268
|
|
|
155
|
-
* update to in built vc auth mechanism ([411a371](https://github.com/
|
|
269
|
+
* update to in built vc auth mechanism ([411a371](https://github.com/iotaledger/twin-synchronised-storage/commit/411a3716830195ebf54755a1633b05d5c3f96754))
|
|
156
270
|
|
|
157
271
|
|
|
158
272
|
### Dependencies
|
|
@@ -161,12 +275,12 @@
|
|
|
161
275
|
* dependencies
|
|
162
276
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
163
277
|
|
|
164
|
-
## [0.0.1-next.14](https://github.com/
|
|
278
|
+
## [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
279
|
|
|
166
280
|
|
|
167
281
|
### Features
|
|
168
282
|
|
|
169
|
-
* add rights management integration ([d003d33](https://github.com/
|
|
283
|
+
* add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
|
|
170
284
|
|
|
171
285
|
|
|
172
286
|
### Dependencies
|
|
@@ -175,12 +289,12 @@
|
|
|
175
289
|
* dependencies
|
|
176
290
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
177
291
|
|
|
178
|
-
## [0.0.1-next.13](https://github.com/
|
|
292
|
+
## [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
293
|
|
|
180
294
|
|
|
181
295
|
### Features
|
|
182
296
|
|
|
183
|
-
* eslint migration to flat config ([f601c14](https://github.com/
|
|
297
|
+
* eslint migration to flat config ([f601c14](https://github.com/iotaledger/twin-synchronised-storage/commit/f601c14f6adef3290554dc7df6e6b3528aa0dc2b))
|
|
184
298
|
|
|
185
299
|
|
|
186
300
|
### Dependencies
|
|
@@ -189,12 +303,12 @@
|
|
|
189
303
|
* dependencies
|
|
190
304
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.12 to 0.0.1-next.13
|
|
191
305
|
|
|
192
|
-
## [0.0.1-next.12](https://github.com/
|
|
306
|
+
## [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
307
|
|
|
194
308
|
|
|
195
309
|
### Features
|
|
196
310
|
|
|
197
|
-
* update framework core ([99f09cc](https://github.com/
|
|
311
|
+
* update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
|
|
198
312
|
|
|
199
313
|
|
|
200
314
|
### Dependencies
|
|
@@ -203,7 +317,7 @@
|
|
|
203
317
|
* dependencies
|
|
204
318
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.11 to 0.0.1-next.12
|
|
205
319
|
|
|
206
|
-
## [0.0.1-next.11](https://github.com/
|
|
320
|
+
## [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
321
|
|
|
208
322
|
|
|
209
323
|
### Miscellaneous Chores
|
|
@@ -217,7 +331,7 @@
|
|
|
217
331
|
* dependencies
|
|
218
332
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.10 to 0.0.1-next.11
|
|
219
333
|
|
|
220
|
-
## [0.0.1-next.10](https://github.com/
|
|
334
|
+
## [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
335
|
|
|
222
336
|
|
|
223
337
|
### Miscellaneous Chores
|
|
@@ -231,7 +345,7 @@
|
|
|
231
345
|
* dependencies
|
|
232
346
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.9 to 0.0.1-next.10
|
|
233
347
|
|
|
234
|
-
## [0.0.1-next.9](https://github.com/
|
|
348
|
+
## [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
349
|
|
|
236
350
|
|
|
237
351
|
### Miscellaneous Chores
|
|
@@ -245,7 +359,7 @@
|
|
|
245
359
|
* dependencies
|
|
246
360
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.8 to 0.0.1-next.9
|
|
247
361
|
|
|
248
|
-
## [0.0.1-next.8](https://github.com/
|
|
362
|
+
## [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
363
|
|
|
250
364
|
|
|
251
365
|
### Miscellaneous Chores
|
|
@@ -259,7 +373,7 @@
|
|
|
259
373
|
* dependencies
|
|
260
374
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.7 to 0.0.1-next.8
|
|
261
375
|
|
|
262
|
-
## [0.0.1-next.7](https://github.com/
|
|
376
|
+
## [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
377
|
|
|
264
378
|
|
|
265
379
|
### Miscellaneous Chores
|
|
@@ -273,7 +387,7 @@
|
|
|
273
387
|
* dependencies
|
|
274
388
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.6 to 0.0.1-next.7
|
|
275
389
|
|
|
276
|
-
## [0.0.1-next.6](https://github.com/
|
|
390
|
+
## [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
391
|
|
|
278
392
|
|
|
279
393
|
### Miscellaneous Chores
|
|
@@ -287,7 +401,7 @@
|
|
|
287
401
|
* dependencies
|
|
288
402
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.5 to 0.0.1-next.6
|
|
289
403
|
|
|
290
|
-
## [0.0.1-next.5](https://github.com/
|
|
404
|
+
## [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
405
|
|
|
292
406
|
|
|
293
407
|
### Miscellaneous Chores
|
|
@@ -301,12 +415,12 @@
|
|
|
301
415
|
* dependencies
|
|
302
416
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.4 to 0.0.1-next.5
|
|
303
417
|
|
|
304
|
-
## [0.0.1-next.4](https://github.com/
|
|
418
|
+
## [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
419
|
|
|
306
420
|
|
|
307
421
|
### Features
|
|
308
422
|
|
|
309
|
-
* blob storage connector instead of component ([#7](https://github.com/
|
|
423
|
+
* 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
424
|
|
|
311
425
|
|
|
312
426
|
### Dependencies
|
|
@@ -315,7 +429,7 @@
|
|
|
315
429
|
* dependencies
|
|
316
430
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.3 to 0.0.1-next.4
|
|
317
431
|
|
|
318
|
-
## [0.0.1-next.3](https://github.com/
|
|
432
|
+
## [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
433
|
|
|
320
434
|
|
|
321
435
|
### Miscellaneous Chores
|
|
@@ -329,7 +443,7 @@
|
|
|
329
443
|
* dependencies
|
|
330
444
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.2 to 0.0.1-next.3
|
|
331
445
|
|
|
332
|
-
## [0.0.1-next.2](https://github.com/
|
|
446
|
+
## [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
447
|
|
|
334
448
|
|
|
335
449
|
### Miscellaneous Chores
|
|
@@ -343,12 +457,12 @@
|
|
|
343
457
|
* dependencies
|
|
344
458
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.1 to 0.0.1-next.2
|
|
345
459
|
|
|
346
|
-
## [0.0.1-next.1](https://github.com/
|
|
460
|
+
## [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
461
|
|
|
348
462
|
|
|
349
463
|
### Features
|
|
350
464
|
|
|
351
|
-
* initial commit ([16949b8](https://github.com/
|
|
465
|
+
* initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
|
|
352
466
|
|
|
353
467
|
|
|
354
468
|
### Dependencies
|
|
@@ -357,4 +471,4 @@
|
|
|
357
471
|
* dependencies
|
|
358
472
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.0 to 0.0.1-next.1
|
|
359
473
|
|
|
360
|
-
##
|
|
474
|
+
## Changelog
|
package/docs/examples.md
CHANGED
|
@@ -1 +1,56 @@
|
|
|
1
|
-
#
|
|
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
|
-
|
|
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
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.9.0-next.1",
|
|
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/
|
|
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/
|
|
24
|
-
"@twin.org/
|
|
25
|
-
"@twin.org/web": "next"
|
|
17
|
+
"@twin.org/api-core": "0.9.0-next.1",
|
|
18
|
+
"@twin.org/api-models": "0.9.0-next.1",
|
|
19
|
+
"@twin.org/context": "0.9.0-next.1",
|
|
20
|
+
"@twin.org/core": "0.9.0-next.1",
|
|
21
|
+
"@twin.org/entity": "0.9.0-next.1",
|
|
22
|
+
"@twin.org/nameof": "0.9.0-next.1",
|
|
23
|
+
"@twin.org/synchronised-storage-models": "0.9.0-next.1",
|
|
24
|
+
"@twin.org/web": "0.9.0-next.1"
|
|
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/
|
|
51
|
+
"url": "git+https://github.com/iotaledger/twin-synchronised-storage/issues"
|
|
53
52
|
},
|
|
54
53
|
"homepage": "https://twindev.org"
|
|
55
54
|
}
|