@wireapp/core 36.1.0 → 36.2.0
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/lib/Account.js +2 -2
- package/lib/Account.js.map +1 -1
- package/lib/conversation/ConversationService/ConversationService.d.ts +1 -3
- package/lib/conversation/ConversationService/ConversationService.js +2 -3
- package/lib/conversation/ConversationService/ConversationService.js.map +1 -1
- package/lib/cryptography/CryptographyDatabaseRepository.d.ts +1 -2
- package/lib/cryptography/CryptographyDatabaseRepository.js +0 -1
- package/lib/cryptography/CryptographyDatabaseRepository.js.map +1 -1
- package/lib/mls/EventHandler/ConversationEvent/ConversationEvent.js +12 -17
- package/lib/mls/EventHandler/ConversationEvent/ConversationEvent.js.map +1 -1
- package/lib/mls/EventHandler/ConversationEvent/events/index.d.ts +2 -0
- package/lib/mls/EventHandler/ConversationEvent/events/index.js +37 -0
- package/lib/mls/EventHandler/ConversationEvent/events/index.js.map +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/index.d.ts +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/index.js +36 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/index.js.map +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts +10 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.js +67 -0
- package/lib/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.js.map +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.d.ts +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.js +36 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.js.map +1 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts +8 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.js +37 -0
- package/lib/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.js.map +1 -0
- package/lib/mls/EventHandler/EventHandler.js +1 -7
- package/lib/mls/EventHandler/EventHandler.js.map +1 -1
- package/lib/mls/EventHandler/EventHandler.types.d.ts +1 -1
- package/lib/mls/MLSService/MLSService.d.ts +34 -4
- package/lib/mls/MLSService/MLSService.js +105 -21
- package/lib/mls/MLSService/MLSService.js.map +1 -1
- package/lib/mls/MLSService/commitBundleUtil.d.ts +7 -0
- package/lib/mls/MLSService/commitBundleUtil.js +51 -0
- package/lib/mls/MLSService/commitBundleUtil.js.map +1 -0
- package/lib/mls/MLSService/index.d.ts +1 -0
- package/lib/mls/MLSService/index.js +36 -0
- package/lib/mls/MLSService/index.js.map +1 -0
- package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/index.d.ts +0 -0
- package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/index.js +0 -0
- package/lib/mls/MLSService/stores/keyMaterialUpdatesStore/index.js.map +1 -0
- package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/keyMaterialUpdatesStore.d.ts +2 -1
- package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/keyMaterialUpdatesStore.js +0 -0
- package/lib/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.js.map +1 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/index.d.ts +1 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/index.js +36 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/index.js.map +1 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.d.ts +9 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.js +51 -0
- package/lib/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.js.map +1 -0
- package/lib/mls/MLSService/stores/stores.mock.d.ts +8 -0
- package/lib/mls/MLSService/stores/stores.mock.js +44 -0
- package/lib/mls/MLSService/stores/stores.mock.js.map +1 -0
- package/lib/mls/index.d.ts +1 -1
- package/lib/mls/index.js +1 -1
- package/lib/mls/index.js.map +1 -1
- package/lib/mls/types.d.ts +0 -4
- package/lib/notification/NotificationDatabaseRepository.d.ts +0 -22
- package/lib/notification/NotificationDatabaseRepository.js +0 -29
- package/lib/notification/NotificationDatabaseRepository.js.map +1 -1
- package/lib/notification/NotificationService.d.ts +0 -34
- package/lib/notification/NotificationService.js +3 -133
- package/lib/notification/NotificationService.js.map +1 -1
- package/package.json +5 -5
- package/lib/mls/MLSService/keyMaterialUpdatesStore/index.js.map +0 -1
- package/lib/mls/MLSService/keyMaterialUpdatesStore/keyMaterialUpdatesStore.js.map +0 -1
|
@@ -3,8 +3,9 @@ import { PostMlsMessageResponse } from '@wireapp/api-client/lib/conversation';
|
|
|
3
3
|
import { AddProposalArgs, ConversationConfiguration, ConversationId, CoreCrypto, DecryptedMessage, ExternalProposalArgs, ExternalProposalType, ExternalRemoveProposalArgs, Invitee, ProposalArgs, ProposalType, RemoveProposalArgs } from '@wireapp/core-crypto';
|
|
4
4
|
import logdown from 'logdown';
|
|
5
5
|
import { QualifiedUsers } from '../../conversation';
|
|
6
|
-
import { MLSCallbacks } from '../types';
|
|
7
|
-
import {
|
|
6
|
+
import { CommitPendingProposalsParams, HandlePendingProposalsParams, MLSCallbacks } from '../types';
|
|
7
|
+
import { QualifiedId } from '@wireapp/api-client/lib/user';
|
|
8
|
+
import { EventHandlerParams, EventHandlerResult } from '../EventHandler';
|
|
8
9
|
export declare const optionalToUint8Array: (array: Uint8Array | []) => Uint8Array;
|
|
9
10
|
interface MLSServiceConfig {
|
|
10
11
|
keyingMaterialUpdateThreshold: number;
|
|
@@ -42,7 +43,7 @@ export declare class MLSService {
|
|
|
42
43
|
updateKeyingMaterial(conversationId: ConversationId): Promise<PostMlsMessageResponse | null>;
|
|
43
44
|
createConversation(conversationId: ConversationId, configuration?: ConversationConfiguration): Promise<any>;
|
|
44
45
|
removeClientsFromConversation(conversationId: ConversationId, clientIds: Uint8Array[]): Promise<PostMlsMessageResponse | null>;
|
|
45
|
-
|
|
46
|
+
private commitProposals;
|
|
46
47
|
conversationExists(conversationId: ConversationId): Promise<boolean>;
|
|
47
48
|
clientValidKeypackagesCount(): Promise<number>;
|
|
48
49
|
clientKeypackages(amountRequested: number): Promise<Uint8Array[]>;
|
|
@@ -83,6 +84,35 @@ export declare class MLSService {
|
|
|
83
84
|
uploadMLSPublicKeys(publicKey: Uint8Array, clientId: string): Promise<void>;
|
|
84
85
|
uploadMLSKeyPackages(keypackages: Uint8Array[], clientId: string): Promise<void>;
|
|
85
86
|
wipeConversation(conversationId: ConversationId): Promise<void>;
|
|
86
|
-
handleMLSEvent(
|
|
87
|
+
handleMLSEvent(params: Omit<EventHandlerParams, 'mlsService'>): EventHandlerResult;
|
|
88
|
+
/**
|
|
89
|
+
* If there is a matching conversationId => groupId pair in the database,
|
|
90
|
+
* we can find the groupId and return it as a string
|
|
91
|
+
*
|
|
92
|
+
* @param conversationQualifiedId
|
|
93
|
+
*/
|
|
94
|
+
getGroupIdFromConversationId(conversationQualifiedId: QualifiedId): Promise<string>;
|
|
95
|
+
/**
|
|
96
|
+
* If there are pending proposals, we need to either process them,
|
|
97
|
+
* or save them in the database for later processing
|
|
98
|
+
*
|
|
99
|
+
* @param groupId groupId of the mls conversation
|
|
100
|
+
* @param delayInMs delay in ms before processing proposals
|
|
101
|
+
* @param eventTime time of the event that had the proposals
|
|
102
|
+
*/
|
|
103
|
+
handlePendingProposals({ delayInMs, groupId, eventTime }: HandlePendingProposalsParams): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Commit all pending proposals for a given groupId
|
|
106
|
+
*
|
|
107
|
+
* @param groupId groupId of the conversation
|
|
108
|
+
* @param skipDelete if true, do not delete the pending proposals from the database
|
|
109
|
+
*/
|
|
110
|
+
commitPendingProposals({ groupId, skipDelete }: CommitPendingProposalsParams): Promise<void>;
|
|
111
|
+
/**
|
|
112
|
+
* Get all pending proposals from the database and schedule them
|
|
113
|
+
* Function must only be called once, after application start
|
|
114
|
+
*
|
|
115
|
+
*/
|
|
116
|
+
checkExistingPendingProposals(): Promise<void>;
|
|
87
117
|
}
|
|
88
118
|
export {};
|
|
@@ -37,10 +37,13 @@ const bazinga64_1 = require("bazinga64");
|
|
|
37
37
|
const logdown_1 = __importDefault(require("logdown"));
|
|
38
38
|
const messageSender_1 = require("../../conversation/message/messageSender");
|
|
39
39
|
const fullyQualifiedClientIdUtils_1 = require("../../util/fullyQualifiedClientIdUtils");
|
|
40
|
+
const commitBundleUtil_1 = require("./commitBundleUtil");
|
|
40
41
|
const commons_1 = require("@wireapp/commons");
|
|
41
42
|
const RecurringTaskScheduler_1 = require("../../util/RecurringTaskScheduler");
|
|
43
|
+
const TaskScheduler_1 = require("../../util/TaskScheduler");
|
|
42
44
|
const EventHandler_1 = require("../EventHandler");
|
|
43
|
-
const keyMaterialUpdatesStore_1 = require("./keyMaterialUpdatesStore");
|
|
45
|
+
const keyMaterialUpdatesStore_1 = require("./stores/keyMaterialUpdatesStore");
|
|
46
|
+
const pendingProposalsStore_1 = require("./stores/pendingProposalsStore");
|
|
44
47
|
//@todo: this function is temporary, we wait for the update from core-crypto side
|
|
45
48
|
//they are returning regular array instead of Uint8Array for commit and welcome messages
|
|
46
49
|
const optionalToUint8Array = (array) => {
|
|
@@ -68,24 +71,26 @@ class MLSService {
|
|
|
68
71
|
}
|
|
69
72
|
return client;
|
|
70
73
|
}
|
|
71
|
-
async uploadCommitBundle(groupId,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
(
|
|
74
|
+
async uploadCommitBundle(groupId, commitBundle, isExternalCommit) {
|
|
75
|
+
const bundlePayload = (0, commitBundleUtil_1.toProtobufCommitBundle)(commitBundle);
|
|
76
|
+
try {
|
|
77
|
+
const response = await this.apiClient.api.conversation.postMlsCommitBundle(bundlePayload.slice());
|
|
78
|
+
if (isExternalCommit) {
|
|
79
|
+
await this.coreCryptoClient.mergePendingGroupFromExternalCommit(groupId, {});
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
77
82
|
await this.coreCryptoClient.commitAccepted(groupId);
|
|
78
|
-
const newEpoch = await this.getEpoch(groupId);
|
|
79
|
-
const groupIdStr = bazinga64_1.Encoder.toBase64(groupId).asString;
|
|
80
|
-
this.logger.log(`Commit have been accepted for group "${groupIdStr}". New epoch is "${newEpoch}"`);
|
|
81
|
-
if (welcome) {
|
|
82
|
-
// If the commit went well, we can send the Welcome
|
|
83
|
-
//@todo: it's temporary - we wait for core-crypto fix to return the actual Uint8Array instead of regular array
|
|
84
|
-
await this.apiClient.api.conversation.postMlsWelcomeMessage((0, exports.optionalToUint8Array)(welcome));
|
|
85
|
-
}
|
|
86
|
-
return messageResponse;
|
|
87
83
|
}
|
|
88
|
-
|
|
84
|
+
const newEpoch = await this.getEpoch(groupId);
|
|
85
|
+
const groupIdStr = bazinga64_1.Encoder.toBase64(groupId).asString;
|
|
86
|
+
this.logger.log(`Commit have been accepted for group "${groupIdStr}". New epoch is "${newEpoch}"`);
|
|
87
|
+
return response;
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
if (isExternalCommit) {
|
|
91
|
+
await this.coreCryptoClient.clearPendingGroupFromExternalCommit(groupId);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
89
94
|
await this.coreCryptoClient.clearPendingCommit(groupId);
|
|
90
95
|
}
|
|
91
96
|
}
|
|
@@ -160,7 +165,7 @@ class MLSService {
|
|
|
160
165
|
*/
|
|
161
166
|
async processCommitAction(groupId, generateCommit) {
|
|
162
167
|
return (0, messageSender_1.sendMessage)(async () => {
|
|
163
|
-
await this.
|
|
168
|
+
await this.commitProposals(groupId);
|
|
164
169
|
const commitBundle = await generateCommit();
|
|
165
170
|
return this.uploadCommitBundle(groupId, commitBundle);
|
|
166
171
|
});
|
|
@@ -174,7 +179,7 @@ class MLSService {
|
|
|
174
179
|
removeClientsFromConversation(conversationId, clientIds) {
|
|
175
180
|
return this.processCommitAction(conversationId, () => this.coreCryptoClient.removeClientsFromConversation(conversationId, clientIds));
|
|
176
181
|
}
|
|
177
|
-
async
|
|
182
|
+
async commitProposals(groupId) {
|
|
178
183
|
const commitBundle = await this.coreCryptoClient.commitPendingProposals(groupId);
|
|
179
184
|
return commitBundle ? void (await this.uploadCommitBundle(groupId, commitBundle)) : undefined;
|
|
180
185
|
}
|
|
@@ -284,8 +289,87 @@ class MLSService {
|
|
|
284
289
|
async wipeConversation(conversationId) {
|
|
285
290
|
return this.coreCryptoClient.wipeConversation(conversationId);
|
|
286
291
|
}
|
|
287
|
-
async handleMLSEvent(
|
|
288
|
-
return (0, EventHandler_1.handleBackendEvent)({
|
|
292
|
+
async handleMLSEvent(params) {
|
|
293
|
+
return (0, EventHandler_1.handleBackendEvent)(Object.assign(Object.assign({}, params), { mlsService: this }));
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* If there is a matching conversationId => groupId pair in the database,
|
|
297
|
+
* we can find the groupId and return it as a string
|
|
298
|
+
*
|
|
299
|
+
* @param conversationQualifiedId
|
|
300
|
+
*/
|
|
301
|
+
async getGroupIdFromConversationId(conversationQualifiedId) {
|
|
302
|
+
var _a;
|
|
303
|
+
const { id: conversationId, domain: conversationDomain } = conversationQualifiedId;
|
|
304
|
+
const groupId = await ((_a = this.groupIdFromConversationId) === null || _a === void 0 ? void 0 : _a.call(this, conversationQualifiedId));
|
|
305
|
+
if (!groupId) {
|
|
306
|
+
throw new Error(`Could not find a group_id for conversation ${conversationId}@${conversationDomain}`);
|
|
307
|
+
}
|
|
308
|
+
return groupId;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* If there are pending proposals, we need to either process them,
|
|
312
|
+
* or save them in the database for later processing
|
|
313
|
+
*
|
|
314
|
+
* @param groupId groupId of the mls conversation
|
|
315
|
+
* @param delayInMs delay in ms before processing proposals
|
|
316
|
+
* @param eventTime time of the event that had the proposals
|
|
317
|
+
*/
|
|
318
|
+
async handlePendingProposals({ delayInMs, groupId, eventTime }) {
|
|
319
|
+
if (delayInMs > 0) {
|
|
320
|
+
const eventDate = new Date(eventTime);
|
|
321
|
+
const firingDate = eventDate.setTime(eventDate.getTime() + delayInMs);
|
|
322
|
+
pendingProposalsStore_1.pendingProposalsStore.storeItem({
|
|
323
|
+
groupId,
|
|
324
|
+
firingDate,
|
|
325
|
+
});
|
|
326
|
+
TaskScheduler_1.TaskScheduler.addTask({
|
|
327
|
+
task: () => this.commitPendingProposals({ groupId }),
|
|
328
|
+
firingDate,
|
|
329
|
+
key: groupId,
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
else {
|
|
333
|
+
await this.commitPendingProposals({ groupId, skipDelete: true });
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Commit all pending proposals for a given groupId
|
|
338
|
+
*
|
|
339
|
+
* @param groupId groupId of the conversation
|
|
340
|
+
* @param skipDelete if true, do not delete the pending proposals from the database
|
|
341
|
+
*/
|
|
342
|
+
async commitPendingProposals({ groupId, skipDelete = false }) {
|
|
343
|
+
try {
|
|
344
|
+
await this.commitProposals(bazinga64_1.Decoder.fromBase64(groupId).asBytes);
|
|
345
|
+
if (!skipDelete) {
|
|
346
|
+
TaskScheduler_1.TaskScheduler.cancelTask(groupId);
|
|
347
|
+
pendingProposalsStore_1.pendingProposalsStore.deleteItem({ groupId });
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
catch (error) {
|
|
351
|
+
this.logger.error(`Error while committing pending proposals for groupId ${groupId}`, error);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* Get all pending proposals from the database and schedule them
|
|
356
|
+
* Function must only be called once, after application start
|
|
357
|
+
*
|
|
358
|
+
*/
|
|
359
|
+
async checkExistingPendingProposals() {
|
|
360
|
+
try {
|
|
361
|
+
const pendingProposals = pendingProposalsStore_1.pendingProposalsStore.getAllItems();
|
|
362
|
+
if (pendingProposals.length > 0) {
|
|
363
|
+
pendingProposals.forEach(({ groupId, firingDate }) => TaskScheduler_1.TaskScheduler.addTask({
|
|
364
|
+
task: () => this.commitPendingProposals({ groupId }),
|
|
365
|
+
firingDate,
|
|
366
|
+
key: groupId,
|
|
367
|
+
}));
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
catch (error) {
|
|
371
|
+
this.logger.error('Could not get pending proposals', error);
|
|
372
|
+
}
|
|
289
373
|
}
|
|
290
374
|
}
|
|
291
375
|
exports.MLSService = MLSService;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MLSService.js","sourceRoot":"","sources":["../../../src/mls/MLSService/MLSService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;AAmBH,yCAAsD;AACtD,sDAA8B;AAE9B,4EAAqE;AACrE,wFAAkF;
|
|
1
|
+
{"version":3,"file":"MLSService.js","sourceRoot":"","sources":["../../../src/mls/MLSService/MLSService.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;AAmBH,yCAAsD;AACtD,sDAA8B;AAE9B,4EAAqE;AACrE,wFAAkF;AAElF,yDAA0D;AAG1D,8CAA0C;AAC1C,8EAA6F;AAC7F,4DAAuD;AACvD,kDAA2F;AAC3F,8EAAyE;AACzE,0EAAqE;AAErE,iFAAiF;AACjF,wFAAwF;AACjF,MAAM,oBAAoB,GAAG,CAAC,KAAsB,EAAc,EAAE;IACzE,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/D,CAAC,CAAC;AAFW,QAAA,oBAAoB,wBAE/B;AAMF,MAAM,aAAa,GAAqB;IACtC,6BAA6B,EAAE,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG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
|
|
3
|
+
* Will convert a coreCrypto commit bundle into a Uint8Array representing a protobuf object
|
|
4
|
+
* @param commitBundle a commit bundle generated by coreCrypto
|
|
5
|
+
* @returns
|
|
6
|
+
*/
|
|
7
|
+
export declare function toProtobufCommitBundle({ commit, welcome, publicGroupState }: CommitBundle): Uint8Array;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.toProtobufCommitBundle = void 0;
|
|
22
|
+
const core_crypto_1 = require("@wireapp/core-crypto");
|
|
23
|
+
const mls_1 = require("@wireapp/protocol-messaging/web/mls");
|
|
24
|
+
const ratchetTreeMapping = {
|
|
25
|
+
[core_crypto_1.RatchetTreeType.Full]: mls_1.mls.RatchetTreeType.FULL,
|
|
26
|
+
[core_crypto_1.RatchetTreeType.ByRef]: mls_1.mls.RatchetTreeType.REFERENCE,
|
|
27
|
+
[core_crypto_1.RatchetTreeType.Delta]: mls_1.mls.RatchetTreeType.DELTA,
|
|
28
|
+
};
|
|
29
|
+
const groupInfoType = {
|
|
30
|
+
[core_crypto_1.PublicGroupStateEncryptionType.Plaintext]: mls_1.mls.GroupInfoType.PUBLIC_GROUP_STATE,
|
|
31
|
+
[core_crypto_1.PublicGroupStateEncryptionType.JweEncrypted]: mls_1.mls.GroupInfoType.GROUP_INFO_JWE,
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Will convert a coreCrypto commit bundle into a Uint8Array representing a protobuf object
|
|
35
|
+
* @param commitBundle a commit bundle generated by coreCrypto
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
function toProtobufCommitBundle({ commit, welcome, publicGroupState }) {
|
|
39
|
+
const { ratchetTreeType, encryptionType } = publicGroupState;
|
|
40
|
+
return mls_1.mls.CommitBundle.encode({
|
|
41
|
+
groupInfoBundle: {
|
|
42
|
+
ratchetTreeType: ratchetTreeMapping[ratchetTreeType],
|
|
43
|
+
groupInfo: publicGroupState.payload,
|
|
44
|
+
groupInfoType: groupInfoType[encryptionType],
|
|
45
|
+
},
|
|
46
|
+
commit,
|
|
47
|
+
welcome,
|
|
48
|
+
}).finish();
|
|
49
|
+
}
|
|
50
|
+
exports.toProtobufCommitBundle = toProtobufCommitBundle;
|
|
51
|
+
//# sourceMappingURL=commitBundleUtil.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commitBundleUtil.js","sourceRoot":"","sources":["../../../src/mls/MLSService/commitBundleUtil.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,sDAAmG;AACnG,6DAAwD;AAExD,MAAM,kBAAkB,GAAiD;IACvE,CAAC,6BAAe,CAAC,IAAI,CAAC,EAAE,SAAG,CAAC,eAAe,CAAC,IAAI;IAChD,CAAC,6BAAe,CAAC,KAAK,CAAC,EAAE,SAAG,CAAC,eAAe,CAAC,SAAS;IACtD,CAAC,6BAAe,CAAC,KAAK,CAAC,EAAE,SAAG,CAAC,eAAe,CAAC,KAAK;CACnD,CAAC;AACF,MAAM,aAAa,GAA8D;IAC/E,CAAC,4CAA8B,CAAC,SAAS,CAAC,EAAE,SAAG,CAAC,aAAa,CAAC,kBAAkB;IAChF,CAAC,4CAA8B,CAAC,YAAY,CAAC,EAAE,SAAG,CAAC,aAAa,CAAC,cAAc;CAChF,CAAC;AAEF;;;;GAIG;AACH,SAAgB,sBAAsB,CAAC,EAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAe;IACtF,MAAM,EAAC,eAAe,EAAE,cAAc,EAAC,GAAG,gBAAgB,CAAC;IAC3D,OAAO,SAAG,CAAC,YAAY,CAAC,MAAM,CAAC;QAC7B,eAAe,EAAE;YACf,eAAe,EAAE,kBAAkB,CAAC,eAAe,CAAC;YACpD,SAAS,EAAE,gBAAgB,CAAC,OAAO;YACnC,aAAa,EAAE,aAAa,CAAC,cAAc,CAAC;SAC7C;QACD,MAAM;QACN,OAAO;KACR,CAAC,CAAC,MAAM,EAAE,CAAC;AACd,CAAC;AAXD,wDAWC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MLSService';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
__exportStar(require("./MLSService"), exports);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/mls/MLSService/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,+CAA6B"}
|
package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/index.d.ts
RENAMED
|
File without changes
|
package/lib/mls/MLSService/{keyMaterialUpdatesStore → stores/keyMaterialUpdatesStore}/index.js
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mls/MLSService/stores/keyMaterialUpdatesStore/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,4DAA0C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { CommonMLS
|
|
1
|
+
import { CommonMLS } from '../../../types';
|
|
2
|
+
export declare type LastKeyMaterialUpdateParams = CommonMLS;
|
|
2
3
|
export interface KeyMaterialUpdatesStore {
|
|
3
4
|
[groupId: string]: LastKeyMaterialUpdateParams;
|
|
4
5
|
}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyMaterialUpdatesStore.js","sourceRoot":"","sources":["../../../../../src/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AASH,MAAM,UAAU,GAAG,oBAAoB,CAAC;AAExC,MAAM,iBAAiB,GAAG,GAA4B,EAAE;IACtD,MAAM,WAAW,GAAG,YAAY,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACrD,IAAI,CAAC,WAAW,EAAE;QAChB,OAAO,EAAE,CAAC;KACX;IACD,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,iBAAiB,GAAG,GAAkC,EAAE;IAC5D,MAAM,cAAc,GAAG,iBAAiB,EAAE,CAAC;IAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF,MAAM,8BAA8B,GAAG,CAAC,EAAC,OAAO,EAA8B,EAAE,EAAE;IAChF,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;IACxC,MAAM,cAAc,mCAAO,WAAW,KAAE,CAAC,OAAO,CAAC,EAAE,EAAC,OAAO,EAAC,GAAC,CAAC;IAC9D,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAG,CAAC,EAAC,OAAO,EAAY,EAAE,EAAE;IAC/D,MAAM,WAAW,GAAG,iBAAiB,EAAE,CAAC;IACxC,IAAI,WAAW,CAAC,OAAO,CAAC,EAAE;QACxB,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;KAC7B;IACD,YAAY,CAAC,OAAO,CAAC,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;AAChE,CAAC,CAAC;AAEW,QAAA,uBAAuB,GAAG;IACrC,iBAAiB;IACjB,8BAA8B;IAC9B,+BAA+B;CAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pendingProposalsStore';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
23
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
24
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
25
|
+
}
|
|
26
|
+
Object.defineProperty(o, k2, desc);
|
|
27
|
+
}) : (function(o, m, k, k2) {
|
|
28
|
+
if (k2 === undefined) k2 = k;
|
|
29
|
+
o[k2] = m[k];
|
|
30
|
+
}));
|
|
31
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
32
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
+
__exportStar(require("./pendingProposalsStore"), exports);
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/mls/MLSService/stores/pendingProposalsStore/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,0DAAwC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CommonMLS } from '../../../types';
|
|
2
|
+
export declare type PendingProposalsParams = {
|
|
3
|
+
firingDate: number;
|
|
4
|
+
} & CommonMLS;
|
|
5
|
+
export declare const pendingProposalsStore: {
|
|
6
|
+
getAllItems: () => PendingProposalsParams[];
|
|
7
|
+
storeItem: ({ groupId, firingDate }: PendingProposalsParams) => void;
|
|
8
|
+
deleteItem: ({ groupId }: CommonMLS) => void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Wire
|
|
4
|
+
* Copyright (C) 2022 Wire Swiss GmbH
|
|
5
|
+
*
|
|
6
|
+
* This program is free software: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.pendingProposalsStore = void 0;
|
|
22
|
+
const storageKey = 'pendingProposals';
|
|
23
|
+
const getAllItemsMap = () => {
|
|
24
|
+
const storedState = localStorage.getItem(storageKey);
|
|
25
|
+
if (!storedState) {
|
|
26
|
+
return {};
|
|
27
|
+
}
|
|
28
|
+
return JSON.parse(storedState);
|
|
29
|
+
};
|
|
30
|
+
const getAllItems = () => {
|
|
31
|
+
const storedStateMap = getAllItemsMap();
|
|
32
|
+
return Object.values(storedStateMap);
|
|
33
|
+
};
|
|
34
|
+
const storeItem = ({ groupId, firingDate }) => {
|
|
35
|
+
const storedState = getAllItemsMap();
|
|
36
|
+
const newStoredState = Object.assign(Object.assign({}, storedState), { [groupId]: { groupId, firingDate } });
|
|
37
|
+
localStorage.setItem(storageKey, JSON.stringify(newStoredState));
|
|
38
|
+
};
|
|
39
|
+
const deleteItem = ({ groupId }) => {
|
|
40
|
+
const storedState = getAllItemsMap();
|
|
41
|
+
if (storedState[groupId]) {
|
|
42
|
+
delete storedState[groupId];
|
|
43
|
+
}
|
|
44
|
+
localStorage.setItem(storageKey, JSON.stringify(storedState));
|
|
45
|
+
};
|
|
46
|
+
exports.pendingProposalsStore = {
|
|
47
|
+
getAllItems,
|
|
48
|
+
storeItem,
|
|
49
|
+
deleteItem,
|
|
50
|
+
};
|
|
51
|
+
//# sourceMappingURL=pendingProposalsStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pendingProposalsStore.js","sourceRoot":"","sources":["../../../../../src/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAYH,MAAM,UAAU,GAAG,kBAAkB,CAAC;AAEtC,MAAM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: you can redistribute it and/or modify
|
|
7
|
+
* it under the terms of the GNU General Public License as published by
|
|
8
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
9
|
+
* (at your option) any later version.
|
|
10
|
+
*
|
|
11
|
+
* This program is distributed in the hope that it will be useful,
|
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
14
|
+
* GNU General Public License for more details.
|
|
15
|
+
*
|
|
16
|
+
* You should have received a copy of the GNU General Public License
|
|
17
|
+
* along with this program. If not, see http://www.gnu.org/licenses/.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
|
+
exports.storageMock = void 0;
|
|
22
|
+
function storageMock() {
|
|
23
|
+
const storage = {};
|
|
24
|
+
return {
|
|
25
|
+
setItem: function (key, value) {
|
|
26
|
+
storage[key] = value || '';
|
|
27
|
+
},
|
|
28
|
+
getItem: function (key) {
|
|
29
|
+
return key in storage ? storage[key] : null;
|
|
30
|
+
},
|
|
31
|
+
removeItem: function (key) {
|
|
32
|
+
delete storage[key];
|
|
33
|
+
},
|
|
34
|
+
get length() {
|
|
35
|
+
return Object.keys(storage).length;
|
|
36
|
+
},
|
|
37
|
+
key: function (i) {
|
|
38
|
+
const keys = Object.keys(storage);
|
|
39
|
+
return keys[i] || null;
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
exports.storageMock = storageMock;
|
|
44
|
+
//# sourceMappingURL=stores.mock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores.mock.js","sourceRoot":"","sources":["../../../../src/mls/MLSService/stores/stores.mock.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAEH,SAAS,WAAW;IAClB,MAAM,OAAO,GAAQ,EAAE,CAAC;IAExB,OAAO;QACL,OAAO,EAAE,UAAU,GAAQ,EAAE,KAAU;YACrC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,IAAI,EAAE,CAAC;QAC7B,CAAC;QACD,OAAO,EAAE,UAAU,GAAQ;YACzB,OAAO,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9C,CAAC;QACD,UAAU,EAAE,UAAU,GAAQ;YAC5B,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;QACD,IAAI,MAAM;YACR,OAAO,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC;QACrC,CAAC;QACD,GAAG,EAAE,UAAU,CAAM;YACnB,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAClC,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;QACzB,CAAC;KACF,CAAC;AACJ,CAAC;AAEO,kCAAW"}
|
package/lib/mls/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './MLSService
|
|
1
|
+
export * from './MLSService';
|
package/lib/mls/index.js
CHANGED
|
@@ -32,5 +32,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
32
32
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
33
33
|
};
|
|
34
34
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
35
|
-
__exportStar(require("./MLSService
|
|
35
|
+
__exportStar(require("./MLSService"), exports);
|
|
36
36
|
//# sourceMappingURL=index.js.map
|
package/lib/mls/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mls/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/mls/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;AAEH,+CAA6B"}
|
package/lib/mls/types.d.ts
CHANGED
|
@@ -23,10 +23,6 @@ export declare type HandlePendingProposalsParams = {
|
|
|
23
23
|
export declare type CommitPendingProposalsParams = {
|
|
24
24
|
skipDelete?: boolean;
|
|
25
25
|
} & CommonMLS;
|
|
26
|
-
export declare type StorePendingProposalsParams = {
|
|
27
|
-
firingDate: number;
|
|
28
|
-
} & CommonMLS;
|
|
29
|
-
export declare type LastKeyMaterialUpdateParams = CommonMLS;
|
|
30
26
|
export interface CryptoProtocolConfig<T = any> {
|
|
31
27
|
/**
|
|
32
28
|
* encrypt/decrypt function pair that will be called before storing/fetching secrets in the secrets database.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BackendEvent } from '@wireapp/api-client/lib/event';
|
|
2
2
|
import { Notification } from '@wireapp/api-client/lib/notification/';
|
|
3
3
|
import { CRUDEngine } from '@wireapp/store-engine';
|
|
4
|
-
import { CommonMLS, StorePendingProposalsParams } from '../mls/types';
|
|
5
4
|
export declare enum DatabaseStores {
|
|
6
5
|
EVENTS = "events"
|
|
7
6
|
}
|
|
@@ -18,25 +17,4 @@ export declare class NotificationDatabaseRepository {
|
|
|
18
17
|
createLastEventDate(eventDate: Date): Promise<Date>;
|
|
19
18
|
getLastNotificationId(): Promise<string>;
|
|
20
19
|
updateLastNotificationId(lastNotification: Notification): Promise<string>;
|
|
21
|
-
/**
|
|
22
|
-
* ## MLS only ##
|
|
23
|
-
* Store groupIds with pending proposals and a delay in the DB until the proposals get committed.
|
|
24
|
-
*
|
|
25
|
-
* @param groupId groupId of the mls conversation
|
|
26
|
-
* @param firingDate date when the pending proposals should be committed
|
|
27
|
-
*/
|
|
28
|
-
storePendingProposal(params: StorePendingProposalsParams): Promise<boolean>;
|
|
29
|
-
/**
|
|
30
|
-
* ## MLS only ##
|
|
31
|
-
* Delete stored entries for pending proposals that have been committed.
|
|
32
|
-
*
|
|
33
|
-
* @param groupId groupId of the mls conversation
|
|
34
|
-
*/
|
|
35
|
-
deletePendingProposal({ groupId }: CommonMLS): Promise<boolean>;
|
|
36
|
-
/**
|
|
37
|
-
* ## MLS only ##
|
|
38
|
-
* Get all stored entries for pending proposals.
|
|
39
|
-
*
|
|
40
|
-
*/
|
|
41
|
-
getStoredPendingProposals(): Promise<StorePendingProposalsParams[]>;
|
|
42
20
|
}
|