@docknetwork/wallet-sdk-relay-service 0.4.19 → 0.4.22
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/package.json +4 -4
- package/src/index.js +11 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docknetwork/wallet-sdk-relay-service",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.22",
|
|
4
4
|
"license": "https://github.com/docknetwork/react-native-sdk/LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,13 +8,13 @@
|
|
|
8
8
|
"directory": "packages/relay-service"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"build": "rm -rf lib && rollup -c"
|
|
11
|
+
"build": "rm -rf lib && rollup -c && node ../../scripts/fix-build-imports.js ./lib"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"uuid": "^9.0.0",
|
|
15
15
|
"@docknetwork/minimal-cipher": "^5.2.1",
|
|
16
|
-
"@docknetwork/sdk": "8.
|
|
17
|
-
"@docknetwork/wallet-sdk-wasm": "0.4.
|
|
16
|
+
"@docknetwork/sdk": "8.6.0",
|
|
17
|
+
"@docknetwork/wallet-sdk-wasm": "0.4.19"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"jest": "29.1.0",
|
package/src/index.js
CHANGED
|
@@ -78,7 +78,7 @@ const getMessages = async ({
|
|
|
78
78
|
const result = await axios.get(
|
|
79
79
|
`${serviceURL}/messages/batch-dids?dids=${encodeURIComponent(
|
|
80
80
|
JSON.stringify(dids),
|
|
81
|
-
)}&payload=${toBase64(payload)}`,
|
|
81
|
+
)}&payload=${toBase64(payload)}&keepMessages=true`,
|
|
82
82
|
);
|
|
83
83
|
|
|
84
84
|
const data = result.data;
|
|
@@ -109,6 +109,15 @@ const getMessages = async ({
|
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
const ackMessages = ({did, messageIds}) => {
|
|
113
|
+
assert(!!did, 'did is required');
|
|
114
|
+
assert(!!messageIds, 'messageIds is required');
|
|
115
|
+
return axios.post(`${serviceURL}/messages/ack`, {
|
|
116
|
+
ack: messageIds,
|
|
117
|
+
did,
|
|
118
|
+
});
|
|
119
|
+
};
|
|
120
|
+
|
|
112
121
|
const registerDIDPushNotification = async ({keyPairDocs, token}) => {
|
|
113
122
|
assert(!!keyPairDocs, 'keyPairDoc is required');
|
|
114
123
|
assert(Array.isArray(keyPairDocs), 'keyPairDocs must be an array');
|
|
@@ -265,6 +274,7 @@ export const RelayService = {
|
|
|
265
274
|
resolveDidcommMessage,
|
|
266
275
|
registerDIDPushNotification,
|
|
267
276
|
setServiceURL,
|
|
277
|
+
ackMessages,
|
|
268
278
|
serviceURL,
|
|
269
279
|
signJwt,
|
|
270
280
|
};
|