cojson 0.7.0-alpha.5 → 0.7.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.
Files changed (113) hide show
  1. package/.eslintrc.cjs +3 -2
  2. package/.prettierrc.js +9 -0
  3. package/.turbo/turbo-build.log +3 -30
  4. package/.turbo/turbo-lint.log +4 -0
  5. package/.turbo/turbo-test.log +1106 -0
  6. package/CHANGELOG.md +104 -0
  7. package/README.md +3 -1
  8. package/dist/base64url.test.js +25 -0
  9. package/dist/base64url.test.js.map +1 -0
  10. package/dist/coValueCore.js +60 -37
  11. package/dist/coValueCore.js.map +1 -1
  12. package/dist/coValues/account.js +16 -15
  13. package/dist/coValues/account.js.map +1 -1
  14. package/dist/coValues/coList.js +1 -1
  15. package/dist/coValues/coList.js.map +1 -1
  16. package/dist/coValues/coMap.js +17 -8
  17. package/dist/coValues/coMap.js.map +1 -1
  18. package/dist/coValues/group.js +13 -14
  19. package/dist/coValues/group.js.map +1 -1
  20. package/dist/coreToCoValue.js.map +1 -1
  21. package/dist/crypto/PureJSCrypto.js +89 -0
  22. package/dist/crypto/PureJSCrypto.js.map +1 -0
  23. package/dist/crypto/WasmCrypto.js +127 -0
  24. package/dist/crypto/WasmCrypto.js.map +1 -0
  25. package/dist/crypto/crypto.js +151 -0
  26. package/dist/crypto/crypto.js.map +1 -0
  27. package/dist/ids.js +4 -2
  28. package/dist/ids.js.map +1 -1
  29. package/dist/index.js +6 -8
  30. package/dist/index.js.map +1 -1
  31. package/dist/jsonStringify.js.map +1 -1
  32. package/dist/localNode.js +41 -38
  33. package/dist/localNode.js.map +1 -1
  34. package/dist/permissions.js +6 -6
  35. package/dist/permissions.js.map +1 -1
  36. package/dist/storage/FileSystem.js +61 -0
  37. package/dist/storage/FileSystem.js.map +1 -0
  38. package/dist/storage/chunksAndKnownStates.js +97 -0
  39. package/dist/storage/chunksAndKnownStates.js.map +1 -0
  40. package/dist/storage/index.js +265 -0
  41. package/dist/storage/index.js.map +1 -0
  42. package/dist/sync.js +29 -25
  43. package/dist/sync.js.map +1 -1
  44. package/dist/tests/account.test.js +58 -0
  45. package/dist/tests/account.test.js.map +1 -0
  46. package/dist/tests/coList.test.js +76 -0
  47. package/dist/tests/coList.test.js.map +1 -0
  48. package/dist/tests/coMap.test.js +136 -0
  49. package/dist/tests/coMap.test.js.map +1 -0
  50. package/dist/tests/coStream.test.js +172 -0
  51. package/dist/tests/coStream.test.js.map +1 -0
  52. package/dist/tests/coValueCore.test.js +114 -0
  53. package/dist/tests/coValueCore.test.js.map +1 -0
  54. package/dist/tests/crypto.test.js +118 -0
  55. package/dist/tests/crypto.test.js.map +1 -0
  56. package/dist/tests/cryptoImpl.test.js +113 -0
  57. package/dist/tests/cryptoImpl.test.js.map +1 -0
  58. package/dist/tests/group.test.js +34 -0
  59. package/dist/tests/group.test.js.map +1 -0
  60. package/dist/tests/permissions.test.js +1060 -0
  61. package/dist/tests/permissions.test.js.map +1 -0
  62. package/dist/tests/sync.test.js +816 -0
  63. package/dist/tests/sync.test.js.map +1 -0
  64. package/dist/tests/testUtils.js +12 -11
  65. package/dist/tests/testUtils.js.map +1 -1
  66. package/dist/typeUtils/accountOrAgentIDfromSessionID.js.map +1 -1
  67. package/dist/typeUtils/isAccountID.js.map +1 -1
  68. package/dist/typeUtils/isCoValue.js.map +1 -1
  69. package/package.json +14 -27
  70. package/src/base64url.test.ts +6 -5
  71. package/src/coValue.ts +1 -1
  72. package/src/coValueCore.ts +179 -126
  73. package/src/coValues/account.ts +30 -32
  74. package/src/coValues/coList.ts +11 -11
  75. package/src/coValues/coMap.ts +27 -17
  76. package/src/coValues/coStream.ts +17 -17
  77. package/src/coValues/group.ts +93 -109
  78. package/src/coreToCoValue.ts +5 -2
  79. package/src/crypto/PureJSCrypto.ts +200 -0
  80. package/src/crypto/WasmCrypto.ts +259 -0
  81. package/src/crypto/crypto.ts +336 -0
  82. package/src/ids.ts +8 -7
  83. package/src/index.ts +24 -24
  84. package/src/jsonStringify.ts +6 -4
  85. package/src/jsonValue.ts +2 -2
  86. package/src/localNode.ts +103 -109
  87. package/src/media.ts +3 -3
  88. package/src/permissions.ts +19 -21
  89. package/src/storage/FileSystem.ts +152 -0
  90. package/src/storage/chunksAndKnownStates.ts +139 -0
  91. package/src/storage/index.ts +479 -0
  92. package/src/streamUtils.ts +12 -12
  93. package/src/sync.ts +79 -63
  94. package/src/tests/account.test.ts +15 -15
  95. package/src/tests/coList.test.ts +94 -0
  96. package/src/tests/coMap.test.ts +162 -0
  97. package/src/tests/coStream.test.ts +246 -0
  98. package/src/tests/coValueCore.test.ts +36 -37
  99. package/src/tests/crypto.test.ts +66 -72
  100. package/src/tests/cryptoImpl.test.ts +183 -0
  101. package/src/tests/group.test.ts +16 -17
  102. package/src/tests/permissions.test.ts +269 -283
  103. package/src/tests/sync.test.ts +122 -123
  104. package/src/tests/testUtils.ts +24 -21
  105. package/src/typeUtils/accountOrAgentIDfromSessionID.ts +1 -2
  106. package/src/typeUtils/expectGroup.ts +1 -1
  107. package/src/typeUtils/isAccountID.ts +0 -1
  108. package/src/typeUtils/isCoValue.ts +1 -2
  109. package/tsconfig.json +0 -1
  110. package/dist/crypto.js +0 -254
  111. package/dist/crypto.js.map +0 -1
  112. package/src/crypto.ts +0 -484
  113. package/src/tests/coValue.test.ts +0 -497
@@ -0,0 +1,1106 @@
1
+
2
+ > cojson@0.7.0-alpha.37 test /Users/anselm/jazz/jazz/packages/cojson
3
+ > vitest --run
4
+
5
+
6
+ RUN v0.34.6 /Users/anselm/jazz/jazz/packages/cojson
7
+
8
+ ✓ src/base64url.test.ts (1 test) 2ms
9
+ stderr | src/tests/crypto.test.ts > Encryption for transactions doesn't decrypt with a wrong key
10
+ Decryption error SyntaxError: Unexpected token '�', "�Q�3�\�J((" is not valid JSON
11
+ at JSON.parse (<anonymous>)
12
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
13
+ at WasmCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
14
+ at WasmCrypto.decryptForTransaction (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:185:21)
15
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/crypto.test.ts:141:31
16
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
17
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
18
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
19
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
20
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
21
+ Decryption error SyntaxError: Unexpected token '�', "�ó|?��J��1" is not valid JSON
22
+ at JSON.parse (<anonymous>)
23
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
24
+ at WasmCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
25
+ at WasmCrypto.decryptForTransaction (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:185:21)
26
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/crypto.test.ts:146:31
27
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
28
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
29
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
30
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
31
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
32
+
33
+ stderr | src/tests/crypto.test.ts > Encryption of keySecrets doesn't decrypt with a wrong key
34
+ Decryption error SyntaxError: Unexpected token '�', "�` 6��'�G"... is not valid JSON
35
+ at JSON.parse (<anonymous>)
36
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
37
+ at WasmCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
38
+ at WasmCrypto.decryptKeySecret (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:231:21)
39
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/crypto.test.ts:182:30
40
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
41
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
42
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
43
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
44
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
45
+
46
+ ✓ src/tests/crypto.test.ts (8 tests) 26ms
47
+ stderr | src/tests/cryptoImpl.test.ts > Crypto 'Wasm' > encrypt and decrypt
48
+ Decryption error SyntaxError: Unexpected token '�', "��w�hh� 곞K\" is not valid JSON
49
+ at JSON.parse (<anonymous>)
50
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
51
+ at WasmCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
52
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/cryptoImpl.test.ts:116:18
53
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
54
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
55
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
56
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
57
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
58
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
59
+ Decryption error SyntaxError: Unexpected token '�', "�A#mUȲ�@w�X " is not valid JSON
60
+ at JSON.parse (<anonymous>)
61
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
62
+ at WasmCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
63
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/cryptoImpl.test.ts:120:18
64
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
65
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
66
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
67
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
68
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
69
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
70
+
71
+ ✓ src/tests/cryptoImpl.test.ts (22 tests) 94ms
72
+ stderr | src/tests/cryptoImpl.test.ts > Crypto 'PureJS' > encrypt and decrypt
73
+ Decryption error SyntaxError: Unexpected token '�', "��w�hh� 곞K\" is not valid JSON
74
+ at JSON.parse (<anonymous>)
75
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
76
+ at PureJSCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
77
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/cryptoImpl.test.ts:116:18
78
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
79
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
80
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
81
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
82
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
83
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
84
+ Decryption error SyntaxError: Unexpected token '�', "�A#mUȲ�@w�X " is not valid JSON
85
+ at JSON.parse (<anonymous>)
86
+ at Module.parseJSON (/Users/anselm/jazz/jazz/packages/cojson/src/jsonStringify.ts:67:17)
87
+ at PureJSCrypto.decrypt (/Users/anselm/jazz/jazz/packages/cojson/src/crypto/crypto.ts:156:20)
88
+ at /Users/anselm/jazz/jazz/packages/cojson/src/tests/cryptoImpl.test.ts:120:18
89
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:135:14
90
+ at file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:58:26
91
+ at runTest (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:663:17)
92
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
93
+ at runSuite (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:782:15)
94
+ at runFiles (file:///Users/anselm/jazz/jazz/node_modules/.pnpm/@vitest+runner@0.34.6/node_modules/@vitest/runner/dist/index.js:834:5)
95
+
96
+ stderr | src/tests/coValueCore.test.ts > transactions with wrong signature are rejected
97
+ Invalid signature in co_zULXjSTZMKvYuDQcwMi9zcf3rAN signature_z5unB52C1RBtedAA7Vn5R3vU33wN4yqF5QxTKtBy5hsVsp4NWryzLz7rBzV5uBVaHRKNd9LB8do9qkP6nLHuy8qMm hash_zEchGZJsapRaCr7JzwoPPiv6b92iHXeABzGFLntUDNGwK signer_zDTUFQtxhzoEpHcLTDRGAvS7ikPcaKoxc93eC6Ff6mYef
98
+
99
+ stderr | src/tests/coValueCore.test.ts > transactions with correctly signed, but wrong hash are rejected
100
+ Invalid hash {
101
+ expectedNewHash: 'hash_zAmx9oB82S3JqnmpH4SnnH6MPg8WPUcqBqXXqg2mobdaZ',
102
+ givenExpectedNewHash: 'hash_zCZvzexZAYZJZgPEBZXJgEGMdAFwj1GrR7LJe1ce3b8sz'
103
+ }
104
+
105
+ ✓ src/tests/coValueCore.test.ts (4 tests) 140ms
106
+ stdout | src/tests/sync.test.ts > No matter the optimistic known state, node respects invalid known state messages and resyncs
107
+ Sending correction
108
+
109
+ ✓ src/tests/account.test.ts (3 tests) 193ms
110
+ stdout | src/tests/account.test.ts > Can create account with one node, and then load it on another
111
+ node2 -> node1 {
112
+ "action": "load",
113
+ "id": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ",
114
+ "header": false,
115
+ "sessions": {}
116
+ }
117
+ node1 -> node2 {
118
+ "action": "known",
119
+ "id": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ",
120
+ "header": true,
121
+ "sessions": {
122
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zZaHzmSehqP1": 3,
123
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zCMomE8eV1xu": 1
124
+ }
125
+ }
126
+ node1 -> node2 {
127
+ "action": "content",
128
+ "id": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ",
129
+ "header": {
130
+ "type": "comap",
131
+ "ruleset": {
132
+ "type": "group",
133
+ "initialAdmin": "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE"
134
+ },
135
+ "meta": {
136
+ "type": "account"
137
+ },
138
+ "createdAt": null,
139
+ "uniqueness": null
140
+ },
141
+ "new": {
142
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zZaHzmSehqP1": {
143
+ "after": 0,
144
+ "newTransactions": [
145
+ {
146
+ "privacy": "trusting",
147
+ "madeAt": 1716579021106,
148
+ "changes": "[{\"key\":\"sealer_z94Y..."
149
+ },
150
+ {
151
+ "privacy": "trusting",
152
+ "madeAt": 1716579021111,
153
+ "changes": "[{\"key\":\"key_z2bJHrR..."
154
+ },
155
+ {
156
+ "privacy": "trusting",
157
+ "madeAt": 1716579021119,
158
+ "changes": "[{\"key\":\"readKey\",\"o..."
159
+ }
160
+ ],
161
+ "lastSignature": "signature_z2uaA4LeQsRgL4wW6iiubkyRqTvFUnvuBCoGr2mEnFegBRmzcw9Z4ia37rENjw7fSw9esH7MXrguZKzTMcSGEL8Pp"
162
+ },
163
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zCMomE8eV1xu": {
164
+ "after": 0,
165
+ "newTransactions": [
166
+ {
167
+ "privacy": "trusting",
168
+ "madeAt": 1716579021127,
169
+ "changes": "[{\"key\":\"profile\",\"o..."
170
+ }
171
+ ],
172
+ "lastSignature": "signature_z3ZZJviN3MK8EJcNokRYGgHMrUCYxmSuDHZHMZ9bY6C6MsTJe3xBxhhpR3TWWcbxQZXK7WSE92FVnnonDEeSUQeF4"
173
+ }
174
+ }
175
+ }
176
+ node2 -> node1 {
177
+ "action": "known",
178
+ "id": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ",
179
+ "header": true,
180
+ "sessions": {
181
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zZaHzmSehqP1": 3,
182
+ "sealer_z94YVkR1HVRR5KeX5ekj1NrFrtKiYUWXzf8pueDbYPMFi/signer_zHD8jk43T5aAvxpahWxTzFegtgWecnorKyqYK73zU5uNE_session_zCMomE8eV1xu": 1
183
+ }
184
+ }
185
+ node2 -> node1 {
186
+ "action": "load",
187
+ "id": "co_zRX25f2DdHhDLbgBXwGNqLkutKP",
188
+ "header": false,
189
+ "sessions": {}
190
+ }
191
+ node1 -> node2 {
192
+ "action": "known",
193
+ "asDependencyOf": "co_zRX25f2DdHhDLbgBXwGNqLkutKP",
194
+ "id": "co_znZnjxHZuqcC7rDdj4ERYBfcuWF",
195
+ "header": true,
196
+ "sessions": {
197
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 5
198
+ }
199
+ }
200
+ node1 -> node2 {
201
+ "action": "known",
202
+ "id": "co_zRX25f2DdHhDLbgBXwGNqLkutKP",
203
+ "header": true,
204
+ "sessions": {
205
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 1
206
+ }
207
+ }
208
+ node1 -> node2 {
209
+ "action": "content",
210
+ "id": "co_znZnjxHZuqcC7rDdj4ERYBfcuWF",
211
+ "header": {
212
+ "type": "comap",
213
+ "ruleset": {
214
+ "type": "group",
215
+ "initialAdmin": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ"
216
+ },
217
+ "meta": null,
218
+ "createdAt": "2024-05-24T19:30:21.120Z",
219
+ "uniqueness": "z2Keuiunj7Q3D1D6WR"
220
+ },
221
+ "new": {
222
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": {
223
+ "after": 0,
224
+ "newTransactions": [
225
+ {
226
+ "privacy": "trusting",
227
+ "madeAt": 1716579021120,
228
+ "changes": "[{\"key\":\"co_zGMQghDq..."
229
+ },
230
+ {
231
+ "privacy": "trusting",
232
+ "madeAt": 1716579021122,
233
+ "changes": "[{\"key\":\"key_zY5Rmks..."
234
+ },
235
+ {
236
+ "privacy": "trusting",
237
+ "madeAt": 1716579021123,
238
+ "changes": "[{\"key\":\"readKey\",\"o..."
239
+ },
240
+ {
241
+ "privacy": "trusting",
242
+ "madeAt": 1716579021124,
243
+ "changes": "[{\"key\":\"everyone\",\"..."
244
+ },
245
+ {
246
+ "privacy": "trusting",
247
+ "madeAt": 1716579021125,
248
+ "changes": "[{\"key\":\"key_zY5Rmks..."
249
+ }
250
+ ],
251
+ "lastSignature": "signature_z5bh4PLJ38PTqHzkv9iog8VKB73fS4KNBtXhDfcinbDPKcHtDHnhuWBbxtsLVXEx35WruR6PQ6XSpp8LrsVKNT6HL"
252
+ }
253
+ }
254
+ }
255
+ node1 -> node2 {
256
+ "action": "content",
257
+ "id": "co_zRX25f2DdHhDLbgBXwGNqLkutKP",
258
+ "header": {
259
+ "type": "comap",
260
+ "ruleset": {
261
+ "type": "ownedByGroup",
262
+ "group": "co_znZnjxHZuqcC7rDdj4ERYBfcuWF"
263
+ },
264
+ "meta": null,
265
+ "createdAt": "2024-05-24T19:30:21.126Z",
266
+ "uniqueness": "z2Efn4tq2mmq9QKrFt"
267
+ },
268
+ "new": {
269
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": {
270
+ "after": 0,
271
+ "newTransactions": [
272
+ {
273
+ "privacy": "private",
274
+ "madeAt": 1716579021126,
275
+ "keyUsed": "key_zY5RmksYwv4i4FK4U",
276
+ "encryptedChanges": "encrypted_UHo8PTc7Gk..."
277
+ }
278
+ ],
279
+ "lastSignature": "signature_zpVWSuCf3YjmcDC3nAXnewfAnvLWfz6KeYkV3qm6aDKFKgYtwK38JwCq9xwtK6M7gNVGYPkiMfcgRJofxPthFiau"
280
+ }
281
+ }
282
+ }
283
+ node2 -> node1 {
284
+ "action": "known",
285
+ "id": "co_znZnjxHZuqcC7rDdj4ERYBfcuWF",
286
+ "header": true,
287
+ "sessions": {
288
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 5
289
+ }
290
+ }
291
+ node2 -> node1 {
292
+ "action": "load",
293
+ "id": "co_zVXsZEdxT42nn6gMtgFUBVqV6Qg",
294
+ "header": false,
295
+ "sessions": {}
296
+ }
297
+ node2 -> node1 {
298
+ "action": "known",
299
+ "id": "co_zRX25f2DdHhDLbgBXwGNqLkutKP",
300
+ "header": true,
301
+ "sessions": {
302
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 1
303
+ }
304
+ }
305
+ node1 -> node2 {
306
+ "action": "known",
307
+ "asDependencyOf": "co_zVXsZEdxT42nn6gMtgFUBVqV6Qg",
308
+ "id": "co_zA79KLvj6rKorBNABoYfLp7XpAd",
309
+ "header": true,
310
+ "sessions": {
311
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 3
312
+ }
313
+ }
314
+ node1 -> node2 {
315
+ "action": "known",
316
+ "id": "co_zVXsZEdxT42nn6gMtgFUBVqV6Qg",
317
+ "header": true,
318
+ "sessions": {
319
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 1
320
+ }
321
+ }
322
+ node1 -> node2 {
323
+ "action": "content",
324
+ "id": "co_zA79KLvj6rKorBNABoYfLp7XpAd",
325
+ "header": {
326
+ "type": "comap",
327
+ "ruleset": {
328
+ "type": "group",
329
+ "initialAdmin": "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ"
330
+ },
331
+ "meta": null,
332
+ "createdAt": "2024-05-24T19:30:21.132Z",
333
+ "uniqueness": "z4DAGSeJY4XuhoBktf"
334
+ },
335
+ "new": {
336
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": {
337
+ "after": 0,
338
+ "newTransactions": [
339
+ {
340
+ "privacy": "trusting",
341
+ "madeAt": 1716579021132,
342
+ "changes": "[{\"key\":\"co_zGMQghDq..."
343
+ },
344
+ {
345
+ "privacy": "trusting",
346
+ "madeAt": 1716579021133,
347
+ "changes": "[{\"key\":\"key_z3nmBHt..."
348
+ },
349
+ {
350
+ "privacy": "trusting",
351
+ "madeAt": 1716579021134,
352
+ "changes": "[{\"key\":\"readKey\",\"o..."
353
+ }
354
+ ],
355
+ "lastSignature": "signature_z3wrVrzyDw2ePJaQP5b3LXedTxpSALdo7jxDF31gQ8aiXNJxLJpm9DEzd7ky5n5TmwKR1EipFnpFQpe7DyaFFHunf"
356
+ }
357
+ }
358
+ }
359
+ node1 -> node2 {
360
+ "action": "content",
361
+ "id": "co_zVXsZEdxT42nn6gMtgFUBVqV6Qg",
362
+ "header": {
363
+ "type": "comap",
364
+ "ruleset": {
365
+ "type": "ownedByGroup",
366
+ "group": "co_zA79KLvj6rKorBNABoYfLp7XpAd"
367
+ },
368
+ "meta": null,
369
+ "createdAt": "2024-05-24T19:30:21.135Z",
370
+ "uniqueness": "z87pnt34EPaycAwc2"
371
+ },
372
+ "new": {
373
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": {
374
+ "after": 0,
375
+ "newTransactions": [
376
+ {
377
+ "privacy": "private",
378
+ "madeAt": 1716579021135,
379
+ "keyUsed": "key_z3nmBHtnT9dmEeRXSu",
380
+ "encryptedChanges": "encrypted_Uc8yzuG_uP..."
381
+ }
382
+ ],
383
+ "lastSignature": "signature_z3F6xye6uZPiNrTQZTQiXGJ5qi8p1pp2nTc6RxMcYKX6iXEwQhncxSc7UZMmv7q1RwAq1ryH11zteJXqJ7ADmAwC8"
384
+ }
385
+ }
386
+ }
387
+ node2 -> node1 {
388
+ "action": "known",
389
+ "id": "co_zA79KLvj6rKorBNABoYfLp7XpAd",
390
+ "header": true,
391
+ "sessions": {
392
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 3
393
+ }
394
+ }
395
+ node2 -> node1 {
396
+ "action": "known",
397
+ "id": "co_zVXsZEdxT42nn6gMtgFUBVqV6Qg",
398
+ "header": true,
399
+ "sessions": {
400
+ "co_zGMQghDqxAwCjnBpPF8UFFpPzeQ_session_zCMomE8eV1xu": 1
401
+ }
402
+ }
403
+
404
+ stdout | src/tests/sync.test.ts > Can sync a coValue through a server to another client
405
+ client1 -> server {
406
+ "action": "load",
407
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
408
+ "header": true,
409
+ "sessions": {
410
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
411
+ }
412
+ }
413
+ client2 -> server {
414
+ "action": "load",
415
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
416
+ "header": false,
417
+ "sessions": {}
418
+ }
419
+ client1 -> server {
420
+ "action": "load",
421
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
422
+ "header": true,
423
+ "sessions": {
424
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 1
425
+ }
426
+ }
427
+ client1 -> server {
428
+ "action": "content",
429
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
430
+ "header": {
431
+ "type": "comap",
432
+ "ruleset": {
433
+ "type": "group",
434
+ "initialAdmin": "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX"
435
+ },
436
+ "meta": null,
437
+ "createdAt": "2024-05-24T19:30:21.180Z",
438
+ "uniqueness": "zzcm4TG1tVTwrtn61"
439
+ },
440
+ "new": {
441
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": {
442
+ "after": 0,
443
+ "newTransactions": [
444
+ {
445
+ "privacy": "trusting",
446
+ "madeAt": 1716579021180,
447
+ "changes": "[{\"key\":\"sealer_z4NA..."
448
+ },
449
+ {
450
+ "privacy": "trusting",
451
+ "madeAt": 1716579021181,
452
+ "changes": "[{\"key\":\"key_zJMVCGS..."
453
+ },
454
+ {
455
+ "privacy": "trusting",
456
+ "madeAt": 1716579021182,
457
+ "changes": "[{\"key\":\"readKey\",\"o..."
458
+ }
459
+ ],
460
+ "lastSignature": "signature_z3Lr7keENMWjQFvpMR1yuKaNt5Q76XjGi567bF8yhdYSoFJ5f8fDX5QMravJRksQtyfmx49DoudkEqUE2d1zJ5JBJ"
461
+ }
462
+ }
463
+ }
464
+ client1 -> server {
465
+ "action": "content",
466
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
467
+ "header": {
468
+ "type": "comap",
469
+ "ruleset": {
470
+ "type": "group",
471
+ "initialAdmin": "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX"
472
+ },
473
+ "meta": null,
474
+ "createdAt": "2024-05-24T19:30:21.180Z",
475
+ "uniqueness": "zzcm4TG1tVTwrtn61"
476
+ },
477
+ "new": {
478
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": {
479
+ "after": 0,
480
+ "newTransactions": [
481
+ {
482
+ "privacy": "trusting",
483
+ "madeAt": 1716579021180,
484
+ "changes": "[{\"key\":\"sealer_z4NA..."
485
+ },
486
+ {
487
+ "privacy": "trusting",
488
+ "madeAt": 1716579021181,
489
+ "changes": "[{\"key\":\"key_zJMVCGS..."
490
+ },
491
+ {
492
+ "privacy": "trusting",
493
+ "madeAt": 1716579021182,
494
+ "changes": "[{\"key\":\"readKey\",\"o..."
495
+ }
496
+ ],
497
+ "lastSignature": "signature_z3Lr7keENMWjQFvpMR1yuKaNt5Q76XjGi567bF8yhdYSoFJ5f8fDX5QMravJRksQtyfmx49DoudkEqUE2d1zJ5JBJ"
498
+ }
499
+ }
500
+ }
501
+ client1 -> server {
502
+ "action": "content",
503
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
504
+ "header": {
505
+ "type": "comap",
506
+ "ruleset": {
507
+ "type": "ownedByGroup",
508
+ "group": "co_zjHc9XYHspsUBgf26A1swwru3Hd"
509
+ },
510
+ "meta": null,
511
+ "createdAt": "2024-05-24T19:30:21.182Z",
512
+ "uniqueness": "z3eYFUjHvk17ZX6X4J"
513
+ },
514
+ "new": {
515
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": {
516
+ "after": 0,
517
+ "newTransactions": [
518
+ {
519
+ "privacy": "trusting",
520
+ "madeAt": 1716579021182,
521
+ "changes": "[{\"key\":\"hello\",\"op\"..."
522
+ }
523
+ ],
524
+ "lastSignature": "signature_z4zH379rhH31DteMH3ebW3mRZekEtbRamxcemG7rytx4FHhxxXbYyvmSs3u84yzH8jyXD6DVtHbg6xZTbJ4VHiRC4"
525
+ }
526
+ }
527
+ }
528
+ server -> client1 {
529
+ "action": "known",
530
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
531
+ "header": true,
532
+ "sessions": {
533
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
534
+ }
535
+ }
536
+ server -> client1 {
537
+ "action": "known",
538
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
539
+ "header": true,
540
+ "sessions": {
541
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
542
+ }
543
+ }
544
+ server -> client2 {
545
+ "action": "known",
546
+ "asDependencyOf": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
547
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
548
+ "header": true,
549
+ "sessions": {
550
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
551
+ }
552
+ }
553
+ server -> client1 {
554
+ "action": "known",
555
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
556
+ "header": true,
557
+ "sessions": {
558
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
559
+ }
560
+ }
561
+ server -> client1 {
562
+ "action": "known",
563
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
564
+ "header": true,
565
+ "sessions": {
566
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 1
567
+ }
568
+ }
569
+ server -> client2 {
570
+ "action": "known",
571
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
572
+ "header": true,
573
+ "sessions": {
574
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 1
575
+ }
576
+ }
577
+ server -> client1 {
578
+ "action": "known",
579
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
580
+ "header": true,
581
+ "sessions": {
582
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 1
583
+ }
584
+ }
585
+ server -> client2 {
586
+ "action": "content",
587
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
588
+ "header": {
589
+ "type": "comap",
590
+ "ruleset": {
591
+ "type": "group",
592
+ "initialAdmin": "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX"
593
+ },
594
+ "meta": null,
595
+ "createdAt": "2024-05-24T19:30:21.180Z",
596
+ "uniqueness": "zzcm4TG1tVTwrtn61"
597
+ },
598
+ "new": {
599
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": {
600
+ "after": 0,
601
+ "newTransactions": [
602
+ {
603
+ "privacy": "trusting",
604
+ "madeAt": 1716579021180,
605
+ "changes": "[{\"key\":\"sealer_z4NA..."
606
+ },
607
+ {
608
+ "privacy": "trusting",
609
+ "madeAt": 1716579021181,
610
+ "changes": "[{\"key\":\"key_zJMVCGS..."
611
+ },
612
+ {
613
+ "privacy": "trusting",
614
+ "madeAt": 1716579021182,
615
+ "changes": "[{\"key\":\"readKey\",\"o..."
616
+ }
617
+ ],
618
+ "lastSignature": "signature_z3Lr7keENMWjQFvpMR1yuKaNt5Q76XjGi567bF8yhdYSoFJ5f8fDX5QMravJRksQtyfmx49DoudkEqUE2d1zJ5JBJ"
619
+ }
620
+ }
621
+ }
622
+ server -> client2 {
623
+ "action": "content",
624
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
625
+ "header": {
626
+ "type": "comap",
627
+ "ruleset": {
628
+ "type": "ownedByGroup",
629
+ "group": "co_zjHc9XYHspsUBgf26A1swwru3Hd"
630
+ },
631
+ "meta": null,
632
+ "createdAt": "2024-05-24T19:30:21.182Z",
633
+ "uniqueness": "z3eYFUjHvk17ZX6X4J"
634
+ },
635
+ "new": {
636
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": {
637
+ "after": 0,
638
+ "newTransactions": [
639
+ {
640
+ "privacy": "trusting",
641
+ "madeAt": 1716579021182,
642
+ "changes": "[{\"key\":\"hello\",\"op\"..."
643
+ }
644
+ ],
645
+ "lastSignature": "signature_z4zH379rhH31DteMH3ebW3mRZekEtbRamxcemG7rytx4FHhxxXbYyvmSs3u84yzH8jyXD6DVtHbg6xZTbJ4VHiRC4"
646
+ }
647
+ }
648
+ }
649
+ client2 -> server {
650
+ "action": "known",
651
+ "id": "co_zjHc9XYHspsUBgf26A1swwru3Hd",
652
+ "header": true,
653
+ "sessions": {
654
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 3
655
+ }
656
+ }
657
+ client2 -> server {
658
+ "action": "known",
659
+ "id": "co_zJgd315B4GVS1WRt7TN4rrLC74w",
660
+ "header": true,
661
+ "sessions": {
662
+ "sealer_z4NASYVjt8s6WvpYXGFJHJUVM1Jw5kh7nxTG937JdYLzy/signer_z3xNi16YWvnondGrjp5TaFZPSEdeow1LEyr3vL2oiewLX_session_zcNZsKNnoDoN": 1
663
+ }
664
+ }
665
+
666
+ stdout | src/tests/sync.test.ts > Can sync a coValue with private transactions through a server to another client
667
+ client1 -> server {
668
+ "action": "load",
669
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
670
+ "header": true,
671
+ "sessions": {
672
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
673
+ }
674
+ }
675
+ client2 -> server {
676
+ "action": "load",
677
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
678
+ "header": false,
679
+ "sessions": {}
680
+ }
681
+ client1 -> server {
682
+ "action": "load",
683
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
684
+ "header": true,
685
+ "sessions": {
686
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 1
687
+ }
688
+ }
689
+ client1 -> server {
690
+ "action": "content",
691
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
692
+ "header": {
693
+ "type": "comap",
694
+ "ruleset": {
695
+ "type": "group",
696
+ "initialAdmin": "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg"
697
+ },
698
+ "meta": null,
699
+ "createdAt": "2024-05-24T19:30:21.188Z",
700
+ "uniqueness": "z2hFfCuaLWx8omqBtC"
701
+ },
702
+ "new": {
703
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": {
704
+ "after": 0,
705
+ "newTransactions": [
706
+ {
707
+ "privacy": "trusting",
708
+ "madeAt": 1716579021188,
709
+ "changes": "[{\"key\":\"sealer_zBLt..."
710
+ },
711
+ {
712
+ "privacy": "trusting",
713
+ "madeAt": 1716579021189,
714
+ "changes": "[{\"key\":\"key_zK1N2yq..."
715
+ },
716
+ {
717
+ "privacy": "trusting",
718
+ "madeAt": 1716579021190,
719
+ "changes": "[{\"key\":\"readKey\",\"o..."
720
+ }
721
+ ],
722
+ "lastSignature": "signature_zydmm8yzA63scBa44SE8tRckRD2rxJTzzJgbGYhuFmvvyzJwNH4ZSftWAhhWjGYCbacjHFMaa3rThFmZjU3pibDn"
723
+ }
724
+ }
725
+ }
726
+ client1 -> server {
727
+ "action": "content",
728
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
729
+ "header": {
730
+ "type": "comap",
731
+ "ruleset": {
732
+ "type": "group",
733
+ "initialAdmin": "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg"
734
+ },
735
+ "meta": null,
736
+ "createdAt": "2024-05-24T19:30:21.188Z",
737
+ "uniqueness": "z2hFfCuaLWx8omqBtC"
738
+ },
739
+ "new": {
740
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": {
741
+ "after": 0,
742
+ "newTransactions": [
743
+ {
744
+ "privacy": "trusting",
745
+ "madeAt": 1716579021188,
746
+ "changes": "[{\"key\":\"sealer_zBLt..."
747
+ },
748
+ {
749
+ "privacy": "trusting",
750
+ "madeAt": 1716579021189,
751
+ "changes": "[{\"key\":\"key_zK1N2yq..."
752
+ },
753
+ {
754
+ "privacy": "trusting",
755
+ "madeAt": 1716579021190,
756
+ "changes": "[{\"key\":\"readKey\",\"o..."
757
+ }
758
+ ],
759
+ "lastSignature": "signature_zydmm8yzA63scBa44SE8tRckRD2rxJTzzJgbGYhuFmvvyzJwNH4ZSftWAhhWjGYCbacjHFMaa3rThFmZjU3pibDn"
760
+ }
761
+ }
762
+ }
763
+ client1 -> server {
764
+ "action": "content",
765
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
766
+ "header": {
767
+ "type": "comap",
768
+ "ruleset": {
769
+ "type": "ownedByGroup",
770
+ "group": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6"
771
+ },
772
+ "meta": null,
773
+ "createdAt": "2024-05-24T19:30:21.190Z",
774
+ "uniqueness": "z3TPKf5SBgvDfF2rwc"
775
+ },
776
+ "new": {
777
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": {
778
+ "after": 0,
779
+ "newTransactions": [
780
+ {
781
+ "privacy": "private",
782
+ "madeAt": 1716579021190,
783
+ "keyUsed": "key_zK1N2yqeC9sNpJqXo",
784
+ "encryptedChanges": "encrypted_U0a4ypmlHJ..."
785
+ }
786
+ ],
787
+ "lastSignature": "signature_z41j4FV4yf2LopguS7dxVd6UfqYAiEAu8uhukLXtg9xFYq867M7jovHfeAikFLAEjVbQnWEXGAXiQG9kX1Lwdxrfu"
788
+ }
789
+ }
790
+ }
791
+ server -> client1 {
792
+ "action": "known",
793
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
794
+ "header": true,
795
+ "sessions": {
796
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
797
+ }
798
+ }
799
+ server -> client1 {
800
+ "action": "known",
801
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
802
+ "header": true,
803
+ "sessions": {
804
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
805
+ }
806
+ }
807
+ server -> client2 {
808
+ "action": "known",
809
+ "asDependencyOf": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
810
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
811
+ "header": true,
812
+ "sessions": {
813
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
814
+ }
815
+ }
816
+ server -> client1 {
817
+ "action": "known",
818
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
819
+ "header": true,
820
+ "sessions": {
821
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
822
+ }
823
+ }
824
+ server -> client1 {
825
+ "action": "known",
826
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
827
+ "header": true,
828
+ "sessions": {
829
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 1
830
+ }
831
+ }
832
+ server -> client2 {
833
+ "action": "known",
834
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
835
+ "header": true,
836
+ "sessions": {
837
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 1
838
+ }
839
+ }
840
+ server -> client1 {
841
+ "action": "known",
842
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
843
+ "header": true,
844
+ "sessions": {
845
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 1
846
+ }
847
+ }
848
+ server -> client2 {
849
+ "action": "content",
850
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
851
+ "header": {
852
+ "type": "comap",
853
+ "ruleset": {
854
+ "type": "group",
855
+ "initialAdmin": "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg"
856
+ },
857
+ "meta": null,
858
+ "createdAt": "2024-05-24T19:30:21.188Z",
859
+ "uniqueness": "z2hFfCuaLWx8omqBtC"
860
+ },
861
+ "new": {
862
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": {
863
+ "after": 0,
864
+ "newTransactions": [
865
+ {
866
+ "privacy": "trusting",
867
+ "madeAt": 1716579021188,
868
+ "changes": "[{\"key\":\"sealer_zBLt..."
869
+ },
870
+ {
871
+ "privacy": "trusting",
872
+ "madeAt": 1716579021189,
873
+ "changes": "[{\"key\":\"key_zK1N2yq..."
874
+ },
875
+ {
876
+ "privacy": "trusting",
877
+ "madeAt": 1716579021190,
878
+ "changes": "[{\"key\":\"readKey\",\"o..."
879
+ }
880
+ ],
881
+ "lastSignature": "signature_zydmm8yzA63scBa44SE8tRckRD2rxJTzzJgbGYhuFmvvyzJwNH4ZSftWAhhWjGYCbacjHFMaa3rThFmZjU3pibDn"
882
+ }
883
+ }
884
+ }
885
+ server -> client2 {
886
+ "action": "content",
887
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
888
+ "header": {
889
+ "type": "comap",
890
+ "ruleset": {
891
+ "type": "ownedByGroup",
892
+ "group": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6"
893
+ },
894
+ "meta": null,
895
+ "createdAt": "2024-05-24T19:30:21.190Z",
896
+ "uniqueness": "z3TPKf5SBgvDfF2rwc"
897
+ },
898
+ "new": {
899
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": {
900
+ "after": 0,
901
+ "newTransactions": [
902
+ {
903
+ "privacy": "private",
904
+ "madeAt": 1716579021190,
905
+ "keyUsed": "key_zK1N2yqeC9sNpJqXo",
906
+ "encryptedChanges": "encrypted_U0a4ypmlHJ..."
907
+ }
908
+ ],
909
+ "lastSignature": "signature_z41j4FV4yf2LopguS7dxVd6UfqYAiEAu8uhukLXtg9xFYq867M7jovHfeAikFLAEjVbQnWEXGAXiQG9kX1Lwdxrfu"
910
+ }
911
+ }
912
+ }
913
+ client2 -> server {
914
+ "action": "known",
915
+ "id": "co_zkeAWzufEysJz6S2Y2K5GDTLjW6",
916
+ "header": true,
917
+ "sessions": {
918
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 3
919
+ }
920
+ }
921
+ client2 -> server {
922
+ "action": "known",
923
+ "id": "co_zdamDrym2XwV56gpxEPdmDpYxhk",
924
+ "header": true,
925
+ "sessions": {
926
+ "sealer_zBLtvDTxsX3n51PLbsAmK9DFHMAh2b6mbigMaj2PjYNxi/signer_zGahnKFBYa2KLPJicua7qyiCB3X2h4oYqvQHdSSYTwCYg_session_z2LMsb13L9MS": 1
927
+ }
928
+ }
929
+
930
+ ✓ src/tests/sync.test.ts (19 tests | 8 skipped) 297ms
931
+ stdout | src/tests/sync.test.ts > If we start loading a coValue before connecting to a peer that has it, it will load it once we connect
932
+ peer2 -> peer1 {
933
+ "action": "load",
934
+ "id": "co_zARzk1qXeWh9HFc38qhqvUmpVLw",
935
+ "header": false,
936
+ "sessions": {}
937
+ }
938
+ peer1 -> peer2 {
939
+ "action": "known",
940
+ "asDependencyOf": "co_zARzk1qXeWh9HFc38qhqvUmpVLw",
941
+ "id": "co_z45JE34FLBkr52MCNapAxENLKDy",
942
+ "header": true,
943
+ "sessions": {
944
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": 3
945
+ }
946
+ }
947
+ peer1 -> peer2 {
948
+ "action": "known",
949
+ "id": "co_zARzk1qXeWh9HFc38qhqvUmpVLw",
950
+ "header": true,
951
+ "sessions": {
952
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": 1
953
+ }
954
+ }
955
+ peer1 -> peer2 {
956
+ "action": "content",
957
+ "id": "co_z45JE34FLBkr52MCNapAxENLKDy",
958
+ "header": {
959
+ "type": "comap",
960
+ "ruleset": {
961
+ "type": "group",
962
+ "initialAdmin": "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT"
963
+ },
964
+ "meta": null,
965
+ "createdAt": "2024-05-24T19:30:21.200Z",
966
+ "uniqueness": "z2wvvgq4cpdbvWhxUt"
967
+ },
968
+ "new": {
969
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": {
970
+ "after": 0,
971
+ "newTransactions": [
972
+ {
973
+ "privacy": "trusting",
974
+ "madeAt": 1716579021201,
975
+ "changes": "[{\"key\":\"sealer_zAsk..."
976
+ },
977
+ {
978
+ "privacy": "trusting",
979
+ "madeAt": 1716579021202,
980
+ "changes": "[{\"key\":\"key_z3Wtyw7..."
981
+ },
982
+ {
983
+ "privacy": "trusting",
984
+ "madeAt": 1716579021202,
985
+ "changes": "[{\"key\":\"readKey\",\"o..."
986
+ }
987
+ ],
988
+ "lastSignature": "signature_z5a9gHZTJcSB9qPwzYgv6uzvCQxZBrz1FyXVE4uTnReifpYXHUNe2RTdNfuN9BCH4ndJJ1uEKtZoBaYbQrmuDsbS4"
989
+ }
990
+ }
991
+ }
992
+ peer1 -> peer2 {
993
+ "action": "content",
994
+ "id": "co_zARzk1qXeWh9HFc38qhqvUmpVLw",
995
+ "header": {
996
+ "type": "comap",
997
+ "ruleset": {
998
+ "type": "ownedByGroup",
999
+ "group": "co_z45JE34FLBkr52MCNapAxENLKDy"
1000
+ },
1001
+ "meta": null,
1002
+ "createdAt": "2024-05-24T19:30:21.203Z",
1003
+ "uniqueness": "z57JVabgWzdf4kBYLq"
1004
+ },
1005
+ "new": {
1006
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": {
1007
+ "after": 0,
1008
+ "newTransactions": [
1009
+ {
1010
+ "privacy": "trusting",
1011
+ "madeAt": 1716579021203,
1012
+ "changes": "[{\"key\":\"hello\",\"op\"..."
1013
+ }
1014
+ ],
1015
+ "lastSignature": "signature_z2w8MivT9woude1fTnMQSX1QtUEGAFExWGEbcqK6dv22Q2kVranSq94ghkLers3Pr1kNLGAjTDkCUDFnqnUACG7Kq"
1016
+ }
1017
+ }
1018
+ }
1019
+ peer2 -> peer1 {
1020
+ "action": "known",
1021
+ "id": "co_z45JE34FLBkr52MCNapAxENLKDy",
1022
+ "header": true,
1023
+ "sessions": {
1024
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": 3
1025
+ }
1026
+ }
1027
+ peer2 -> peer1 {
1028
+ "action": "known",
1029
+ "id": "co_zARzk1qXeWh9HFc38qhqvUmpVLw",
1030
+ "header": true,
1031
+ "sessions": {
1032
+ "sealer_zAskmSAioyvz64myv5KowK1TeNvEhGUT9wAKWCGF1KbWM/signer_z4DYBiohcbmzNhBc912a7zdji3shKiKx1jnDLVxJeLCqT_session_zMERPjup4L5k": 1
1033
+ }
1034
+ }
1035
+
1036
+ ✓ src/tests/coList.test.ts (4 tests) 13ms
1037
+ ✓ src/tests/coStream.test.ts (6 tests) 50ms
1038
+ ✓ src/tests/group.test.ts (4 tests) 57ms
1039
+ ✓ src/tests/coMap.test.ts (5 tests) 65ms
1040
+ stderr | src/tests/permissions.test.ts > Admins can't demote other admins in a group
1041
+ Admins can only demote themselves.
1042
+ Admins can only demote themselves.
1043
+ Admins can only demote themselves.
1044
+ Admins can only demote themselves.
1045
+ Admins can only demote themselves.
1046
+
1047
+ stderr | src/tests/permissions.test.ts > Admins can't demote other admins in a group (high level)
1048
+ Admins can only demote themselves.
1049
+
1050
+ stderr | src/tests/permissions.test.ts > Admins an add writers to a group, who can't add admins, writers, or readers
1051
+ Group transaction must be made by current admin or invite
1052
+ Group transaction must be made by current admin or invite
1053
+ Group transaction must be made by current admin or invite
1054
+ Group transaction must be made by current admin or invite
1055
+ Group transaction must be made by current admin or invite
1056
+ Group transaction must be made by current admin or invite
1057
+
1058
+ stderr | src/tests/permissions.test.ts > Admins an add writers to a group, who can't add admins, writers, or readers (high level)
1059
+ Group transaction must be made by current admin or invite
1060
+ Group transaction must be made by current admin or invite
1061
+ Group transaction must be made by current admin or invite
1062
+ Group transaction must be made by current admin or invite
1063
+ Group transaction must be made by current admin or invite
1064
+ Group transaction must be made by current admin or invite
1065
+ Group transaction must be made by current admin or invite
1066
+ Group transaction must be made by current admin or invite
1067
+ Group transaction must be made by current admin or invite
1068
+
1069
+ stderr | src/tests/permissions.test.ts > Admins can add readers to a group, who can't add admins, writers, or readers
1070
+ Group transaction must be made by current admin or invite
1071
+ Group transaction must be made by current admin or invite
1072
+ Group transaction must be made by current admin or invite
1073
+ Group transaction must be made by current admin or invite
1074
+ Group transaction must be made by current admin or invite
1075
+ Group transaction must be made by current admin or invite
1076
+
1077
+ stderr | src/tests/permissions.test.ts > Admins can add readers to a group, who can't add admins, writers, or readers (high level)
1078
+ Group transaction must be made by current admin or invite
1079
+ Group transaction must be made by current admin or invite
1080
+ Group transaction must be made by current admin or invite
1081
+ Group transaction must be made by current admin or invite
1082
+ Group transaction must be made by current admin or invite
1083
+ Group transaction must be made by current admin or invite
1084
+ Group transaction must be made by current admin or invite
1085
+ Group transaction must be made by current admin or invite
1086
+ Group transaction must be made by current admin or invite
1087
+
1088
+ stderr | src/tests/permissions.test.ts > WriterInvites can not invite admins
1089
+ WriterInvites can only create writers.
1090
+
1091
+ stderr | src/tests/permissions.test.ts > ReaderInvites can not invite admins
1092
+ ReaderInvites can only create reader.
1093
+
1094
+ stderr | src/tests/permissions.test.ts > ReaderInvites can not invite writers
1095
+ ReaderInvites can only create reader.
1096
+
1097
+ stdout | src/tests/permissions.test.ts > Can give write permissions to 'everyone' (high-level)
1098
+ Before anon set
1099
+
1100
+ ✓ src/tests/permissions.test.ts (44 tests) 536ms
1101
+
1102
+ Test Files 11 passed (11)
1103
+ Tests 112 passed | 5 skipped | 3 todo (120)
1104
+ Start at 20:30:20
1105
+ Duration 1.41s (transform 734ms, setup 0ms, collect 4.41s, tests 1.47s, environment 1ms, prepare 966ms)
1106
+