@wireapp/core 42.11.0 → 42.12.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.
Files changed (82) hide show
  1. package/lib/Account.d.ts +6 -2
  2. package/lib/Account.d.ts.map +1 -1
  3. package/lib/Account.js +32 -12
  4. package/lib/conversation/ConversationService/ConversationService.d.ts.map +1 -1
  5. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts +125 -0
  6. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.d.ts.map +1 -0
  7. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.js +157 -0
  8. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts +17 -0
  9. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.d.ts.map +1 -0
  10. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/AcmeService.types.js +20 -0
  11. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/index.d.ts +2 -0
  12. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/index.d.ts.map +1 -0
  13. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/index.js +35 -0
  14. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.d.ts +306 -0
  15. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.d.ts.map +1 -0
  16. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/AcmeServer/schema.js +117 -0
  17. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/index.d.ts +2 -0
  18. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/index.d.ts.map +1 -0
  19. package/lib/messagingProtocols/mls/E2EIdentityService/Connection/index.js +35 -0
  20. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts +43 -0
  21. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.d.ts.map +1 -0
  22. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIService.types.js +25 -0
  23. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts +17 -0
  24. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.d.ts.map +1 -0
  25. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceExternal.js +85 -0
  26. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts +24 -0
  27. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.d.ts.map +1 -0
  28. package/lib/messagingProtocols/mls/E2EIdentityService/E2EIServiceInternal.js +263 -0
  29. package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts +12 -0
  30. package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.d.ts.map +1 -0
  31. package/lib/messagingProtocols/mls/E2EIdentityService/Helper/index.js +46 -0
  32. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Account.d.ts +12 -0
  33. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Account.d.ts.map +1 -0
  34. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Account.js +32 -0
  35. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts +15 -0
  36. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.d.ts.map +1 -0
  37. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Authorization.js +49 -0
  38. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Certificate.d.ts +14 -0
  39. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Certificate.d.ts.map +1 -0
  40. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Certificate.js +33 -0
  41. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts +12 -0
  42. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.d.ts.map +1 -0
  43. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.js +63 -0
  44. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts +20 -0
  45. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.d.ts.map +1 -0
  46. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/DpopChallenge.types.js +20 -0
  47. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/index.d.ts +2 -0
  48. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/index.d.ts.map +1 -0
  49. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/DpopChallenge/index.js +35 -0
  50. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts +28 -0
  51. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.d.ts.map +1 -0
  52. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/OidcChallenge.js +34 -0
  53. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts +28 -0
  54. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.d.ts.map +1 -0
  55. package/lib/messagingProtocols/mls/E2EIdentityService/Steps/Order.js +56 -0
  56. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.d.ts +28 -0
  57. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.d.ts.map +1 -0
  58. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.js +120 -0
  59. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts +136 -0
  60. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.d.ts.map +1 -0
  61. package/lib/messagingProtocols/mls/E2EIdentityService/Storage/E2EIStorage.schema.js +49 -0
  62. package/lib/messagingProtocols/mls/E2EIdentityService/index.d.ts +4 -0
  63. package/lib/messagingProtocols/mls/E2EIdentityService/index.d.ts.map +1 -0
  64. package/lib/messagingProtocols/mls/E2EIdentityService/index.js +37 -0
  65. package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +21 -6
  66. package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +1 -1
  67. package/lib/messagingProtocols/mls/MLSService/MLSService.js +81 -11
  68. package/lib/messagingProtocols/mls/MLSService/MLSService.test.js +27 -10
  69. package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts +4 -0
  70. package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts.map +1 -1
  71. package/lib/messagingProtocols/mls/types.d.ts +1 -0
  72. package/lib/messagingProtocols/mls/types.d.ts.map +1 -1
  73. package/lib/util/LocalStorageStore/index.d.ts +7 -0
  74. package/lib/util/LocalStorageStore/index.d.ts.map +1 -0
  75. package/lib/util/LocalStorageStore/index.js +38 -0
  76. package/lib/util/TaskScheduler/TaskScheduler.store.d.ts +1 -1
  77. package/lib/util/TaskScheduler/TaskScheduler.store.d.ts.map +1 -1
  78. package/lib/util/TaskScheduler/TaskScheduler.store.js +3 -13
  79. package/lib/util/index.d.ts +1 -0
  80. package/lib/util/index.d.ts.map +1 -1
  81. package/lib/util/index.js +1 -0
  82. package/package.json +5 -4
@@ -1 +1 @@
1
- {"version":3,"file":"MLSService.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAqB,gBAAgB,EAAC,MAAM,gCAAgC,CAAC;AACzF,OAAO,EAAC,sBAAsB,EAAE,kBAAkB,EAAC,MAAM,sCAAsC,CAAC;AAChG,OAAO,EAAC,eAAe,EAAC,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAC,8BAA8B,EAAE,2BAA2B,EAAC,MAAM,+BAA+B,CAAC;AAE1G,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAGzD,OAAO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AkB,GACrC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAQ9B;;;;;;;OAOG;IACU,sBAAsB,CAAC,EAAC,SAAS,EAAE,OAAO,EAAE,SAAS,EAAC,EAAE,4BAA4B;YAWnF,4BAA4B;YAU5B,0BAA0B;IAKxC,OAAO,CAAC,6BAA6B;IAIrC;;;;;OAKG;IACU,sBAAsB,CAAC,EAAC,OAAO,EAAE,UAAkB,EAAC,EAAE,4BAA4B;IAY/F;;;;OAIG;IACU,+BAA+B;IAiB5C;;;;OAIG;IACU,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,QAAQ,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;IAY9F,wBAAwB,CAAC,KAAK,EAAE,8BAA8B;IAI9D,4BAA4B,CAAC,KAAK,EAAE,2BAA2B,EAAE,QAAQ,EAAE,MAAM;IAcjF,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE;IASjF;;;;;;;;OAQG;IACU,UAAU,CACrB,YAAY,EAAE,MAAM,EACpB,mBAAmB,EAAE,mBAAmB,EACxC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,aAAa,GAAG,OAAO,CAAC;CA6CpC"}
@@ -46,6 +46,7 @@ const messageSender_1 = require("../../../conversation/message/messageSender");
46
46
  const fullyQualifiedClientIdUtils_1 = require("../../../util/fullyQualifiedClientIdUtils");
47
47
  const numberToHex_1 = require("../../../util/numberToHex");
48
48
  const TaskScheduler_1 = require("../../../util/TaskScheduler");
49
+ const E2EIdentityService_1 = require("../E2EIdentityService");
49
50
  const events_1 = require("../EventHandler/events");
50
51
  //@todo: this function is temporary, we wait for the update from core-crypto side
51
52
  //they are returning regular array instead of Uint8Array for commit and welcome messages
@@ -554,12 +555,13 @@ class MLSService extends commons_1.TypedEventEmitter {
554
555
  return this.apiClient.api.client.uploadMLSKeyPackages(clientId, keyPackages.map(keyPackage => btoa(bazinga64_1.Converter.arrayBufferViewToBaselineString(keyPackage))));
555
556
  }
556
557
  async wipeConversation(groupId) {
558
+ await this.cancelKeyMaterialRenewal(groupId);
559
+ await this.cancelPendingProposalsTask(groupId);
557
560
  const doesConversationExist = await this.conversationExists(groupId);
558
561
  if (!doesConversationExist) {
559
562
  //if the mls group does not exist, we don't need to wipe it
560
563
  return;
561
564
  }
562
- await this.cancelKeyMaterialRenewal(groupId);
563
565
  const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
564
566
  return this.coreCryptoClient.wipeConversation(groupIdBytes);
565
567
  }
@@ -588,17 +590,27 @@ class MLSService extends commons_1.TypedEventEmitter {
588
590
  if (delayInMs > 0) {
589
591
  const eventDate = new Date(eventTime);
590
592
  const firingDate = eventDate.setTime(eventDate.getTime() + delayInMs);
591
- await this.coreDatabase.put('pendingProposals', { groupId, firingDate }, groupId);
592
- TaskScheduler_1.TaskScheduler.addTask({
593
- task: () => this.commitPendingProposals({ groupId }),
594
- firingDate,
595
- key: groupId,
596
- });
593
+ await this.schedulePendingProposalsTask(groupId, firingDate);
597
594
  }
598
595
  else {
599
596
  await this.commitPendingProposals({ groupId, skipDelete: true });
600
597
  }
601
598
  }
599
+ async schedulePendingProposalsTask(groupId, firingDate) {
600
+ await this.coreDatabase.put('pendingProposals', { groupId, firingDate }, groupId);
601
+ TaskScheduler_1.TaskScheduler.addTask({
602
+ task: () => this.commitPendingProposals({ groupId }),
603
+ firingDate,
604
+ key: this.createPendingProposalsTaskKey(groupId),
605
+ });
606
+ }
607
+ async cancelPendingProposalsTask(groupId) {
608
+ TaskScheduler_1.TaskScheduler.cancelTask(this.createPendingProposalsTaskKey(groupId));
609
+ await this.coreDatabase.delete('pendingProposals', groupId);
610
+ }
611
+ createPendingProposalsTaskKey(groupId) {
612
+ return `pending-proposals-${groupId}`;
613
+ }
602
614
  /**
603
615
  * Commit all pending proposals for a given groupId
604
616
  *
@@ -609,8 +621,7 @@ class MLSService extends commons_1.TypedEventEmitter {
609
621
  try {
610
622
  await this.commitProposals(bazinga64_1.Decoder.fromBase64(groupId).asBytes);
611
623
  if (!skipDelete) {
612
- TaskScheduler_1.TaskScheduler.cancelTask(groupId);
613
- await this.coreDatabase.delete('pendingProposals', groupId);
624
+ await this.cancelPendingProposalsTask(groupId);
614
625
  }
615
626
  }
616
627
  catch (error) {
@@ -622,14 +633,14 @@ class MLSService extends commons_1.TypedEventEmitter {
622
633
  * Function must only be called once, after application start
623
634
  *
624
635
  */
625
- async checkExistingPendingProposals() {
636
+ async initialisePendingProposalsTasks() {
626
637
  try {
627
638
  const pendingProposals = await this.coreDatabase.getAll('pendingProposals');
628
639
  if (pendingProposals.length > 0) {
629
640
  pendingProposals.forEach(({ groupId, firingDate }) => TaskScheduler_1.TaskScheduler.addTask({
630
641
  task: () => this.commitPendingProposals({ groupId }),
631
642
  firingDate,
632
- key: groupId,
643
+ key: this.createPendingProposalsTaskKey(groupId),
633
644
  }));
634
645
  }
635
646
  }
@@ -667,5 +678,64 @@ class MLSService extends commons_1.TypedEventEmitter {
667
678
  }
668
679
  return (0, events_1.handleMLSWelcomeMessage)({ event, mlsService: this });
669
680
  }
681
+ async deleteMLSKeyPackages(clientId, keyPackagRefs) {
682
+ return this.apiClient.api.client.deleteMLSKeyPackages(clientId, keyPackagRefs.map(keypackage => btoa(bazinga64_1.Converter.arrayBufferViewToBaselineString(keypackage))));
683
+ }
684
+ // E2E Identity Service related methods below this line
685
+ /**
686
+ *
687
+ * @param discoveryUrl URL of the acme server
688
+ * @param user User object
689
+ * @param clientId The client id of the current device
690
+ * @param nbPrekeys Amount of prekeys to generate
691
+ * @param oAuthIdToken The OAuth id token if the user is already authenticated
692
+ * @returns AcmeChallenge if the user is not authenticated, true if the user is authenticated
693
+ */
694
+ async enrollE2EI(discoveryUrl, e2eiServiceExternal, user, clientId, nbPrekeys, oAuthIdToken) {
695
+ try {
696
+ const instance = await E2EIdentityService_1.E2EIServiceInternal.getInstance({
697
+ apiClient: this.apiClient,
698
+ coreCryptClient: this.coreCryptoClient,
699
+ e2eiServiceExternal,
700
+ user,
701
+ clientId,
702
+ discoveryUrl,
703
+ keyPackagesAmount: nbPrekeys,
704
+ });
705
+ if (!oAuthIdToken) {
706
+ const challengeData = await instance.startCertificateProcess();
707
+ if (challengeData) {
708
+ return challengeData;
709
+ }
710
+ }
711
+ else {
712
+ const rotateBundle = await instance.continueCertificateProcess(oAuthIdToken);
713
+ if (rotateBundle !== undefined) {
714
+ // Remove old key packages
715
+ await this.deleteMLSKeyPackages(clientId, rotateBundle.keyPackageRefsToRemove);
716
+ // Upload new key packages with x509 certificate
717
+ await this.uploadMLSKeyPackages(clientId, rotateBundle.newKeyPackages);
718
+ // Update keying material
719
+ for (const [groupId, commitBundle] of rotateBundle.commits) {
720
+ const groupIdAsBytes = bazinga64_1.Converter.hexStringToArrayBufferView(groupId);
721
+ // manual copy of the commit bundle data because of a problem while cloning it
722
+ const newCommitBundle = {
723
+ commit: commitBundle.commit,
724
+ // @ts-ignore
725
+ groupInfo: (commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.group_info) || commitBundle.groupInfo,
726
+ welcome: commitBundle === null || commitBundle === void 0 ? void 0 : commitBundle.welcome,
727
+ };
728
+ await this.uploadCommitBundle(groupIdAsBytes, newCommitBundle);
729
+ }
730
+ return true;
731
+ }
732
+ }
733
+ return false;
734
+ }
735
+ catch (error) {
736
+ this.logger.error('E2EI - Failed to enroll', error);
737
+ throw error;
738
+ }
739
+ }
670
740
  }
671
741
  exports.MLSService = MLSService;
@@ -27,6 +27,7 @@ const CoreCryptoMLSError_1 = require("./CoreCryptoMLSError");
27
27
  const MLSService_1 = require("./MLSService");
28
28
  const CoreDB_1 = require("../../../storage/CoreDB");
29
29
  const RecurringTaskScheduler_1 = require("../../../util/RecurringTaskScheduler");
30
+ const TaskScheduler_1 = require("../../../util/TaskScheduler");
30
31
  jest.createMockFromModule('@wireapp/api-client');
31
32
  function createUserId() {
32
33
  return { id: (0, crypto_1.randomUUID)(), domain: '' };
@@ -55,18 +56,16 @@ const createMLSService = async () => {
55
56
  },
56
57
  });
57
58
  const mlsService = new MLSService_1.MLSService(apiClient, mockCoreCrypto, mockedDb, recurringTaskScheduler, {});
58
- return [mlsService, { apiClient, coreCrypto: mockCoreCrypto }];
59
+ return [mlsService, { apiClient, coreCrypto: mockCoreCrypto, recurringTaskScheduler }];
59
60
  };
60
61
  describe('MLSService', () => {
61
62
  describe('registerConversation', () => {
62
63
  let mlsService;
63
64
  let apiClient;
64
- let coreCrypto;
65
65
  beforeEach(async () => {
66
- const [mockedMLSService, { apiClient: mockApiClient, coreCrypto: mockCoreCrypto }] = await createMLSService();
66
+ const [mockedMLSService, { apiClient: mockApiClient }] = await createMLSService();
67
67
  mlsService = mockedMLSService;
68
68
  apiClient = mockApiClient;
69
- coreCrypto = mockCoreCrypto;
70
69
  jest
71
70
  .spyOn(apiClient.api.client, 'getPublicKeys')
72
71
  .mockResolvedValue({ removal: { algo: 'mXOagqRIX/RFd7QyXJA8/Ed8X+hvQgLXIiwYHm3OQFc=' } });
@@ -95,12 +94,6 @@ describe('MLSService', () => {
95
94
  await mlsService.registerConversation(groupId, [createUserId(), createUserId()]);
96
95
  expect(mlsService.scheduleKeyMaterialRenewal).toHaveBeenCalledWith(groupId);
97
96
  });
98
- it('cancels key material timers after group is wiped', async () => {
99
- const groupId = 'mXOagqRIX/RFd7QyXJA8/Ed8X+hvQgLXIiwYHm4OQFc=';
100
- jest.spyOn(coreCrypto, 'conversationExists').mockResolvedValueOnce(true);
101
- await mlsService.wipeConversation(groupId);
102
- expect(mlsService.cancelKeyMaterialRenewal).toHaveBeenCalledWith(groupId);
103
- });
104
97
  });
105
98
  describe('isConversationEstablished', () => {
106
99
  it('returns false if conversation does not exist locally', async () => {
@@ -174,6 +167,30 @@ describe('MLSService', () => {
174
167
  expect(apiClient.api.client.putClient).not.toHaveBeenCalled();
175
168
  });
176
169
  });
170
+ describe('wipeConversation', () => {
171
+ it('wipes a group and cancels its timers', async () => {
172
+ const [mlsService, { coreCrypto, recurringTaskScheduler }] = await createMLSService();
173
+ const groupId = 'mXOagqRIX/RFd7QyXJA8/Ed8X+hvQgLXIiwYHm4OQFc=';
174
+ jest.spyOn(coreCrypto, 'conversationExists').mockResolvedValueOnce(true);
175
+ jest.spyOn(recurringTaskScheduler, 'cancelTask');
176
+ jest.spyOn(TaskScheduler_1.TaskScheduler, 'cancelTask');
177
+ await mlsService.wipeConversation(groupId);
178
+ expect(recurringTaskScheduler.cancelTask).toHaveBeenCalledWith(expect.stringContaining(groupId));
179
+ expect(TaskScheduler_1.TaskScheduler.cancelTask).toHaveBeenCalledWith(expect.stringContaining(groupId));
180
+ expect(coreCrypto.wipeConversation).toHaveBeenCalled();
181
+ });
182
+ it('does not try to wipe a group if it does not exist already', async () => {
183
+ const [mlsService, { coreCrypto, recurringTaskScheduler }] = await createMLSService();
184
+ const groupId = 'mXOagqRIX/RFd7QyXJA8/Ed8X+hvQgLXIiwYHm4OQFc=';
185
+ jest.spyOn(coreCrypto, 'conversationExists').mockResolvedValueOnce(false);
186
+ jest.spyOn(recurringTaskScheduler, 'cancelTask');
187
+ jest.spyOn(TaskScheduler_1.TaskScheduler, 'cancelTask');
188
+ await mlsService.wipeConversation(groupId);
189
+ expect(recurringTaskScheduler.cancelTask).toHaveBeenCalledWith(expect.stringContaining(groupId));
190
+ expect(TaskScheduler_1.TaskScheduler.cancelTask).toHaveBeenCalledWith(expect.stringContaining(groupId));
191
+ expect(coreCrypto.wipeConversation).not.toHaveBeenCalled();
192
+ });
193
+ });
177
194
  describe('handleMLSMessageAddEvent', () => {
178
195
  it('decrypts a message and emits new epoch event if epoch has changed', async () => {
179
196
  const [mlsService, { coreCrypto: mockCoreCrypto }] = await createMLSService();
@@ -26,5 +26,9 @@ export interface MLSServiceConfig {
26
26
  * default credential type to use for MLS (Basic = 1 by default)
27
27
  */
28
28
  defaultCredentialType: CredentialType;
29
+ /**
30
+ * signals if the E2E - Identity process should be used
31
+ */
32
+ useE2EI?: boolean;
29
33
  }
30
34
  //# sourceMappingURL=MLSService.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MLSService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpF,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,6BAA6B,EAAE,MAAM,CAAC;IACtC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,qBAAqB,EAAE,cAAc,CAAC;CACvC"}
1
+ {"version":3,"file":"MLSService.types.d.ts","sourceRoot":"","sources":["../../../../src/messagingProtocols/mls/MLSService/MLSService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAEpF,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,OAAO,CAAC,YAAY,CAAC,CAAC;IAErD;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,6BAA6B,EAAE,MAAM,CAAC;IACtC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,kBAAkB,EAAE,WAAW,CAAC;IAChC;;OAEG;IACH,qBAAqB,EAAE,cAAc,CAAC;IACtC;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -1,6 +1,7 @@
1
1
  import { QualifiedId } from '@wireapp/api-client/lib/user';
2
2
  import { CoreCryptoCallbacks } from '@wireapp/core-crypto';
3
3
  import { MLSServiceConfig } from './MLSService/MLSService.types';
4
+ export type ClientId = string;
4
5
  export type SecretCrypto = {
5
6
  encrypt: (value: Uint8Array) => Promise<Uint8Array>;
6
7
  decrypt: (payload: Uint8Array) => Promise<Uint8Array>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/messagingProtocols/mls/types.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAC,mBAAmB,EAAC,MAAM,sBAAsB,CAAC;AAEzD,OAAO,EAAC,gBAAgB,EAAC,MAAM,+BAA+B,CAAC;AAE/D,MAAM,MAAM,YAAY,GACpB;IACE,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACpD,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD,OAAO,EAAE,SAAS,CAAC;CACpB,GACD;IACE,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAChD,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEN,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,CAAC;IAC5F;;;;;OAKG;IACH,yBAAyB,EAAE,CAAC,cAAc,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,GAAG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AAU,CAAC,CAAC;IAChD,OAAO,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IAClD,OAAO,EAAE,CAAC,CAAC;CACZ,CAAC;AAEN,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,mBAAmB,EAAE,WAAW,GAAG,eAAe,CAAC;IAC5F;;;;;OAKG;IACH,yBAAyB,EAAE,CAAC,cAAc,EAAE,WAAW,KAAK,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;CACzF;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,GAAG,SAAS,CAAC;AAEd,MAAM,MAAM,4BAA4B,GAAG;IACzC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,SAAS,CAAC;AAEd,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAE5B,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;OAIG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B,uEAAuE;IACvE,GAAG,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAEhC,oKAAoK;IACpK,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,OAAO,EAAC,WAAW,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const LocalStorageStore: <T = string>(pKey: string) => {
2
+ get: (key: string) => T | undefined;
3
+ add: (key: string, value: T) => void;
4
+ remove: (key: string) => void;
5
+ has: (key: string) => boolean;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/util/LocalStorageStore/index.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,iBAAiB,qBAAsB,MAAM;eAC7C,MAAM;eAUN,MAAM;kBACH,MAAM;eACT,MAAM;CACjB,CAAC"}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ /*
3
+ * Wire
4
+ * Copyright (C) 2023 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.LocalStorageStore = void 0;
22
+ const prependKey = (key, pKey) => `${pKey}_${key}`;
23
+ const LocalStorageStore = (pKey) => ({
24
+ get: (key) => {
25
+ const value = localStorage.getItem(prependKey(key, pKey));
26
+ if (value) {
27
+ if (!Number.isNaN(Number(value))) {
28
+ return Number(value);
29
+ }
30
+ return value;
31
+ }
32
+ return undefined;
33
+ },
34
+ add: (key, value) => localStorage.setItem(prependKey(key, pKey), String(value)),
35
+ remove: (key) => localStorage.removeItem(prependKey(key, pKey)),
36
+ has: (key) => !!localStorage.getItem(prependKey(key, pKey)),
37
+ });
38
+ exports.LocalStorageStore = LocalStorageStore;
@@ -1,6 +1,6 @@
1
1
  export declare const TaskSchedulerStore: {
2
2
  get: (key: string) => number | undefined;
3
- add: (key: string, firingDate: number) => void;
3
+ add: (key: string, value: number) => void;
4
4
  remove: (key: string) => void;
5
5
  has: (key: string) => boolean;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TaskScheduler.store.d.ts","sourceRoot":"","sources":["../../../src/util/TaskScheduler/TaskScheduler.store.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,kBAAkB;eAClB,MAAM;eAON,MAAM,cAAc,MAAM;kBACvB,MAAM;eACT,MAAM;CAClB,CAAC"}
1
+ {"version":3,"file":"TaskScheduler.store.d.ts","sourceRoot":"","sources":["../../../src/util/TaskScheduler/TaskScheduler.store.ts"],"names":[],"mappings":"AAuBA,eAAO,MAAM,kBAAkB;;;;;CAAwC,CAAC"}
@@ -19,16 +19,6 @@
19
19
  */
20
20
  Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.TaskSchedulerStore = void 0;
22
- const prependKey = (key) => `TaskScheduler_${key}`;
23
- exports.TaskSchedulerStore = {
24
- get: (key) => {
25
- const value = localStorage.getItem(prependKey(key));
26
- if (value) {
27
- return Number(value);
28
- }
29
- return undefined;
30
- },
31
- add: (key, firingDate) => localStorage.setItem(prependKey(key), String(firingDate)),
32
- remove: (key) => localStorage.removeItem(prependKey(key)),
33
- has: (key) => !!localStorage.getItem(prependKey(key)),
34
- };
22
+ const LocalStorageStore_1 = require("../LocalStorageStore");
23
+ const prependKey = `TaskScheduler`;
24
+ exports.TaskSchedulerStore = (0, LocalStorageStore_1.LocalStorageStore)(prependKey);
@@ -1,2 +1,3 @@
1
1
  export * from './TypePredicateUtil';
2
+ export * from './TaskScheduler';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/util/index.ts"],"names":[],"mappings":"AAmBA,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC"}
package/lib/util/index.js CHANGED
@@ -33,3 +33,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  __exportStar(require("./TypePredicateUtil"), exports);
36
+ __exportStar(require("./TaskScheduler"), exports);
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "./lib/cryptography/AssetCryptography/crypto.node": "./lib/cryptography/AssetCryptography/crypto.browser.js"
12
12
  },
13
13
  "dependencies": {
14
- "@wireapp/api-client": "^26.2.5",
14
+ "@wireapp/api-client": "^26.3.1",
15
15
  "@wireapp/commons": "^5.2.1",
16
16
  "@wireapp/core-crypto": "1.0.0-rc.13",
17
17
  "@wireapp/cryptobox": "12.8.0",
@@ -27,7 +27,8 @@
27
27
  "idb": "7.1.1",
28
28
  "logdown": "3.3.1",
29
29
  "long": "^5.2.0",
30
- "uuidjs": "4.2.13"
30
+ "uuidjs": "4.2.13",
31
+ "zod": "3.22.4"
31
32
  },
32
33
  "devDependencies": {
33
34
  "@faker-js/faker": "^8.0.0",
@@ -60,6 +61,6 @@
60
61
  "test:coverage": "jest --coverage",
61
62
  "watch": "tsc --watch"
62
63
  },
63
- "version": "42.11.0",
64
- "gitHead": "97e31b0ed7b2b65505a8dd9af52907b5d9123233"
64
+ "version": "42.12.1",
65
+ "gitHead": "a9684dd830144566ca418a66825798c1736388de"
65
66
  }