@msssystems/mss-link-sdk 0.2.9 → 0.2.11
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.
|
@@ -4,6 +4,9 @@ export interface MssLinkWasmClient extends WasmMssClient {
|
|
|
4
4
|
sendMediaMessage(chatId: string, targetUserId: string, metadataJson: string, mediaAssetIds: string[]): Promise<string>;
|
|
5
5
|
healSession(chatId: string, targetUserId: string): Promise<string>;
|
|
6
6
|
deleteSession(targetUserId: string): Promise<void>;
|
|
7
|
+
getSenderKeyDistribution(groupId: string): Promise<any>;
|
|
8
|
+
storeReceivedSenderKeyDistribution(distJson: any): Promise<void>;
|
|
9
|
+
rotateGroupSenderKey(groupId: string): Promise<any>;
|
|
7
10
|
}
|
|
8
11
|
export type WasmMssClientConstructor = new (userId: string, deviceId: number, apiBaseUrl: string) => MssLinkWasmClient;
|
|
9
12
|
export interface MssCryptoWasmModule {
|
|
@@ -14,4 +14,7 @@ export declare class MessagesCryptoClient {
|
|
|
14
14
|
syncMessages(): Promise<void>;
|
|
15
15
|
private handleSessionHealing;
|
|
16
16
|
getLocalMessages(chatId: string): Promise<DecryptedMessage[]>;
|
|
17
|
+
getSenderKeyDistribution(groupId: string): Promise<any>;
|
|
18
|
+
storeReceivedSenderKeyDistribution(distJson: any): Promise<void>;
|
|
19
|
+
rotateGroupSenderKey(groupId: string): Promise<any>;
|
|
17
20
|
}
|
|
@@ -71,4 +71,31 @@ export class MessagesCryptoClient {
|
|
|
71
71
|
throw normalizeLocalCryptoError(error);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
async getSenderKeyDistribution(groupId) {
|
|
75
|
+
try {
|
|
76
|
+
await this.engine.ensureReady();
|
|
77
|
+
return this.engine.runWithClient((client) => client.getSenderKeyDistribution(groupId));
|
|
78
|
+
}
|
|
79
|
+
catch (error) {
|
|
80
|
+
throw normalizeLocalCryptoError(error);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
async storeReceivedSenderKeyDistribution(distJson) {
|
|
84
|
+
try {
|
|
85
|
+
await this.engine.ensureReady();
|
|
86
|
+
return this.engine.runWithClient((client) => client.storeReceivedSenderKeyDistribution(distJson));
|
|
87
|
+
}
|
|
88
|
+
catch (error) {
|
|
89
|
+
throw normalizeLocalCryptoError(error);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
async rotateGroupSenderKey(groupId) {
|
|
93
|
+
try {
|
|
94
|
+
await this.engine.ensureReady();
|
|
95
|
+
return this.engine.runWithClient((client) => client.rotateGroupSenderKey(groupId));
|
|
96
|
+
}
|
|
97
|
+
catch (error) {
|
|
98
|
+
throw normalizeLocalCryptoError(error);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
74
101
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@msssystems/mss-link-sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.11",
|
|
4
4
|
"description": "Official managed application SDK for MSS ecosystem",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"registry": "https://registry.npmjs.org/"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@msssystems/mss-crypto-wasm": "^0.1.
|
|
56
|
+
"@msssystems/mss-crypto-wasm": "^0.1.25",
|
|
57
57
|
"@nestjs/common": "^10.0.0 || ^11.0.0",
|
|
58
58
|
"@nestjs/core": "^10.0.0 || ^11.0.0",
|
|
59
59
|
"express": "^4.0.0 || ^5.0.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@msssystems/mss-crypto-wasm": "^0.1.
|
|
80
|
+
"@msssystems/mss-crypto-wasm": "^0.1.25",
|
|
81
81
|
"@nestjs/common": "^11.0.1",
|
|
82
82
|
"@nestjs/core": "^11.0.1",
|
|
83
83
|
"@types/express": "^5.0.0",
|