cojson 0.10.8 → 0.10.15

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 (59) hide show
  1. package/.turbo/turbo-build.log +1 -1
  2. package/CHANGELOG.md +6 -0
  3. package/dist/coValueCore.js +3 -9
  4. package/dist/coValueCore.js.map +1 -1
  5. package/dist/coValues/account.js +9 -10
  6. package/dist/coValues/account.js.map +1 -1
  7. package/dist/coValues/group.js +1 -3
  8. package/dist/coValues/group.js.map +1 -1
  9. package/dist/localNode.js +3 -5
  10. package/dist/localNode.js.map +1 -1
  11. package/dist/permissions.js +2 -5
  12. package/dist/permissions.js.map +1 -1
  13. package/dist/tests/PeerKnownStates.test.js +82 -0
  14. package/dist/tests/PeerKnownStates.test.js.map +1 -0
  15. package/dist/tests/PeerState.test.js +188 -0
  16. package/dist/tests/PeerState.test.js.map +1 -0
  17. package/dist/tests/PriorityBasedMessageQueue.test.js +120 -0
  18. package/dist/tests/PriorityBasedMessageQueue.test.js.map +1 -0
  19. package/dist/tests/SyncStateManager.test.js +127 -0
  20. package/dist/tests/SyncStateManager.test.js.map +1 -0
  21. package/dist/tests/account.test.js +66 -0
  22. package/dist/tests/account.test.js.map +1 -0
  23. package/dist/tests/coList.test.js +120 -0
  24. package/dist/tests/coList.test.js.map +1 -0
  25. package/dist/tests/coMap.test.js +164 -0
  26. package/dist/tests/coMap.test.js.map +1 -0
  27. package/dist/tests/coPlainText.test.js +99 -0
  28. package/dist/tests/coPlainText.test.js.map +1 -0
  29. package/dist/tests/coStream.test.js +206 -0
  30. package/dist/tests/coStream.test.js.map +1 -0
  31. package/dist/tests/coValueCore.test.js +164 -0
  32. package/dist/tests/coValueCore.test.js.map +1 -0
  33. package/dist/tests/coValueState.test.js +364 -0
  34. package/dist/tests/coValueState.test.js.map +1 -0
  35. package/dist/tests/crypto.test.js +144 -0
  36. package/dist/tests/crypto.test.js.map +1 -0
  37. package/dist/tests/cryptoImpl.test.js +144 -0
  38. package/dist/tests/cryptoImpl.test.js.map +1 -0
  39. package/dist/tests/group.test.js +446 -0
  40. package/dist/tests/group.test.js.map +1 -0
  41. package/dist/tests/logger.test.js +118 -0
  42. package/dist/tests/logger.test.js.map +1 -0
  43. package/dist/tests/permissions.test.js +1858 -0
  44. package/dist/tests/permissions.test.js.map +1 -0
  45. package/dist/tests/priority.test.js +61 -0
  46. package/dist/tests/priority.test.js.map +1 -0
  47. package/dist/tests/sync.test.js +1548 -0
  48. package/dist/tests/sync.test.js.map +1 -0
  49. package/dist/tests/testUtils.js +312 -0
  50. package/dist/tests/testUtils.js.map +1 -0
  51. package/package.json +1 -1
  52. package/src/coValueCore.ts +3 -9
  53. package/src/coValues/account.ts +15 -15
  54. package/src/coValues/group.ts +1 -3
  55. package/src/localNode.ts +3 -5
  56. package/src/permissions.ts +2 -11
  57. package/src/tests/coValueCore.test.ts +2 -2
  58. package/src/tests/permissions.test.ts +45 -57
  59. package/tsconfig.json +1 -1
@@ -56,7 +56,7 @@ function logPermissionError(
56
56
  return;
57
57
  }
58
58
 
59
- logger.warn("Permission error: " + message, attributes);
59
+ logger.debug("Permission error: " + message, attributes);
60
60
  }
61
61
 
62
62
  export function determineValidTransactions(
@@ -476,16 +476,7 @@ function agentInAccountOrMemberInGroup(
476
476
  groupAtTime: RawGroup,
477
477
  ): RawAccountID | AgentID | undefined {
478
478
  if (transactor === groupAtTime.id && groupAtTime instanceof RawAccount) {
479
- return groupAtTime.currentAgentID().match(
480
- (agentID) => agentID,
481
- (e) => {
482
- logger.error(
483
- "Error while determining current agent ID in valid transactions",
484
- e,
485
- );
486
- return undefined;
487
- },
488
- );
479
+ return groupAtTime.currentAgentID();
489
480
  }
490
481
  return transactor;
491
482
  }
@@ -155,7 +155,7 @@ test("New transactions in a group correctly update owned values, including subsc
155
155
 
156
156
  map.subscribe(listener);
157
157
 
158
- expect(listener.mock.calls[0][0].get("hello")).toBe("world");
158
+ expect(listener.mock.calls[0]?.[0].get("hello")).toBe("world");
159
159
 
160
160
  const resignationThatWeJustLearnedAbout = {
161
161
  privacy: "trusting",
@@ -192,7 +192,7 @@ test("New transactions in a group correctly update owned values, including subsc
192
192
  expect(manuallyAdddedTxSuccess).toBe(true);
193
193
 
194
194
  expect(listener.mock.calls.length).toBe(2);
195
- expect(listener.mock.calls[1][0].get("hello")).toBe(undefined);
195
+ expect(listener.mock.calls[1]?.[0].get("hello")).toBe(undefined);
196
196
 
197
197
  expect(map.core.getValidSortedTransactions().length).toBe(0);
198
198
  });
@@ -358,7 +358,7 @@ test("Admins can set group read key and then use it to create and read private t
358
358
  const revelation = Crypto.seal({
359
359
  message: readKey,
360
360
  from: admin.currentSealerSecret(),
361
- to: admin.currentSealerID()._unsafeUnwrap(),
361
+ to: admin.currentSealerID(),
362
362
  nOnceMaterial: {
363
363
  in: groupCore.id,
364
364
  tx: groupCore.nextTransactionID(),
@@ -412,7 +412,7 @@ test("Admins can set group read key and then writers can use it to create and re
412
412
  const revelation1 = Crypto.seal({
413
413
  message: readKey,
414
414
  from: admin.currentSealerSecret(),
415
- to: admin.currentSealerID()._unsafeUnwrap(),
415
+ to: admin.currentSealerID(),
416
416
  nOnceMaterial: {
417
417
  in: groupCore.id,
418
418
  tx: groupCore.nextTransactionID(),
@@ -424,7 +424,7 @@ test("Admins can set group read key and then writers can use it to create and re
424
424
  const revelation2 = Crypto.seal({
425
425
  message: readKey,
426
426
  from: admin.currentSealerSecret(),
427
- to: writer.currentSealerID()._unsafeUnwrap(),
427
+ to: writer.currentSealerID(),
428
428
  nOnceMaterial: {
429
429
  in: groupCore.id,
430
430
  tx: groupCore.nextTransactionID(),
@@ -491,7 +491,7 @@ test("Admins can set group read key and then use it to create private transactio
491
491
  const revelation1 = Crypto.seal({
492
492
  message: readKey,
493
493
  from: admin.currentSealerSecret(),
494
- to: admin.currentSealerID()._unsafeUnwrap(),
494
+ to: admin.currentSealerID(),
495
495
  nOnceMaterial: {
496
496
  in: groupCore.id,
497
497
  tx: groupCore.nextTransactionID(),
@@ -503,7 +503,7 @@ test("Admins can set group read key and then use it to create private transactio
503
503
  const revelation2 = Crypto.seal({
504
504
  message: readKey,
505
505
  from: admin.currentSealerSecret(),
506
- to: reader.currentSealerID()._unsafeUnwrap(),
506
+ to: reader.currentSealerID(),
507
507
  nOnceMaterial: {
508
508
  in: groupCore.id,
509
509
  tx: groupCore.nextTransactionID(),
@@ -578,7 +578,7 @@ test("Admins can set group read key and then use it to create private transactio
578
578
  const revelation1 = Crypto.seal({
579
579
  message: readKey,
580
580
  from: admin.currentSealerSecret(),
581
- to: admin.currentSealerID()._unsafeUnwrap(),
581
+ to: admin.currentSealerID(),
582
582
  nOnceMaterial: {
583
583
  in: groupCore.id,
584
584
  tx: groupCore.nextTransactionID(),
@@ -590,7 +590,7 @@ test("Admins can set group read key and then use it to create private transactio
590
590
  const revelation2 = Crypto.seal({
591
591
  message: readKey,
592
592
  from: admin.currentSealerSecret(),
593
- to: reader1.currentSealerID()._unsafeUnwrap(),
593
+ to: reader1.currentSealerID(),
594
594
  nOnceMaterial: {
595
595
  in: groupCore.id,
596
596
  tx: groupCore.nextTransactionID(),
@@ -629,7 +629,7 @@ test("Admins can set group read key and then use it to create private transactio
629
629
  const revelation3 = Crypto.seal({
630
630
  message: readKey,
631
631
  from: admin.currentSealerSecret(),
632
- to: reader2.currentSealerID()._unsafeUnwrap(),
632
+ to: reader2.currentSealerID(),
633
633
  nOnceMaterial: {
634
634
  in: groupCore.id,
635
635
  tx: groupCore.nextTransactionID(),
@@ -694,7 +694,7 @@ test("Admins can set group read key, make a private transaction in an owned obje
694
694
  const revelation1 = Crypto.seal({
695
695
  message: readKey,
696
696
  from: admin.currentSealerSecret(),
697
- to: admin.currentSealerID()._unsafeUnwrap(),
697
+ to: admin.currentSealerID(),
698
698
  nOnceMaterial: {
699
699
  in: groupCore.id,
700
700
  tx: groupCore.nextTransactionID(),
@@ -724,7 +724,7 @@ test("Admins can set group read key, make a private transaction in an owned obje
724
724
  const revelation2 = Crypto.seal({
725
725
  message: readKey2,
726
726
  from: admin.currentSealerSecret(),
727
- to: admin.currentSealerID()._unsafeUnwrap(),
727
+ to: admin.currentSealerID(),
728
728
  nOnceMaterial: {
729
729
  in: groupCore.id,
730
730
  tx: groupCore.nextTransactionID(),
@@ -777,7 +777,7 @@ test("Admins can set group read key, make a private transaction in an owned obje
777
777
  const revelation = Crypto.seal({
778
778
  message: readKey,
779
779
  from: admin.currentSealerSecret(),
780
- to: admin.currentSealerID()._unsafeUnwrap(),
780
+ to: admin.currentSealerID(),
781
781
  nOnceMaterial: {
782
782
  in: groupCore.id,
783
783
  tx: groupCore.nextTransactionID(),
@@ -804,7 +804,7 @@ test("Admins can set group read key, make a private transaction in an owned obje
804
804
  const revelation2 = Crypto.seal({
805
805
  message: readKey2,
806
806
  from: admin.currentSealerSecret(),
807
- to: admin.currentSealerID()._unsafeUnwrap(),
807
+ to: admin.currentSealerID(),
808
808
  nOnceMaterial: {
809
809
  in: groupCore.id,
810
810
  tx: groupCore.nextTransactionID(),
@@ -816,7 +816,7 @@ test("Admins can set group read key, make a private transaction in an owned obje
816
816
  const revelation3 = Crypto.seal({
817
817
  message: readKey2,
818
818
  from: admin.currentSealerSecret(),
819
- to: reader.currentSealerID()._unsafeUnwrap(),
819
+ to: reader.currentSealerID(),
820
820
  nOnceMaterial: {
821
821
  in: groupCore.id,
822
822
  tx: groupCore.nextTransactionID(),
@@ -912,7 +912,7 @@ test("Admins can set group read rey, make a private transaction in an owned obje
912
912
  const revelation1 = Crypto.seal({
913
913
  message: readKey,
914
914
  from: admin.currentSealerSecret(),
915
- to: admin.currentSealerID()._unsafeUnwrap(),
915
+ to: admin.currentSealerID(),
916
916
  nOnceMaterial: {
917
917
  in: groupCore.id,
918
918
  tx: groupCore.nextTransactionID(),
@@ -924,7 +924,7 @@ test("Admins can set group read rey, make a private transaction in an owned obje
924
924
  const revelation2 = Crypto.seal({
925
925
  message: readKey,
926
926
  from: admin.currentSealerSecret(),
927
- to: reader.currentSealerID()._unsafeUnwrap(),
927
+ to: reader.currentSealerID(),
928
928
  nOnceMaterial: {
929
929
  in: groupCore.id,
930
930
  tx: groupCore.nextTransactionID(),
@@ -936,7 +936,7 @@ test("Admins can set group read rey, make a private transaction in an owned obje
936
936
  const revelation3 = Crypto.seal({
937
937
  message: readKey,
938
938
  from: admin.currentSealerSecret(),
939
- to: reader2.currentSealerID()._unsafeUnwrap(),
939
+ to: reader2.currentSealerID(),
940
940
  nOnceMaterial: {
941
941
  in: groupCore.id,
942
942
  tx: groupCore.nextTransactionID(),
@@ -982,7 +982,7 @@ test("Admins can set group read rey, make a private transaction in an owned obje
982
982
  const newRevelation1 = Crypto.seal({
983
983
  message: readKey2,
984
984
  from: admin.currentSealerSecret(),
985
- to: admin.currentSealerID()._unsafeUnwrap(),
985
+ to: admin.currentSealerID(),
986
986
  nOnceMaterial: {
987
987
  in: groupCore.id,
988
988
  tx: groupCore.nextTransactionID(),
@@ -994,7 +994,7 @@ test("Admins can set group read rey, make a private transaction in an owned obje
994
994
  const newRevelation2 = Crypto.seal({
995
995
  message: readKey2,
996
996
  from: admin.currentSealerSecret(),
997
- to: reader2.currentSealerID()._unsafeUnwrap(),
997
+ to: reader2.currentSealerID(),
998
998
  nOnceMaterial: {
999
999
  in: groupCore.id,
1000
1000
  tx: groupCore.nextTransactionID(),
@@ -1119,7 +1119,7 @@ test("Admins can create an adminInvite, which can add an admin", () => {
1119
1119
  const revelation = Crypto.seal({
1120
1120
  message: readKey,
1121
1121
  from: admin.currentSealerSecret(),
1122
- to: admin.currentSealerID()._unsafeUnwrap(),
1122
+ to: admin.currentSealerID(),
1123
1123
  nOnceMaterial: {
1124
1124
  in: groupCore.id,
1125
1125
  tx: groupCore.nextTransactionID(),
@@ -1229,7 +1229,7 @@ test("Admins can create a writerInvite, which can add a writer", () => {
1229
1229
  const revelation = Crypto.seal({
1230
1230
  message: readKey,
1231
1231
  from: admin.currentSealerSecret(),
1232
- to: admin.currentSealerID()._unsafeUnwrap(),
1232
+ to: admin.currentSealerID(),
1233
1233
  nOnceMaterial: {
1234
1234
  in: groupCore.id,
1235
1235
  tx: groupCore.nextTransactionID(),
@@ -1332,7 +1332,7 @@ test("Admins can create a readerInvite, which can add a reader", () => {
1332
1332
  const revelation = Crypto.seal({
1333
1333
  message: readKey,
1334
1334
  from: admin.currentSealerSecret(),
1335
- to: admin.currentSealerID()._unsafeUnwrap(),
1335
+ to: admin.currentSealerID(),
1336
1336
  nOnceMaterial: {
1337
1337
  in: groupCore.id,
1338
1338
  tx: groupCore.nextTransactionID(),
@@ -1425,7 +1425,7 @@ test("WriterInvites can not invite admins", () => {
1425
1425
  const revelation = Crypto.seal({
1426
1426
  message: readKey,
1427
1427
  from: admin.currentSealerSecret(),
1428
- to: admin.currentSealerID()._unsafeUnwrap(),
1428
+ to: admin.currentSealerID(),
1429
1429
  nOnceMaterial: {
1430
1430
  in: groupCore.id,
1431
1431
  tx: groupCore.nextTransactionID(),
@@ -1479,7 +1479,7 @@ test("ReaderInvites can not invite admins", () => {
1479
1479
  const revelation = Crypto.seal({
1480
1480
  message: readKey,
1481
1481
  from: admin.currentSealerSecret(),
1482
- to: admin.currentSealerID()._unsafeUnwrap(),
1482
+ to: admin.currentSealerID(),
1483
1483
  nOnceMaterial: {
1484
1484
  in: groupCore.id,
1485
1485
  tx: groupCore.nextTransactionID(),
@@ -1533,7 +1533,7 @@ test("ReaderInvites can not invite writers", () => {
1533
1533
  const revelation = Crypto.seal({
1534
1534
  message: readKey,
1535
1535
  from: admin.currentSealerSecret(),
1536
- to: admin.currentSealerID()._unsafeUnwrap(),
1536
+ to: admin.currentSealerID(),
1537
1537
  nOnceMaterial: {
1538
1538
  in: groupCore.id,
1539
1539
  tx: groupCore.nextTransactionID(),
@@ -1587,7 +1587,7 @@ test("WriteOnlyInvites can not invite writers", () => {
1587
1587
  const revelation = Crypto.seal({
1588
1588
  message: readKey,
1589
1589
  from: admin.currentSealerSecret(),
1590
- to: admin.currentSealerID()._unsafeUnwrap(),
1590
+ to: admin.currentSealerID(),
1591
1591
  nOnceMaterial: {
1592
1592
  in: groupCore.id,
1593
1593
  tx: groupCore.nextTransactionID(),
@@ -1641,7 +1641,7 @@ test("WriteOnlyInvites can not invite admins", () => {
1641
1641
  const revelation = Crypto.seal({
1642
1642
  message: readKey,
1643
1643
  from: admin.currentSealerSecret(),
1644
- to: admin.currentSealerID()._unsafeUnwrap(),
1644
+ to: admin.currentSealerID(),
1645
1645
  nOnceMaterial: {
1646
1646
  in: groupCore.id,
1647
1647
  tx: groupCore.nextTransactionID(),
@@ -1695,7 +1695,7 @@ test("WriteOnlyInvites can invite writeOnly", () => {
1695
1695
  const revelation = Crypto.seal({
1696
1696
  message: readKey,
1697
1697
  from: admin.currentSealerSecret(),
1698
- to: admin.currentSealerID()._unsafeUnwrap(),
1698
+ to: admin.currentSealerID(),
1699
1699
  nOnceMaterial: {
1700
1700
  in: groupCore.id,
1701
1701
  tx: groupCore.nextTransactionID(),
@@ -1749,7 +1749,7 @@ test("WriteOnlyInvites can set writeKeys", () => {
1749
1749
  const revelation = Crypto.seal({
1750
1750
  message: readKey,
1751
1751
  from: admin.currentSealerSecret(),
1752
- to: admin.currentSealerID()._unsafeUnwrap(),
1752
+ to: admin.currentSealerID(),
1753
1753
  nOnceMaterial: {
1754
1754
  in: groupCore.id,
1755
1755
  tx: groupCore.nextTransactionID(),
@@ -1800,7 +1800,7 @@ test("Invites can't override key revelations", () => {
1800
1800
  const revelation = Crypto.seal({
1801
1801
  message: readKey,
1802
1802
  from: admin.currentSealerSecret(),
1803
- to: admin.currentSealerID()._unsafeUnwrap(),
1803
+ to: admin.currentSealerID(),
1804
1804
  nOnceMaterial: {
1805
1805
  in: groupCore.id,
1806
1806
  tx: groupCore.nextTransactionID(),
@@ -1855,7 +1855,7 @@ test("WriteOnlyInvites can't override writeKeys", () => {
1855
1855
  const revelation = Crypto.seal({
1856
1856
  message: readKey,
1857
1857
  from: admin.currentSealerSecret(),
1858
- to: admin.currentSealerID()._unsafeUnwrap(),
1858
+ to: admin.currentSealerID(),
1859
1859
  nOnceMaterial: {
1860
1860
  in: groupCore.id,
1861
1861
  tx: groupCore.nextTransactionID(),
@@ -1929,7 +1929,7 @@ test("Can give read permission to 'everyone'", () => {
1929
1929
  childObject
1930
1930
  .testWithDifferentAccount(
1931
1931
  newAccount,
1932
- Crypto.newRandomSessionID(newAccount.currentAgentID()._unsafeUnwrap()),
1932
+ Crypto.newRandomSessionID(newAccount.currentAgentID()),
1933
1933
  )
1934
1934
  .getCurrentContent(),
1935
1935
  );
@@ -1955,7 +1955,7 @@ test("Can give read permissions to 'everyone' (high-level)", async () => {
1955
1955
  childObject.core
1956
1956
  .testWithDifferentAccount(
1957
1957
  new ControlledAgent(Crypto.newRandomAgentSecret(), Crypto),
1958
- Crypto.newRandomSessionID(newAccount.currentAgentID()._unsafeUnwrap()),
1958
+ Crypto.newRandomSessionID(newAccount.currentAgentID()),
1959
1959
  )
1960
1960
  .getCurrentContent(),
1961
1961
  );
@@ -1993,7 +1993,7 @@ test("Can give write permission to 'everyone'", async () => {
1993
1993
  childObject
1994
1994
  .testWithDifferentAccount(
1995
1995
  newAccount,
1996
- Crypto.newRandomSessionID(newAccount.currentAgentID()._unsafeUnwrap()),
1996
+ Crypto.newRandomSessionID(newAccount.currentAgentID()),
1997
1997
  )
1998
1998
  .getCurrentContent(),
1999
1999
  );
@@ -2025,7 +2025,7 @@ test("Can give write permissions to 'everyone' (high-level)", async () => {
2025
2025
  childObject.core
2026
2026
  .testWithDifferentAccount(
2027
2027
  newAccount,
2028
- Crypto.newRandomSessionID(newAccount.currentAgentID()._unsafeUnwrap()),
2028
+ Crypto.newRandomSessionID(newAccount.currentAgentID()),
2029
2029
  )
2030
2030
  .getCurrentContent(),
2031
2031
  );
@@ -2087,7 +2087,7 @@ test("Writers, readers and invitees can not set parent extensions", () => {
2087
2087
  group.core
2088
2088
  .testWithDifferentAccount(
2089
2089
  adminInvite,
2090
- Crypto.newRandomSessionID(adminInvite.currentAgentID()._unsafeUnwrap()),
2090
+ Crypto.newRandomSessionID(adminInvite.currentAgentID()),
2091
2091
  )
2092
2092
  .getCurrentContent(),
2093
2093
  );
@@ -2099,9 +2099,7 @@ test("Writers, readers and invitees can not set parent extensions", () => {
2099
2099
  group.core
2100
2100
  .testWithDifferentAccount(
2101
2101
  writerInvite,
2102
- Crypto.newRandomSessionID(
2103
- writerInvite.currentAgentID()._unsafeUnwrap(),
2104
- ),
2102
+ Crypto.newRandomSessionID(writerInvite.currentAgentID()),
2105
2103
  )
2106
2104
  .getCurrentContent(),
2107
2105
  );
@@ -2113,9 +2111,7 @@ test("Writers, readers and invitees can not set parent extensions", () => {
2113
2111
  group.core
2114
2112
  .testWithDifferentAccount(
2115
2113
  readerInvite,
2116
- Crypto.newRandomSessionID(
2117
- readerInvite.currentAgentID()._unsafeUnwrap(),
2118
- ),
2114
+ Crypto.newRandomSessionID(readerInvite.currentAgentID()),
2119
2115
  )
2120
2116
  .getCurrentContent(),
2121
2117
  );
@@ -2209,7 +2205,7 @@ test("Invitees can not set child extensions", () => {
2209
2205
  group.core
2210
2206
  .testWithDifferentAccount(
2211
2207
  adminInvite,
2212
- Crypto.newRandomSessionID(adminInvite.currentAgentID()._unsafeUnwrap()),
2208
+ Crypto.newRandomSessionID(adminInvite.currentAgentID()),
2213
2209
  )
2214
2210
  .getCurrentContent(),
2215
2211
  );
@@ -2221,9 +2217,7 @@ test("Invitees can not set child extensions", () => {
2221
2217
  group.core
2222
2218
  .testWithDifferentAccount(
2223
2219
  writerInvite,
2224
- Crypto.newRandomSessionID(
2225
- writerInvite.currentAgentID()._unsafeUnwrap(),
2226
- ),
2220
+ Crypto.newRandomSessionID(writerInvite.currentAgentID()),
2227
2221
  )
2228
2222
  .getCurrentContent(),
2229
2223
  );
@@ -2235,9 +2229,7 @@ test("Invitees can not set child extensions", () => {
2235
2229
  group.core
2236
2230
  .testWithDifferentAccount(
2237
2231
  readerInvite,
2238
- Crypto.newRandomSessionID(
2239
- readerInvite.currentAgentID()._unsafeUnwrap(),
2240
- ),
2232
+ Crypto.newRandomSessionID(readerInvite.currentAgentID()),
2241
2233
  )
2242
2234
  .getCurrentContent(),
2243
2235
  );
@@ -2422,7 +2414,7 @@ test("Writers, readers and invites can't reveal parent read keys to child groups
2422
2414
  group.core
2423
2415
  .testWithDifferentAccount(
2424
2416
  adminInvite,
2425
- Crypto.newRandomSessionID(adminInvite.currentAgentID()._unsafeUnwrap()),
2417
+ Crypto.newRandomSessionID(adminInvite.currentAgentID()),
2426
2418
  )
2427
2419
  .getCurrentContent(),
2428
2420
  );
@@ -2440,9 +2432,7 @@ test("Writers, readers and invites can't reveal parent read keys to child groups
2440
2432
  group.core
2441
2433
  .testWithDifferentAccount(
2442
2434
  writerInvite,
2443
- Crypto.newRandomSessionID(
2444
- writerInvite.currentAgentID()._unsafeUnwrap(),
2445
- ),
2435
+ Crypto.newRandomSessionID(writerInvite.currentAgentID()),
2446
2436
  )
2447
2437
  .getCurrentContent(),
2448
2438
  );
@@ -2460,9 +2450,7 @@ test("Writers, readers and invites can't reveal parent read keys to child groups
2460
2450
  group.core
2461
2451
  .testWithDifferentAccount(
2462
2452
  readerInvite,
2463
- Crypto.newRandomSessionID(
2464
- readerInvite.currentAgentID()._unsafeUnwrap(),
2465
- ),
2453
+ Crypto.newRandomSessionID(readerInvite.currentAgentID()),
2466
2454
  )
2467
2455
  .getCurrentContent(),
2468
2456
  );
@@ -2941,7 +2929,7 @@ test("Can revoke read permission from 'everyone'", async () => {
2941
2929
  childObject.core
2942
2930
  .testWithDifferentAccount(
2943
2931
  newAccount,
2944
- Crypto.newRandomSessionID(newAccount.currentAgentID()._unsafeUnwrap()),
2932
+ Crypto.newRandomSessionID(newAccount.currentAgentID()),
2945
2933
  )
2946
2934
  .getCurrentContent(),
2947
2935
  );
@@ -2963,7 +2951,7 @@ test("Can revoke read permission from 'everyone'", async () => {
2963
2951
  childObject.core
2964
2952
  .testWithDifferentAccount(
2965
2953
  newAccount2,
2966
- Crypto.newRandomSessionID(newAccount2.currentAgentID()._unsafeUnwrap()),
2954
+ Crypto.newRandomSessionID(newAccount2.currentAgentID()),
2967
2955
  )
2968
2956
  .getCurrentContent(),
2969
2957
  );
package/tsconfig.json CHANGED
@@ -12,5 +12,5 @@
12
12
  "esModuleInterop": true
13
13
  },
14
14
  "include": ["./src/**/*.ts"],
15
- "exclude": ["./node_modules", "./src/tests"]
15
+ "exclude": ["./node_modules"]
16
16
  }