@msssystems/mss-link-sdk 0.2.15 → 0.2.16

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.
@@ -8,6 +8,7 @@ export interface MssLinkWasmClient extends WasmMssClient {
8
8
  getSenderKeyDistribution(groupId: string): Promise<SenderKeyDistribution | undefined>;
9
9
  storeReceivedSenderKeyDistribution(distJson: SenderKeyDistribution): Promise<void>;
10
10
  rotateGroupSenderKey(groupId: string): Promise<SenderKeyDistribution>;
11
+ hasReceivedSenderKey(groupId: string, senderId: string): Promise<boolean>;
11
12
  encryptSenderKeyDistribution(recipientId: string, distJson: SenderKeyDistribution): Promise<string>;
12
13
  decryptSenderKeyDistribution(senderId: string, encryptedBlob: string): Promise<SenderKeyDistribution>;
13
14
  }
@@ -17,6 +17,7 @@ export declare class MessagesCryptoClient {
17
17
  getSenderKeyDistribution(groupId: string): Promise<SenderKeyDistribution | undefined>;
18
18
  storeReceivedSenderKeyDistribution(distJson: SenderKeyDistribution): Promise<void>;
19
19
  rotateGroupSenderKey(groupId: string): Promise<SenderKeyDistribution>;
20
+ hasReceivedSenderKey(groupId: string, senderId: string): Promise<boolean>;
20
21
  encryptSenderKeyDistribution(recipientId: string, distJson: SenderKeyDistribution): Promise<string>;
21
22
  decryptSenderKeyDistribution(senderId: string, encryptedBlob: string): Promise<SenderKeyDistribution>;
22
23
  }
@@ -98,6 +98,15 @@ export class MessagesCryptoClient {
98
98
  throw normalizeLocalCryptoError(error);
99
99
  }
100
100
  }
101
+ async hasReceivedSenderKey(groupId, senderId) {
102
+ try {
103
+ await this.engine.ensureReady();
104
+ return this.engine.runWithClient((client) => client.hasReceivedSenderKey(groupId, senderId));
105
+ }
106
+ catch (error) {
107
+ throw normalizeLocalCryptoError(error);
108
+ }
109
+ }
101
110
  async encryptSenderKeyDistribution(recipientId, distJson) {
102
111
  try {
103
112
  await this.engine.ensureReady();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@msssystems/mss-link-sdk",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "Official managed application SDK for MSS ecosystem",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -77,7 +77,7 @@
77
77
  }
78
78
  },
79
79
  "devDependencies": {
80
- "@msssystems/mss-crypto-wasm": "^0.1.28",
80
+ "@msssystems/mss-crypto-wasm": "^0.1.29",
81
81
  "@nestjs/common": "^11.0.1",
82
82
  "@nestjs/core": "^11.0.1",
83
83
  "@types/express": "^5.0.0",