@twin.org/synchronised-storage-rest-client 0.0.3-next.8 → 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 +171 -43
- 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,134 @@
|
|
|
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)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Miscellaneous Chores
|
|
121
|
+
|
|
122
|
+
* **synchronised-storage-rest-client:** Synchronize repo versions
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
### Dependencies
|
|
126
|
+
|
|
127
|
+
* The following workspace dependencies were updated
|
|
128
|
+
* dependencies
|
|
129
|
+
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.8 to 0.0.3-next.9
|
|
130
|
+
|
|
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)
|
|
4
132
|
|
|
5
133
|
|
|
6
134
|
### Miscellaneous Chores
|
|
@@ -14,7 +142,7 @@
|
|
|
14
142
|
* dependencies
|
|
15
143
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.7 to 0.0.3-next.8
|
|
16
144
|
|
|
17
|
-
## [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)
|
|
18
146
|
|
|
19
147
|
|
|
20
148
|
### Miscellaneous Chores
|
|
@@ -28,7 +156,7 @@
|
|
|
28
156
|
* dependencies
|
|
29
157
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.6 to 0.0.3-next.7
|
|
30
158
|
|
|
31
|
-
## [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)
|
|
32
160
|
|
|
33
161
|
|
|
34
162
|
### Miscellaneous Chores
|
|
@@ -42,12 +170,12 @@
|
|
|
42
170
|
* dependencies
|
|
43
171
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.5 to 0.0.3-next.6
|
|
44
172
|
|
|
45
|
-
## [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)
|
|
46
174
|
|
|
47
175
|
|
|
48
176
|
### Features
|
|
49
177
|
|
|
50
|
-
* remove unused dependencies ([518c460](https://github.com/
|
|
178
|
+
* remove unused dependencies ([518c460](https://github.com/iotaledger/twin-synchronised-storage/commit/518c460d2e5e2b2c487565acb5162a03ddb85eae))
|
|
51
179
|
|
|
52
180
|
|
|
53
181
|
### Dependencies
|
|
@@ -56,7 +184,7 @@
|
|
|
56
184
|
* dependencies
|
|
57
185
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.4 to 0.0.3-next.5
|
|
58
186
|
|
|
59
|
-
## [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)
|
|
60
188
|
|
|
61
189
|
|
|
62
190
|
### Miscellaneous Chores
|
|
@@ -70,12 +198,12 @@
|
|
|
70
198
|
* dependencies
|
|
71
199
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.3 to 0.0.3-next.4
|
|
72
200
|
|
|
73
|
-
## [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)
|
|
74
202
|
|
|
75
203
|
|
|
76
204
|
### Features
|
|
77
205
|
|
|
78
|
-
* add trustPayload guards ([cf1622f](https://github.com/
|
|
206
|
+
* add trustPayload guards ([cf1622f](https://github.com/iotaledger/twin-synchronised-storage/commit/cf1622f8b65a4b77032e31ecaa41664499f4c892))
|
|
79
207
|
|
|
80
208
|
|
|
81
209
|
### Dependencies
|
|
@@ -84,12 +212,12 @@
|
|
|
84
212
|
* dependencies
|
|
85
213
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.2 to 0.0.3-next.3
|
|
86
214
|
|
|
87
|
-
## [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)
|
|
88
216
|
|
|
89
217
|
|
|
90
218
|
### Features
|
|
91
219
|
|
|
92
|
-
* use trust component ([424f0d6](https://github.com/
|
|
220
|
+
* use trust component ([424f0d6](https://github.com/iotaledger/twin-synchronised-storage/commit/424f0d6aaacfdc7700c46fe6c2def23b2eacddc9))
|
|
93
221
|
|
|
94
222
|
|
|
95
223
|
### Dependencies
|
|
@@ -98,19 +226,19 @@
|
|
|
98
226
|
* dependencies
|
|
99
227
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.1 to 0.0.3-next.2
|
|
100
228
|
|
|
101
|
-
## [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)
|
|
102
230
|
|
|
103
231
|
|
|
104
232
|
### Features
|
|
105
233
|
|
|
106
|
-
* add context id features ([#24](https://github.com/
|
|
107
|
-
* add rights management integration ([d003d33](https://github.com/
|
|
108
|
-
* add validate-locales ([e3d7b98](https://github.com/
|
|
109
|
-
* blob storage connector instead of component ([#7](https://github.com/
|
|
110
|
-
* eslint migration to flat config ([f601c14](https://github.com/
|
|
111
|
-
* initial commit ([16949b8](https://github.com/
|
|
112
|
-
* update framework core ([99f09cc](https://github.com/
|
|
113
|
-
* 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))
|
|
114
242
|
|
|
115
243
|
|
|
116
244
|
### Dependencies
|
|
@@ -119,12 +247,12 @@
|
|
|
119
247
|
* dependencies
|
|
120
248
|
* @twin.org/synchronised-storage-models bumped from 0.0.3-next.0 to 0.0.3-next.1
|
|
121
249
|
|
|
122
|
-
## [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)
|
|
123
251
|
|
|
124
252
|
|
|
125
253
|
### Features
|
|
126
254
|
|
|
127
|
-
* add validate-locales ([e3d7b98](https://github.com/
|
|
255
|
+
* add validate-locales ([e3d7b98](https://github.com/iotaledger/twin-synchronised-storage/commit/e3d7b98839e9ca624855717c8957d572c4e09abf))
|
|
128
256
|
|
|
129
257
|
|
|
130
258
|
### Dependencies
|
|
@@ -133,12 +261,12 @@
|
|
|
133
261
|
* dependencies
|
|
134
262
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.15 to 0.0.1-next.16
|
|
135
263
|
|
|
136
|
-
## [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)
|
|
137
265
|
|
|
138
266
|
|
|
139
267
|
### Features
|
|
140
268
|
|
|
141
|
-
* 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))
|
|
142
270
|
|
|
143
271
|
|
|
144
272
|
### Dependencies
|
|
@@ -147,12 +275,12 @@
|
|
|
147
275
|
* dependencies
|
|
148
276
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.14 to 0.0.1-next.15
|
|
149
277
|
|
|
150
|
-
## [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)
|
|
151
279
|
|
|
152
280
|
|
|
153
281
|
### Features
|
|
154
282
|
|
|
155
|
-
* add rights management integration ([d003d33](https://github.com/
|
|
283
|
+
* add rights management integration ([d003d33](https://github.com/iotaledger/twin-synchronised-storage/commit/d003d33d2d2b4a4aa1379071eed71a707ebcb4de))
|
|
156
284
|
|
|
157
285
|
|
|
158
286
|
### Dependencies
|
|
@@ -161,12 +289,12 @@
|
|
|
161
289
|
* dependencies
|
|
162
290
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.13 to 0.0.1-next.14
|
|
163
291
|
|
|
164
|
-
## [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)
|
|
165
293
|
|
|
166
294
|
|
|
167
295
|
### Features
|
|
168
296
|
|
|
169
|
-
* 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))
|
|
170
298
|
|
|
171
299
|
|
|
172
300
|
### Dependencies
|
|
@@ -175,12 +303,12 @@
|
|
|
175
303
|
* dependencies
|
|
176
304
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.12 to 0.0.1-next.13
|
|
177
305
|
|
|
178
|
-
## [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)
|
|
179
307
|
|
|
180
308
|
|
|
181
309
|
### Features
|
|
182
310
|
|
|
183
|
-
* update framework core ([99f09cc](https://github.com/
|
|
311
|
+
* update framework core ([99f09cc](https://github.com/iotaledger/twin-synchronised-storage/commit/99f09cc94cfb9fff6b3a345775eeae2ab3192ed2))
|
|
184
312
|
|
|
185
313
|
|
|
186
314
|
### Dependencies
|
|
@@ -189,7 +317,7 @@
|
|
|
189
317
|
* dependencies
|
|
190
318
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.11 to 0.0.1-next.12
|
|
191
319
|
|
|
192
|
-
## [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)
|
|
193
321
|
|
|
194
322
|
|
|
195
323
|
### Miscellaneous Chores
|
|
@@ -203,7 +331,7 @@
|
|
|
203
331
|
* dependencies
|
|
204
332
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.10 to 0.0.1-next.11
|
|
205
333
|
|
|
206
|
-
## [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)
|
|
207
335
|
|
|
208
336
|
|
|
209
337
|
### Miscellaneous Chores
|
|
@@ -217,7 +345,7 @@
|
|
|
217
345
|
* dependencies
|
|
218
346
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.9 to 0.0.1-next.10
|
|
219
347
|
|
|
220
|
-
## [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)
|
|
221
349
|
|
|
222
350
|
|
|
223
351
|
### Miscellaneous Chores
|
|
@@ -231,7 +359,7 @@
|
|
|
231
359
|
* dependencies
|
|
232
360
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.8 to 0.0.1-next.9
|
|
233
361
|
|
|
234
|
-
## [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)
|
|
235
363
|
|
|
236
364
|
|
|
237
365
|
### Miscellaneous Chores
|
|
@@ -245,7 +373,7 @@
|
|
|
245
373
|
* dependencies
|
|
246
374
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.7 to 0.0.1-next.8
|
|
247
375
|
|
|
248
|
-
## [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)
|
|
249
377
|
|
|
250
378
|
|
|
251
379
|
### Miscellaneous Chores
|
|
@@ -259,7 +387,7 @@
|
|
|
259
387
|
* dependencies
|
|
260
388
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.6 to 0.0.1-next.7
|
|
261
389
|
|
|
262
|
-
## [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)
|
|
263
391
|
|
|
264
392
|
|
|
265
393
|
### Miscellaneous Chores
|
|
@@ -273,7 +401,7 @@
|
|
|
273
401
|
* dependencies
|
|
274
402
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.5 to 0.0.1-next.6
|
|
275
403
|
|
|
276
|
-
## [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)
|
|
277
405
|
|
|
278
406
|
|
|
279
407
|
### Miscellaneous Chores
|
|
@@ -287,12 +415,12 @@
|
|
|
287
415
|
* dependencies
|
|
288
416
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.4 to 0.0.1-next.5
|
|
289
417
|
|
|
290
|
-
## [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)
|
|
291
419
|
|
|
292
420
|
|
|
293
421
|
### Features
|
|
294
422
|
|
|
295
|
-
* 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))
|
|
296
424
|
|
|
297
425
|
|
|
298
426
|
### Dependencies
|
|
@@ -301,7 +429,7 @@
|
|
|
301
429
|
* dependencies
|
|
302
430
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.3 to 0.0.1-next.4
|
|
303
431
|
|
|
304
|
-
## [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)
|
|
305
433
|
|
|
306
434
|
|
|
307
435
|
### Miscellaneous Chores
|
|
@@ -315,7 +443,7 @@
|
|
|
315
443
|
* dependencies
|
|
316
444
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.2 to 0.0.1-next.3
|
|
317
445
|
|
|
318
|
-
## [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)
|
|
319
447
|
|
|
320
448
|
|
|
321
449
|
### Miscellaneous Chores
|
|
@@ -329,12 +457,12 @@
|
|
|
329
457
|
* dependencies
|
|
330
458
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.1 to 0.0.1-next.2
|
|
331
459
|
|
|
332
|
-
## [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)
|
|
333
461
|
|
|
334
462
|
|
|
335
463
|
### Features
|
|
336
464
|
|
|
337
|
-
* initial commit ([16949b8](https://github.com/
|
|
465
|
+
* initial commit ([16949b8](https://github.com/iotaledger/twin-synchronised-storage/commit/16949b8e5bdb190f053c52af352290e3fd964f9a))
|
|
338
466
|
|
|
339
467
|
|
|
340
468
|
### Dependencies
|
|
@@ -343,4 +471,4 @@
|
|
|
343
471
|
* dependencies
|
|
344
472
|
* @twin.org/synchronised-storage-models bumped from 0.0.1-next.0 to 0.0.1-next.1
|
|
345
473
|
|
|
346
|
-
##
|
|
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
|
}
|