@secrecy/lib 1.7.0-integration-mixed-feats.3 → 1.7.0-integration-trpc-client.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 (273) hide show
  1. package/dist/lib/base-client.js +85 -0
  2. package/dist/lib/cache.js +4 -0
  3. package/dist/lib/client/SecrecyAppClient.js +81 -0
  4. package/dist/lib/client/SecrecyCloudClient.js +475 -0
  5. package/dist/lib/client/SecrecyDbClient.js +46 -0
  6. package/dist/lib/client/SecrecyMailClient.js +283 -0
  7. package/dist/lib/client/SecrecyPayClient.js +34 -0
  8. package/dist/lib/client/SecrecyWalletClient.js +50 -0
  9. package/dist/lib/client/convert/file.js +29 -0
  10. package/dist/lib/client/convert/mail.js +42 -0
  11. package/dist/lib/client/convert/node.js +98 -0
  12. package/dist/lib/client/helpers.js +107 -0
  13. package/dist/lib/client/index.js +43 -0
  14. package/dist/lib/client/storage.js +7 -0
  15. package/dist/lib/client/types/file.js +1 -0
  16. package/dist/lib/client/types/index.js +19 -0
  17. package/dist/lib/client/types/mail.js +1 -0
  18. package/dist/lib/client/types/node.js +1 -0
  19. package/dist/lib/client/types/user.js +1 -0
  20. package/dist/lib/client.js +38 -0
  21. package/dist/lib/crypto/file.js +184 -0
  22. package/dist/lib/crypto/index.js +41 -0
  23. package/dist/lib/error/client.js +10 -0
  24. package/dist/lib/error/index.js +10 -0
  25. package/dist/lib/error/server.js +27 -0
  26. package/dist/lib/index.js +10 -0
  27. package/dist/lib/minify/index.js +23 -0
  28. package/dist/lib/minify/lz4.js +517 -0
  29. package/dist/lib/sodium.js +5 -0
  30. package/dist/lib/types.js +1 -0
  31. package/dist/lib/utils/array.js +25 -0
  32. package/dist/lib/utils/base64.js +2 -0
  33. package/dist/lib/utils/popup-tools.js +180 -0
  34. package/dist/lib/utils/promise.js +20 -0
  35. package/dist/lib/utils/store-buddy.js +60 -0
  36. package/dist/lib/utils/time.js +13 -0
  37. package/dist/lib/worker/md5.js +18 -0
  38. package/dist/lib/worker/sodium.js +95 -0
  39. package/dist/{worker → lib/worker}/workerCodes.js +4 -4
  40. package/dist/types/base-client.d.ts +29 -0
  41. package/dist/types/cache.d.ts +9 -0
  42. package/dist/types/client/SecrecyAppClient.d.ts +18 -0
  43. package/dist/types/client/SecrecyCloudClient.d.ts +88 -0
  44. package/dist/types/client/SecrecyDbClient.d.ts +30 -0
  45. package/dist/types/client/SecrecyMailClient.d.ts +42 -0
  46. package/dist/types/client/SecrecyPayClient.d.ts +27 -0
  47. package/dist/types/client/SecrecyWalletClient.d.ts +27 -0
  48. package/dist/types/client/convert/file.d.ts +4 -0
  49. package/dist/types/client/convert/mail.d.ts +8 -0
  50. package/dist/types/client/convert/node.d.ts +7 -0
  51. package/dist/types/client/helpers.d.ts +25 -0
  52. package/dist/types/client/index.d.ts +25 -0
  53. package/dist/types/client/storage.d.ts +7 -0
  54. package/dist/types/client/types/file.d.ts +6 -0
  55. package/dist/types/client/types/index.d.ts +45 -0
  56. package/dist/types/client/types/mail.d.ts +87 -0
  57. package/dist/types/client/types/node.d.ts +51 -0
  58. package/dist/types/client/types/user.d.ts +3 -0
  59. package/dist/types/client.d.ts +9149 -0
  60. package/dist/types/crypto/file.d.ts +14 -0
  61. package/dist/types/crypto/index.d.ts +9 -0
  62. package/dist/types/error/client.d.ts +22 -0
  63. package/dist/types/error/index.d.ts +40 -0
  64. package/dist/types/error/server.d.ts +26 -0
  65. package/dist/types/index.d.ts +12 -0
  66. package/dist/types/minify/index.d.ts +2 -0
  67. package/dist/types/minify/lz4.d.ts +35 -0
  68. package/dist/types/sodium.d.ts +3 -0
  69. package/dist/types/types.d.ts +10 -0
  70. package/dist/types/utils/array.d.ts +3 -0
  71. package/dist/types/utils/base64.d.ts +1 -0
  72. package/dist/types/utils/popup-tools.d.ts +52 -0
  73. package/dist/types/utils/promise.d.ts +1 -0
  74. package/dist/types/utils/store-buddy.d.ts +130 -0
  75. package/dist/{utils → types/utils}/time.d.ts +2 -4
  76. package/dist/types/worker/md5.d.ts +1 -0
  77. package/dist/types/worker/sodium.d.ts +3 -0
  78. package/dist/types/worker/workerCodes.d.ts +2 -0
  79. package/package.json +48 -73
  80. package/dist/BaseClient-2af8a400.d.ts +0 -405
  81. package/dist/BaseClient.cjs +0 -2
  82. package/dist/BaseClient.cjs.map +0 -1
  83. package/dist/BaseClient.d.ts +0 -16
  84. package/dist/BaseClient.js +0 -2
  85. package/dist/BaseClient.js.map +0 -1
  86. package/dist/PopupTools.cjs +0 -2
  87. package/dist/PopupTools.cjs.map +0 -1
  88. package/dist/PopupTools.d.ts +0 -18
  89. package/dist/PopupTools.js +0 -2
  90. package/dist/PopupTools.js.map +0 -1
  91. package/dist/ZeusThunder.cjs +0 -2
  92. package/dist/ZeusThunder.cjs.map +0 -1
  93. package/dist/ZeusThunder.d.ts +0 -6
  94. package/dist/ZeusThunder.js +0 -2
  95. package/dist/ZeusThunder.js.map +0 -1
  96. package/dist/cache.cjs +0 -2
  97. package/dist/cache.cjs.map +0 -1
  98. package/dist/cache.d.ts +0 -24
  99. package/dist/cache.js +0 -2
  100. package/dist/cache.js.map +0 -1
  101. package/dist/client/SecrecyAppClient.cjs +0 -2
  102. package/dist/client/SecrecyAppClient.cjs.map +0 -1
  103. package/dist/client/SecrecyAppClient.d.ts +0 -16
  104. package/dist/client/SecrecyAppClient.js +0 -2
  105. package/dist/client/SecrecyAppClient.js.map +0 -1
  106. package/dist/client/SecrecyCloudClient.cjs +0 -2
  107. package/dist/client/SecrecyCloudClient.cjs.map +0 -1
  108. package/dist/client/SecrecyCloudClient.d.ts +0 -16
  109. package/dist/client/SecrecyCloudClient.js +0 -2
  110. package/dist/client/SecrecyCloudClient.js.map +0 -1
  111. package/dist/client/SecrecyDbClient.cjs +0 -2
  112. package/dist/client/SecrecyDbClient.cjs.map +0 -1
  113. package/dist/client/SecrecyDbClient.d.ts +0 -16
  114. package/dist/client/SecrecyDbClient.js +0 -2
  115. package/dist/client/SecrecyDbClient.js.map +0 -1
  116. package/dist/client/SecrecyMailClient.cjs +0 -2
  117. package/dist/client/SecrecyMailClient.cjs.map +0 -1
  118. package/dist/client/SecrecyMailClient.d.ts +0 -16
  119. package/dist/client/SecrecyMailClient.js +0 -2
  120. package/dist/client/SecrecyMailClient.js.map +0 -1
  121. package/dist/client/SecrecyPayClient.cjs +0 -2
  122. package/dist/client/SecrecyPayClient.cjs.map +0 -1
  123. package/dist/client/SecrecyPayClient.d.ts +0 -16
  124. package/dist/client/SecrecyPayClient.js +0 -2
  125. package/dist/client/SecrecyPayClient.js.map +0 -1
  126. package/dist/client/SecrecyWalletClient.cjs +0 -2
  127. package/dist/client/SecrecyWalletClient.cjs.map +0 -1
  128. package/dist/client/SecrecyWalletClient.d.ts +0 -16
  129. package/dist/client/SecrecyWalletClient.js +0 -2
  130. package/dist/client/SecrecyWalletClient.js.map +0 -1
  131. package/dist/client/convert/file.cjs +0 -2
  132. package/dist/client/convert/file.cjs.map +0 -1
  133. package/dist/client/convert/file.d.ts +0 -11
  134. package/dist/client/convert/file.js +0 -2
  135. package/dist/client/convert/file.js.map +0 -1
  136. package/dist/client/convert/mail.cjs +0 -2
  137. package/dist/client/convert/mail.cjs.map +0 -1
  138. package/dist/client/convert/mail.d.ts +0 -13
  139. package/dist/client/convert/mail.js +0 -2
  140. package/dist/client/convert/mail.js.map +0 -1
  141. package/dist/client/convert/node.cjs +0 -2
  142. package/dist/client/convert/node.cjs.map +0 -1
  143. package/dist/client/convert/node.d.ts +0 -18
  144. package/dist/client/convert/node.js +0 -2
  145. package/dist/client/convert/node.js.map +0 -1
  146. package/dist/client/helpers.cjs +0 -2
  147. package/dist/client/helpers.cjs.map +0 -1
  148. package/dist/client/helpers.d.ts +0 -16
  149. package/dist/client/helpers.js +0 -2
  150. package/dist/client/helpers.js.map +0 -1
  151. package/dist/client/index.cjs +0 -2
  152. package/dist/client/index.cjs.map +0 -1
  153. package/dist/client/index.d.ts +0 -16
  154. package/dist/client/index.js +0 -2
  155. package/dist/client/index.js.map +0 -1
  156. package/dist/client/storage.cjs +0 -2
  157. package/dist/client/storage.cjs.map +0 -1
  158. package/dist/client/storage.d.ts +0 -10
  159. package/dist/client/storage.js +0 -2
  160. package/dist/client/storage.js.map +0 -1
  161. package/dist/client/types/File.cjs +0 -1
  162. package/dist/client/types/File.cjs.map +0 -1
  163. package/dist/client/types/File.d.ts +0 -18
  164. package/dist/client/types/File.js +0 -1
  165. package/dist/client/types/File.js.map +0 -1
  166. package/dist/client/types/Inputs.cjs +0 -1
  167. package/dist/client/types/Inputs.cjs.map +0 -1
  168. package/dist/client/types/Inputs.d.ts +0 -18
  169. package/dist/client/types/Inputs.js +0 -1
  170. package/dist/client/types/Inputs.js.map +0 -1
  171. package/dist/client/types/Node.cjs +0 -1
  172. package/dist/client/types/Node.cjs.map +0 -1
  173. package/dist/client/types/Node.d.ts +0 -9
  174. package/dist/client/types/Node.js +0 -1
  175. package/dist/client/types/Node.js.map +0 -1
  176. package/dist/client/types/UserAppNotifications.cjs +0 -1
  177. package/dist/client/types/UserAppNotifications.cjs.map +0 -1
  178. package/dist/client/types/UserAppNotifications.d.ts +0 -8
  179. package/dist/client/types/UserAppNotifications.js +0 -1
  180. package/dist/client/types/UserAppNotifications.js.map +0 -1
  181. package/dist/client/types/UserAppSettings.cjs +0 -1
  182. package/dist/client/types/UserAppSettings.cjs.map +0 -1
  183. package/dist/client/types/UserAppSettings.d.ts +0 -7
  184. package/dist/client/types/UserAppSettings.js +0 -1
  185. package/dist/client/types/UserAppSettings.js.map +0 -1
  186. package/dist/client/types/index.cjs +0 -2
  187. package/dist/client/types/index.cjs.map +0 -1
  188. package/dist/client/types/index.d.ts +0 -176
  189. package/dist/client/types/index.js +0 -2
  190. package/dist/client/types/index.js.map +0 -1
  191. package/dist/client/types/selectors.cjs +0 -2
  192. package/dist/client/types/selectors.cjs.map +0 -1
  193. package/dist/client/types/selectors.d.ts +0 -402
  194. package/dist/client/types/selectors.js +0 -2
  195. package/dist/client/types/selectors.js.map +0 -1
  196. package/dist/crypto/file.cjs +0 -2
  197. package/dist/crypto/file.cjs.map +0 -1
  198. package/dist/crypto/file.d.ts +0 -16
  199. package/dist/crypto/file.js +0 -2
  200. package/dist/crypto/file.js.map +0 -1
  201. package/dist/crypto/index.cjs +0 -2
  202. package/dist/crypto/index.cjs.map +0 -1
  203. package/dist/crypto/index.d.ts +0 -14
  204. package/dist/crypto/index.js +0 -2
  205. package/dist/crypto/index.js.map +0 -1
  206. package/dist/error.cjs +0 -1
  207. package/dist/error.cjs.map +0 -1
  208. package/dist/error.d.ts +0 -38
  209. package/dist/error.js +0 -1
  210. package/dist/error.js.map +0 -1
  211. package/dist/index.cjs +0 -2
  212. package/dist/index.cjs.map +0 -1
  213. package/dist/index.d.ts +0 -19
  214. package/dist/index.js +0 -2
  215. package/dist/index.js.map +0 -1
  216. package/dist/minify/index.cjs +0 -2
  217. package/dist/minify/index.cjs.map +0 -1
  218. package/dist/minify/index.d.ts +0 -4
  219. package/dist/minify/index.js +0 -2
  220. package/dist/minify/index.js.map +0 -1
  221. package/dist/minify/lz4.cjs +0 -3
  222. package/dist/minify/lz4.cjs.map +0 -1
  223. package/dist/minify/lz4.d.ts +0 -7
  224. package/dist/minify/lz4.js +0 -3
  225. package/dist/minify/lz4.js.map +0 -1
  226. package/dist/sodium.cjs +0 -2
  227. package/dist/sodium.cjs.map +0 -1
  228. package/dist/sodium.d.ts +0 -5
  229. package/dist/sodium.js +0 -2
  230. package/dist/sodium.js.map +0 -1
  231. package/dist/utils/encoders.cjs +0 -2
  232. package/dist/utils/encoders.cjs.map +0 -1
  233. package/dist/utils/encoders.d.ts +0 -28
  234. package/dist/utils/encoders.js +0 -2
  235. package/dist/utils/encoders.js.map +0 -1
  236. package/dist/utils/store-buddy.cjs +0 -2
  237. package/dist/utils/store-buddy.cjs.map +0 -1
  238. package/dist/utils/store-buddy.d.ts +0 -15
  239. package/dist/utils/store-buddy.js +0 -2
  240. package/dist/utils/store-buddy.js.map +0 -1
  241. package/dist/utils/time.cjs +0 -2
  242. package/dist/utils/time.cjs.map +0 -1
  243. package/dist/utils/time.js +0 -2
  244. package/dist/utils/time.js.map +0 -1
  245. package/dist/utils/utils.cjs +0 -2
  246. package/dist/utils/utils.cjs.map +0 -1
  247. package/dist/utils/utils.d.ts +0 -6
  248. package/dist/utils/utils.js +0 -2
  249. package/dist/utils/utils.js.map +0 -1
  250. package/dist/worker/md5.cjs +0 -2
  251. package/dist/worker/md5.cjs.map +0 -1
  252. package/dist/worker/md5.d.ts +0 -3
  253. package/dist/worker/md5.js +0 -2
  254. package/dist/worker/md5.js.map +0 -1
  255. package/dist/worker/sodium.cjs +0 -2
  256. package/dist/worker/sodium.cjs.map +0 -1
  257. package/dist/worker/sodium.d.ts +0 -6
  258. package/dist/worker/sodium.js +0 -2
  259. package/dist/worker/sodium.js.map +0 -1
  260. package/dist/worker/workerCodes.cjs +0 -254
  261. package/dist/worker/workerCodes.cjs.map +0 -1
  262. package/dist/worker/workerCodes.d.ts +0 -4
  263. package/dist/worker/workerCodes.js.map +0 -1
  264. package/dist/zeus/const.cjs +0 -2
  265. package/dist/zeus/const.cjs.map +0 -1
  266. package/dist/zeus/const.d.ts +0 -9
  267. package/dist/zeus/const.js +0 -2
  268. package/dist/zeus/const.js.map +0 -1
  269. package/dist/zeus/index.cjs +0 -5
  270. package/dist/zeus/index.cjs.map +0 -1
  271. package/dist/zeus/index.d.ts +0 -9428
  272. package/dist/zeus/index.js +0 -5
  273. package/dist/zeus/index.js.map +0 -1
@@ -1,402 +0,0 @@
1
- declare const fileSelector: {
2
- id: true;
3
- size: true;
4
- sizeBefore: true;
5
- createdAt: true;
6
- md5: true;
7
- md5Encrypted: true;
8
- access: {
9
- key: true;
10
- sharedBy: {
11
- keyPair: {
12
- pub: true;
13
- };
14
- };
15
- };
16
- };
17
- declare const userSelector: {
18
- id: true;
19
- firstname: true;
20
- lastname: true;
21
- email: true;
22
- publicKey: true;
23
- };
24
- declare const nodeSelector: {
25
- id: true;
26
- isFavorite: true;
27
- type: true;
28
- createdAt: true;
29
- deletedAt: true;
30
- createdBy: {
31
- user: {
32
- id: true;
33
- firstname: true;
34
- lastname: true;
35
- email: true;
36
- publicKey: true;
37
- };
38
- };
39
- sizes: {
40
- size: true;
41
- sizeBefore: true;
42
- };
43
- updatedAt: true;
44
- name: true;
45
- access: {
46
- rights: true;
47
- isRoot: true;
48
- nameKey: true;
49
- sharedBy: {
50
- keyPair: {
51
- pub: true;
52
- };
53
- };
54
- userApp: {
55
- user: {
56
- id: true;
57
- firstname: true;
58
- lastname: true;
59
- email: true;
60
- publicKey: true;
61
- };
62
- };
63
- };
64
- accesses: {
65
- rights: true;
66
- isRoot: true;
67
- nameKey: true;
68
- sharedBy: {
69
- keyPair: {
70
- pub: true;
71
- };
72
- };
73
- userApp: {
74
- user: {
75
- id: true;
76
- firstname: true;
77
- lastname: true;
78
- email: true;
79
- publicKey: true;
80
- };
81
- };
82
- };
83
- breadcrumb: {
84
- id: true;
85
- name: true;
86
- nameKey: true;
87
- pubKey: true;
88
- };
89
- parentId: true;
90
- currentFileId: true;
91
- };
92
- declare const nodeFullSelector: {
93
- parent: {
94
- id: true;
95
- isFavorite: true;
96
- type: true;
97
- createdAt: true;
98
- deletedAt: true;
99
- createdBy: {
100
- user: {
101
- id: true;
102
- firstname: true;
103
- lastname: true;
104
- email: true;
105
- publicKey: true;
106
- };
107
- };
108
- sizes: {
109
- size: true;
110
- sizeBefore: true;
111
- };
112
- updatedAt: true;
113
- name: true;
114
- access: {
115
- rights: true;
116
- isRoot: true;
117
- nameKey: true;
118
- sharedBy: {
119
- keyPair: {
120
- pub: true;
121
- };
122
- };
123
- userApp: {
124
- user: {
125
- id: true;
126
- firstname: true;
127
- lastname: true;
128
- email: true;
129
- publicKey: true;
130
- };
131
- };
132
- };
133
- accesses: {
134
- rights: true;
135
- isRoot: true;
136
- nameKey: true;
137
- sharedBy: {
138
- keyPair: {
139
- pub: true;
140
- };
141
- };
142
- userApp: {
143
- user: {
144
- id: true;
145
- firstname: true;
146
- lastname: true;
147
- email: true;
148
- publicKey: true;
149
- };
150
- };
151
- };
152
- breadcrumb: {
153
- id: true;
154
- name: true;
155
- nameKey: true;
156
- pubKey: true;
157
- };
158
- parentId: true;
159
- currentFileId: true;
160
- };
161
- children: {
162
- id: true;
163
- isFavorite: true;
164
- type: true;
165
- createdAt: true;
166
- deletedAt: true;
167
- createdBy: {
168
- user: {
169
- id: true;
170
- firstname: true;
171
- lastname: true;
172
- email: true;
173
- publicKey: true;
174
- };
175
- };
176
- sizes: {
177
- size: true;
178
- sizeBefore: true;
179
- };
180
- updatedAt: true;
181
- name: true;
182
- access: {
183
- rights: true;
184
- isRoot: true;
185
- nameKey: true;
186
- sharedBy: {
187
- keyPair: {
188
- pub: true;
189
- };
190
- };
191
- userApp: {
192
- user: {
193
- id: true;
194
- firstname: true;
195
- lastname: true;
196
- email: true;
197
- publicKey: true;
198
- };
199
- };
200
- };
201
- accesses: {
202
- rights: true;
203
- isRoot: true;
204
- nameKey: true;
205
- sharedBy: {
206
- keyPair: {
207
- pub: true;
208
- };
209
- };
210
- userApp: {
211
- user: {
212
- id: true;
213
- firstname: true;
214
- lastname: true;
215
- email: true;
216
- publicKey: true;
217
- };
218
- };
219
- };
220
- breadcrumb: {
221
- id: true;
222
- name: true;
223
- nameKey: true;
224
- pubKey: true;
225
- };
226
- parentId: true;
227
- currentFileId: true;
228
- };
229
- history: {
230
- id: true;
231
- size: true;
232
- sizeBefore: true;
233
- createdAt: true;
234
- md5: true;
235
- md5Encrypted: true;
236
- access: {
237
- key: true;
238
- sharedBy: {
239
- keyPair: {
240
- pub: true;
241
- };
242
- };
243
- };
244
- };
245
- current: {
246
- id: true;
247
- size: true;
248
- sizeBefore: true;
249
- createdAt: true;
250
- md5: true;
251
- md5Encrypted: true;
252
- access: {
253
- key: true;
254
- sharedBy: {
255
- keyPair: {
256
- pub: true;
257
- };
258
- };
259
- };
260
- };
261
- id: true;
262
- isFavorite: true;
263
- type: true;
264
- createdAt: true;
265
- deletedAt: true;
266
- createdBy: {
267
- user: {
268
- id: true;
269
- firstname: true;
270
- lastname: true;
271
- email: true;
272
- publicKey: true;
273
- };
274
- };
275
- sizes: {
276
- size: true;
277
- sizeBefore: true;
278
- };
279
- updatedAt: true;
280
- name: true;
281
- access: {
282
- rights: true;
283
- isRoot: true;
284
- nameKey: true;
285
- sharedBy: {
286
- keyPair: {
287
- pub: true;
288
- };
289
- };
290
- userApp: {
291
- user: {
292
- id: true;
293
- firstname: true;
294
- lastname: true;
295
- email: true;
296
- publicKey: true;
297
- };
298
- };
299
- };
300
- accesses: {
301
- rights: true;
302
- isRoot: true;
303
- nameKey: true;
304
- sharedBy: {
305
- keyPair: {
306
- pub: true;
307
- };
308
- };
309
- userApp: {
310
- user: {
311
- id: true;
312
- firstname: true;
313
- lastname: true;
314
- email: true;
315
- publicKey: true;
316
- };
317
- };
318
- };
319
- breadcrumb: {
320
- id: true;
321
- name: true;
322
- nameKey: true;
323
- pubKey: true;
324
- };
325
- parentId: true;
326
- currentFileId: true;
327
- };
328
- declare const mailSelector: {
329
- id: true;
330
- type: true;
331
- body: true;
332
- subject: true;
333
- openedAt: true;
334
- createdAt: true;
335
- deletedAt: true;
336
- recipients: {
337
- publicKey: false;
338
- id: true;
339
- firstname: true;
340
- lastname: true;
341
- email: true;
342
- };
343
- recipient: {
344
- publicKey: false;
345
- id: true;
346
- firstname: true;
347
- lastname: true;
348
- email: true;
349
- };
350
- sender: {
351
- id: true;
352
- firstname: true;
353
- lastname: true;
354
- email: true;
355
- publicKey: true;
356
- };
357
- mailIntegrity: {
358
- id: true;
359
- hash: true;
360
- hashKey: true;
361
- replyTo: {
362
- id: true;
363
- };
364
- temporaryRecipients: {
365
- email: true;
366
- };
367
- recipients: {
368
- publicKey: false;
369
- id: true;
370
- firstname: true;
371
- lastname: true;
372
- email: true;
373
- };
374
- };
375
- mailIntegrityDraft: {
376
- id: true;
377
- hash: true;
378
- hashKey: true;
379
- replyTo: {
380
- id: true;
381
- };
382
- temporaryRecipients: {
383
- email: true;
384
- };
385
- recipients: {
386
- publicKey: false;
387
- id: true;
388
- firstname: true;
389
- lastname: true;
390
- email: true;
391
- };
392
- };
393
- files: {
394
- fileKey: true;
395
- filename: true;
396
- file: {
397
- id: true;
398
- };
399
- };
400
- };
401
-
402
- export { fileSelector, mailSelector, nodeFullSelector, nodeSelector, userSelector };
@@ -1,2 +0,0 @@
1
- import{Selector as r}from"../../zeus/index.js";const u=r("File")({id:!0,size:!0,sizeBefore:!0,createdAt:!0,md5:!0,md5Encrypted:!0,access:{key:!0,sharedBy:{keyPair:{pub:!0}}}}),e=r("User")({id:!0,firstname:!0,lastname:!0,email:!0,publicKey:!0}),t=r("Node")({id:!0,isFavorite:!0,type:!0,createdAt:!0,deletedAt:!0,createdBy:{user:e},sizes:{size:!0,sizeBefore:!0},updatedAt:!0,name:!0,access:{rights:!0,isRoot:!0,nameKey:!0,sharedBy:{keyPair:{pub:!0}},userApp:{user:e}},accesses:{rights:!0,isRoot:!0,nameKey:!0,sharedBy:{keyPair:{pub:!0}},userApp:{user:e}},breadcrumb:{id:!0,name:!0,nameKey:!0,pubKey:!0},parentId:!0,currentFileId:!0}),s=r("Node")({...t,parent:t,children:t,history:u,current:u}),a=r("Mail")({id:!0,type:!0,body:!0,subject:!0,openedAt:!0,createdAt:!0,deletedAt:!0,recipients:{...e,publicKey:!1},recipient:{...e,publicKey:!1},sender:e,mailIntegrity:{id:!0,hash:!0,hashKey:!0,replyTo:{id:!0},temporaryRecipients:{email:!0},recipients:{...e,publicKey:!1}},mailIntegrityDraft:{id:!0,hash:!0,hashKey:!0,replyTo:{id:!0},temporaryRecipients:{email:!0},recipients:{...e,publicKey:!1}},files:{fileKey:!0,filename:!0,file:{id:!0}}});export{u as fileSelector,a as mailSelector,s as nodeFullSelector,t as nodeSelector,e as userSelector};
2
- //# sourceMappingURL=selectors.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/client/types/selectors.ts"],"sourcesContent":["import { Selector } from \"../../zeus/index.js\";\n\nexport const fileSelector = Selector(\"File\")({\n id: true,\n size: true,\n sizeBefore: true,\n createdAt: true,\n md5: true,\n md5Encrypted: true,\n access: {\n key: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n }\n }\n});\n\nexport const userSelector = Selector(\"User\")({\n id: true,\n firstname: true,\n lastname: true,\n email: true,\n publicKey: true\n});\n\nexport const nodeSelector = Selector(\"Node\")({\n id: true,\n isFavorite: true,\n type: true,\n createdAt: true,\n deletedAt: true,\n createdBy: {\n user: userSelector\n },\n sizes: {\n size: true,\n sizeBefore: true\n },\n updatedAt: true,\n name: true,\n access: {\n rights: true,\n isRoot: true,\n nameKey: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n },\n userApp: {\n user: userSelector\n }\n },\n accesses: {\n rights: true,\n isRoot: true,\n nameKey: true,\n sharedBy: {\n keyPair: {\n pub: true\n }\n },\n userApp: {\n user: userSelector\n }\n },\n breadcrumb: {\n id: true,\n name: true,\n nameKey: true,\n pubKey: true\n },\n parentId: true,\n currentFileId: true\n});\n\nexport const nodeFullSelector = Selector(\"Node\")({\n ...nodeSelector,\n parent: nodeSelector,\n children: nodeSelector,\n history: fileSelector,\n current: fileSelector\n});\n\nexport const mailSelector = Selector(\"Mail\")({\n id: true,\n type: true,\n body: true,\n subject: true,\n openedAt: true,\n createdAt: true,\n deletedAt: true,\n recipients: {\n ...userSelector,\n publicKey: false\n },\n recipient: {\n ...userSelector,\n publicKey: false\n },\n sender: userSelector,\n mailIntegrity: {\n id: true,\n hash: true,\n hashKey: true,\n replyTo: {\n id: true\n },\n temporaryRecipients: {\n email: true\n },\n recipients: {\n ...userSelector,\n publicKey: false\n }\n },\n mailIntegrityDraft: {\n id: true,\n hash: true,\n hashKey: true,\n replyTo: {\n id: true\n },\n temporaryRecipients: {\n email: true\n },\n recipients: {\n ...userSelector,\n publicKey: false\n }\n },\n files: {\n fileKey: true,\n filename: true,\n file: {\n id: true\n }\n }\n});\n"],"mappings":"AAAA,OAAS,YAAAA,MAAgB,sBAElB,MAAMC,EAAeD,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,KAAM,GACN,WAAY,GACZ,UAAW,GACX,IAAK,GACL,aAAc,GACd,OAAQ,CACN,IAAK,GACL,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,CACF,CACF,CAAC,EAEYE,EAAeF,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,UAAW,GACX,SAAU,GACV,MAAO,GACP,UAAW,EACb,CAAC,EAEYG,EAAeH,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,WAAY,GACZ,KAAM,GACN,UAAW,GACX,UAAW,GACX,UAAW,CACT,KAAME,CACR,EACA,MAAO,CACL,KAAM,GACN,WAAY,EACd,EACA,UAAW,GACX,KAAM,GACN,OAAQ,CACN,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,EACA,QAAS,CACP,KAAMA,CACR,CACF,EACA,SAAU,CACR,OAAQ,GACR,OAAQ,GACR,QAAS,GACT,SAAU,CACR,QAAS,CACP,IAAK,EACP,CACF,EACA,QAAS,CACP,KAAMA,CACR,CACF,EACA,WAAY,CACV,GAAI,GACJ,KAAM,GACN,QAAS,GACT,OAAQ,EACV,EACA,SAAU,GACV,cAAe,EACjB,CAAC,EAEYE,EAAmBJ,EAAS,MAAM,EAAE,CAC/C,GAAGG,EACH,OAAQA,EACR,SAAUA,EACV,QAASF,EACT,QAASA,CACX,CAAC,EAEYI,EAAeL,EAAS,MAAM,EAAE,CAC3C,GAAI,GACJ,KAAM,GACN,KAAM,GACN,QAAS,GACT,SAAU,GACV,UAAW,GACX,UAAW,GACX,WAAY,CACV,GAAGE,EACH,UAAW,EACb,EACA,UAAW,CACT,GAAGA,EACH,UAAW,EACb,EACA,OAAQA,EACR,cAAe,CACb,GAAI,GACJ,KAAM,GACN,QAAS,GACT,QAAS,CACP,GAAI,EACN,EACA,oBAAqB,CACnB,MAAO,EACT,EACA,WAAY,CACV,GAAGA,EACH,UAAW,EACb,CACF,EACA,mBAAoB,CAClB,GAAI,GACJ,KAAM,GACN,QAAS,GACT,QAAS,CACP,GAAI,EACN,EACA,oBAAqB,CACnB,MAAO,EACT,EACA,WAAY,CACV,GAAGA,EACH,UAAW,EACb,CACF,EACA,MAAO,CACL,QAAS,GACT,SAAU,GACV,KAAM,CACJ,GAAI,EACN,CACF,CACF,CAAC","names":["Selector","fileSelector","userSelector","nodeSelector","nodeFullSelector","mailSelector"]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }var _sodiumjs = require('../sodium.js');var _sparkmd5 = require('spark-md5'); var _sparkmd52 = _interopRequireDefault(_sparkmd5);var _utilsjs = require('../utils/utils.js');function _(o,t){if(!o)throw new Error(t)}function D(){return _sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_keygen()}function U(o){let t=!1;const{state:r,header:y}=_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_init_push(o),p=(s,d)=>(_(t===!1,"state already destroyed"),_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_push(r,d,null,s));function i(){_(t===!1,"state already destroyed"),t=!0}return{encrypt:p,destroy:i,header:y}}function T(o,t){_(o.byteLength>=_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES,`header must be at least HEADERBYTES (${_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES}) long`),_(t.byteLength>=_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES,`key must be at least KEYBYTES (${_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES}) long`);let r=!1;const y=_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_init_pull(o,t),p=s=>(_(r===!1,"state already destroyed"),_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_pull(y,s));function i(){_(r===!1,"state already destroyed"),r=!0}return{decrypt:p,destroy:i}}const m=8192;async function k(o,t,r,y){await _sodiumjs.setup.call(void 0, );const{encrypt:p,destroy:i,header:s}=U(o),d=m+_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_ABYTES,c=Math.ceil(t.byteLength/m)*d+s.byteLength;_optionalChain([r, 'optionalCall', _2 => _2({percent:0,total:c,current:0})]);const h=new Uint8Array(c),n=new _sparkmd52.default.ArrayBuffer,u=new _sparkmd52.default.ArrayBuffer;h.set(s),n.append(s);let a=s.byteLength;_optionalChain([r, 'optionalCall', _3 => _3({percent:a/c,total:c,current:a})]);let E=a/c;for(const l of _utilsjs.chunks.call(void 0, t,m)){if(_optionalChain([y, 'optionalAccess', _4 => _4.signal, 'access', _5 => _5.aborted]))throw new Error("Encrypt aborted");u.append(l);const S=l.length<m?_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL:_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE,f=p(S,l);n.append(f),h.set(f,a),a+=f.byteLength;const A=a/c;A>E+.01&&(_optionalChain([r, 'optionalCall', _6 => _6({percent:A,total:c,current:a})]),E=A)}return i(),_optionalChain([r, 'optionalCall', _7 => _7({percent:1,total:a,current:a})]),{data:h.slice(0,a),md5Encrypted:n.end(),md5:u.end()}}async function F(o,t,r,y){await _sodiumjs.setup.call(void 0, );const p=t.slice(0,_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES);t=t.slice(_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES);const{decrypt:i,destroy:s}=T(p,o),d=m+_sodiumjs.sodium.crypto_secretstream_xchacha20poly1305_ABYTES,c=Math.ceil(t.byteLength/d)*m;_optionalChain([r, 'optionalCall', _8 => _8({percent:0,total:c,current:0})]);const h=new Uint8Array(c);let n=0,u=n/c;for(const a of _utilsjs.chunks.call(void 0, t,d)){if(_optionalChain([y, 'optionalAccess', _9 => _9.signal, 'access', _10 => _10.aborted]))throw new Error("Decrypt aborted");const E=i(a);h.set(E.message,n),n+=E.message.byteLength;const l=n/c;l>u+.01&&(_optionalChain([r, 'optionalCall', _11 => _11({percent:l,total:c,current:n})]),u=l)}return s(),_optionalChain([r, 'optionalCall', _12 => _12({percent:1,total:n,current:n})]),h.slice(0,n)}exports.CHUNK_SIZE = m; exports.decryptSecretstream = F; exports.encryptSecretstream = k; exports.secretstreamKeygen = D;
2
- //# sourceMappingURL=file.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/crypto/file.ts"],"names":["setup","sodium","SparkMD5","chunks","assert","c","message","secretstreamKeygen","encrypt","key","destroyed","state","header","tag","plaintext","destroy","decrypt","ciphertext","CHUNK_SIZE","encryptSecretstream","data","progress","abort","crypt","cryptedChunk","max","final","sparkEncrypted","spark","total","lastPercent","chunk","crypted","percent","decryptSecretstream","decryptt","chunkSize","tmp"],"mappings":"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","sourcesContent":["import type { MessageTag } from \"libsodium-wrappers\";\nimport { setup, sodium } from \"../sodium.js\";\nimport SparkMD5 from \"spark-md5\";\nimport { chunks } from \"../utils/utils.js\";\n\nexport type EncryptedFile = {\n data: Uint8Array;\n md5: string;\n md5Encrypted: string;\n};\n\nfunction assert(c: boolean, message: string): void {\n if (!c) {\n throw new Error(message);\n }\n}\n\ntype EncryptFn = (tag: number, plaintext: Uint8Array) => Uint8Array;\n\ntype DecryptFn = (ciphertext: Uint8Array) => MessageTag;\n\nexport function secretstreamKeygen(): Uint8Array {\n return sodium.crypto_secretstream_xchacha20poly1305_keygen();\n}\n\nfunction encrypt(key: Uint8Array): {\n destroy: () => void;\n encrypt: EncryptFn;\n header: Uint8Array;\n} {\n let destroyed = false;\n const { state, header } =\n sodium.crypto_secretstream_xchacha20poly1305_init_push(key);\n\n const encrypt: EncryptFn = (tag, plaintext) => {\n assert(destroyed === false, \"state already destroyed\");\n\n return sodium.crypto_secretstream_xchacha20poly1305_push(\n state,\n plaintext,\n null,\n tag\n );\n };\n\n function destroy(): void {\n assert(destroyed === false, \"state already destroyed\");\n destroyed = true;\n }\n\n return {\n encrypt,\n destroy,\n header\n };\n}\n\nfunction decrypt(\n header: Uint8Array,\n key: Uint8Array\n): {\n destroy: () => void;\n decrypt: DecryptFn;\n} {\n assert(\n header.byteLength >=\n sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES,\n `header must be at least HEADERBYTES (${sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES}) long`\n );\n assert(\n key.byteLength >= sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES,\n `key must be at least KEYBYTES (${sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES}) long`\n );\n\n let destroyed = false;\n const state = sodium.crypto_secretstream_xchacha20poly1305_init_pull(\n header,\n key\n );\n\n const decrypt: DecryptFn = ciphertext => {\n assert(destroyed === false, \"state already destroyed\");\n\n return sodium.crypto_secretstream_xchacha20poly1305_pull(state, ciphertext);\n };\n\n function destroy(): void {\n assert(destroyed === false, \"state already destroyed\");\n destroyed = true;\n }\n\n return {\n decrypt,\n destroy\n };\n}\n\nexport const CHUNK_SIZE = 8192;\n\nexport type Progress = {\n percent: number;\n total: number;\n current: number;\n};\n\nexport async function encryptSecretstream(\n key: Uint8Array,\n data: Uint8Array,\n progress?: (progress: Progress) => Promise<void>,\n abort?: AbortController\n): Promise<EncryptedFile> {\n await setup();\n const { encrypt: crypt, destroy, header } = encrypt(key);\n const cryptedChunk =\n CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;\n const max =\n Math.ceil(data.byteLength / CHUNK_SIZE) * cryptedChunk + header.byteLength;\n\n progress?.({\n percent: 0,\n total: max,\n current: 0\n });\n const final = new Uint8Array(max);\n const sparkEncrypted = new SparkMD5.ArrayBuffer();\n const spark = new SparkMD5.ArrayBuffer();\n\n final.set(header);\n sparkEncrypted.append(header);\n let total = header.byteLength;\n progress?.({\n percent: total / max,\n total: max,\n current: total\n });\n let lastPercent = total / max;\n\n for (const chunk of chunks(data, CHUNK_SIZE)) {\n if (abort?.signal.aborted) {\n throw new Error(`Encrypt aborted`);\n }\n spark.append(chunk);\n const tag =\n chunk.length < CHUNK_SIZE\n ? sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL\n : sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE;\n const crypted = crypt(tag, chunk);\n sparkEncrypted.append(crypted);\n final.set(crypted, total);\n total += crypted.byteLength;\n const percent = total / max;\n if (percent > lastPercent + 0.01) {\n progress?.({\n percent,\n total: max,\n current: total\n });\n lastPercent = percent;\n }\n }\n\n destroy();\n progress?.({\n percent: 1,\n total,\n current: total\n });\n return {\n data: final.slice(0, total),\n md5Encrypted: sparkEncrypted.end(),\n md5: spark.end()\n };\n}\n\nexport async function decryptSecretstream(\n key: Uint8Array,\n data: Uint8Array,\n progress?: (progress: Progress) => Promise<void>,\n abort?: AbortController\n): Promise<Uint8Array> {\n await setup();\n const header = data.slice(\n 0,\n sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES\n );\n data = data.slice(sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES);\n\n const { decrypt: decryptt, destroy } = decrypt(header, key);\n const chunkSize =\n CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;\n const max = Math.ceil(data.byteLength / chunkSize) * CHUNK_SIZE;\n\n progress?.({\n percent: 0,\n total: max,\n current: 0\n });\n const final = new Uint8Array(max);\n let total = 0;\n\n let lastPercent = total / max;\n\n for (const chunk of chunks(data, chunkSize)) {\n if (abort?.signal.aborted) {\n throw new Error(`Decrypt aborted`);\n }\n const tmp = decryptt(chunk);\n final.set(tmp.message, total);\n total += tmp.message.byteLength;\n const percent = total / max;\n if (percent > lastPercent + 0.01) {\n progress?.({\n percent,\n total: max,\n current: total\n });\n lastPercent = percent;\n }\n }\n\n destroy();\n progress?.({\n percent: 1,\n total,\n current: total\n });\n return final.slice(0, total);\n}\n\n// async function mainSecretstream(random: Uint8Array): Promise<void> {\n// const key = secretstreamKeygen();\n// console.time(\"secretstream_encrypt\");\n// const crypted = encryptSecretstream(key, random);\n// console.timeEnd(\"secretstream_encrypt\");\n// console.time(\"secretstream_decrypt\");\n// const decrypted = decryptSecretstream(key, crypted);\n// console.timeEnd(\"secretstream_decrypt\");\n// const first = to_hex(random).slice(0, 32);\n// const final = to_hex(decrypted).slice(0, 32);\n// console.log({\n// first,\n// final,\n// equals: first === final\n// });\n// }\n// async function mainSecretbox(random: Uint8Array): Promise<void> {\n// const key = generateSecretBox();\n// console.time(\"secretbox_encrypt\");\n// const crypted = encryptFile(random, key);\n// console.timeEnd(\"secretbox_encrypt\");\n// console.time(\"secretbox_decrypt\");\n// const decrypted = decryptFile(crypted, key);\n// console.timeEnd(\"secretbox_decrypt\");\n// const first = to_hex(random).slice(0, 32);\n// const final = to_hex(decrypted).slice(0, 32);\n// console.log({\n// first,\n// final,\n// equals: first === final\n// });\n// }\n\n// async function main(): Promise<void> {\n// await ready;\n// console.time(\"randombytes_buf\");\n// const random = randombytes_buf(1_000_000 * 1024);\n// console.timeEnd(\"randombytes_buf\");\n// await Promise.all([mainSecretstream(random), mainSecretbox(random)]);\n// }\n\n// main();\n"]}
@@ -1,16 +0,0 @@
1
- type EncryptedFile = {
2
- data: Uint8Array;
3
- md5: string;
4
- md5Encrypted: string;
5
- };
6
- declare function secretstreamKeygen(): Uint8Array;
7
- declare const CHUNK_SIZE = 8192;
8
- type Progress = {
9
- percent: number;
10
- total: number;
11
- current: number;
12
- };
13
- declare function encryptSecretstream(key: Uint8Array, data: Uint8Array, progress?: (progress: Progress) => Promise<void>, abort?: AbortController): Promise<EncryptedFile>;
14
- declare function decryptSecretstream(key: Uint8Array, data: Uint8Array, progress?: (progress: Progress) => Promise<void>, abort?: AbortController): Promise<Uint8Array>;
15
-
16
- export { CHUNK_SIZE, EncryptedFile, Progress, decryptSecretstream, encryptSecretstream, secretstreamKeygen };
@@ -1,2 +0,0 @@
1
- import{setup as g,sodium as e}from"../sodium.js";import x from"spark-md5";import{chunks as b}from"../utils/utils.js";function _(o,t){if(!o)throw new Error(t)}function D(){return e.crypto_secretstream_xchacha20poly1305_keygen()}function U(o){let t=!1;const{state:r,header:y}=e.crypto_secretstream_xchacha20poly1305_init_push(o),p=(s,d)=>(_(t===!1,"state already destroyed"),e.crypto_secretstream_xchacha20poly1305_push(r,d,null,s));function i(){_(t===!1,"state already destroyed"),t=!0}return{encrypt:p,destroy:i,header:y}}function T(o,t){_(o.byteLength>=e.crypto_secretstream_xchacha20poly1305_HEADERBYTES,`header must be at least HEADERBYTES (${e.crypto_secretstream_xchacha20poly1305_HEADERBYTES}) long`),_(t.byteLength>=e.crypto_secretstream_xchacha20poly1305_KEYBYTES,`key must be at least KEYBYTES (${e.crypto_secretstream_xchacha20poly1305_KEYBYTES}) long`);let r=!1;const y=e.crypto_secretstream_xchacha20poly1305_init_pull(o,t),p=s=>(_(r===!1,"state already destroyed"),e.crypto_secretstream_xchacha20poly1305_pull(y,s));function i(){_(r===!1,"state already destroyed"),r=!0}return{decrypt:p,destroy:i}}const m=8192;async function k(o,t,r,y){await g();const{encrypt:p,destroy:i,header:s}=U(o),d=m+e.crypto_secretstream_xchacha20poly1305_ABYTES,c=Math.ceil(t.byteLength/m)*d+s.byteLength;r?.({percent:0,total:c,current:0});const h=new Uint8Array(c),n=new x.ArrayBuffer,u=new x.ArrayBuffer;h.set(s),n.append(s);let a=s.byteLength;r?.({percent:a/c,total:c,current:a});let E=a/c;for(const l of b(t,m)){if(y?.signal.aborted)throw new Error("Encrypt aborted");u.append(l);const S=l.length<m?e.crypto_secretstream_xchacha20poly1305_TAG_FINAL:e.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE,f=p(S,l);n.append(f),h.set(f,a),a+=f.byteLength;const A=a/c;A>E+.01&&(r?.({percent:A,total:c,current:a}),E=A)}return i(),r?.({percent:1,total:a,current:a}),{data:h.slice(0,a),md5Encrypted:n.end(),md5:u.end()}}async function F(o,t,r,y){await g();const p=t.slice(0,e.crypto_secretstream_xchacha20poly1305_HEADERBYTES);t=t.slice(e.crypto_secretstream_xchacha20poly1305_HEADERBYTES);const{decrypt:i,destroy:s}=T(p,o),d=m+e.crypto_secretstream_xchacha20poly1305_ABYTES,c=Math.ceil(t.byteLength/d)*m;r?.({percent:0,total:c,current:0});const h=new Uint8Array(c);let n=0,u=n/c;for(const a of b(t,d)){if(y?.signal.aborted)throw new Error("Decrypt aborted");const E=i(a);h.set(E.message,n),n+=E.message.byteLength;const l=n/c;l>u+.01&&(r?.({percent:l,total:c,current:n}),u=l)}return s(),r?.({percent:1,total:n,current:n}),h.slice(0,n)}export{m as CHUNK_SIZE,F as decryptSecretstream,k as encryptSecretstream,D as secretstreamKeygen};
2
- //# sourceMappingURL=file.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/crypto/file.ts"],"sourcesContent":["import type { MessageTag } from \"libsodium-wrappers\";\nimport { setup, sodium } from \"../sodium.js\";\nimport SparkMD5 from \"spark-md5\";\nimport { chunks } from \"../utils/utils.js\";\n\nexport type EncryptedFile = {\n data: Uint8Array;\n md5: string;\n md5Encrypted: string;\n};\n\nfunction assert(c: boolean, message: string): void {\n if (!c) {\n throw new Error(message);\n }\n}\n\ntype EncryptFn = (tag: number, plaintext: Uint8Array) => Uint8Array;\n\ntype DecryptFn = (ciphertext: Uint8Array) => MessageTag;\n\nexport function secretstreamKeygen(): Uint8Array {\n return sodium.crypto_secretstream_xchacha20poly1305_keygen();\n}\n\nfunction encrypt(key: Uint8Array): {\n destroy: () => void;\n encrypt: EncryptFn;\n header: Uint8Array;\n} {\n let destroyed = false;\n const { state, header } =\n sodium.crypto_secretstream_xchacha20poly1305_init_push(key);\n\n const encrypt: EncryptFn = (tag, plaintext) => {\n assert(destroyed === false, \"state already destroyed\");\n\n return sodium.crypto_secretstream_xchacha20poly1305_push(\n state,\n plaintext,\n null,\n tag\n );\n };\n\n function destroy(): void {\n assert(destroyed === false, \"state already destroyed\");\n destroyed = true;\n }\n\n return {\n encrypt,\n destroy,\n header\n };\n}\n\nfunction decrypt(\n header: Uint8Array,\n key: Uint8Array\n): {\n destroy: () => void;\n decrypt: DecryptFn;\n} {\n assert(\n header.byteLength >=\n sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES,\n `header must be at least HEADERBYTES (${sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES}) long`\n );\n assert(\n key.byteLength >= sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES,\n `key must be at least KEYBYTES (${sodium.crypto_secretstream_xchacha20poly1305_KEYBYTES}) long`\n );\n\n let destroyed = false;\n const state = sodium.crypto_secretstream_xchacha20poly1305_init_pull(\n header,\n key\n );\n\n const decrypt: DecryptFn = ciphertext => {\n assert(destroyed === false, \"state already destroyed\");\n\n return sodium.crypto_secretstream_xchacha20poly1305_pull(state, ciphertext);\n };\n\n function destroy(): void {\n assert(destroyed === false, \"state already destroyed\");\n destroyed = true;\n }\n\n return {\n decrypt,\n destroy\n };\n}\n\nexport const CHUNK_SIZE = 8192;\n\nexport type Progress = {\n percent: number;\n total: number;\n current: number;\n};\n\nexport async function encryptSecretstream(\n key: Uint8Array,\n data: Uint8Array,\n progress?: (progress: Progress) => Promise<void>,\n abort?: AbortController\n): Promise<EncryptedFile> {\n await setup();\n const { encrypt: crypt, destroy, header } = encrypt(key);\n const cryptedChunk =\n CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;\n const max =\n Math.ceil(data.byteLength / CHUNK_SIZE) * cryptedChunk + header.byteLength;\n\n progress?.({\n percent: 0,\n total: max,\n current: 0\n });\n const final = new Uint8Array(max);\n const sparkEncrypted = new SparkMD5.ArrayBuffer();\n const spark = new SparkMD5.ArrayBuffer();\n\n final.set(header);\n sparkEncrypted.append(header);\n let total = header.byteLength;\n progress?.({\n percent: total / max,\n total: max,\n current: total\n });\n let lastPercent = total / max;\n\n for (const chunk of chunks(data, CHUNK_SIZE)) {\n if (abort?.signal.aborted) {\n throw new Error(`Encrypt aborted`);\n }\n spark.append(chunk);\n const tag =\n chunk.length < CHUNK_SIZE\n ? sodium.crypto_secretstream_xchacha20poly1305_TAG_FINAL\n : sodium.crypto_secretstream_xchacha20poly1305_TAG_MESSAGE;\n const crypted = crypt(tag, chunk);\n sparkEncrypted.append(crypted);\n final.set(crypted, total);\n total += crypted.byteLength;\n const percent = total / max;\n if (percent > lastPercent + 0.01) {\n progress?.({\n percent,\n total: max,\n current: total\n });\n lastPercent = percent;\n }\n }\n\n destroy();\n progress?.({\n percent: 1,\n total,\n current: total\n });\n return {\n data: final.slice(0, total),\n md5Encrypted: sparkEncrypted.end(),\n md5: spark.end()\n };\n}\n\nexport async function decryptSecretstream(\n key: Uint8Array,\n data: Uint8Array,\n progress?: (progress: Progress) => Promise<void>,\n abort?: AbortController\n): Promise<Uint8Array> {\n await setup();\n const header = data.slice(\n 0,\n sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES\n );\n data = data.slice(sodium.crypto_secretstream_xchacha20poly1305_HEADERBYTES);\n\n const { decrypt: decryptt, destroy } = decrypt(header, key);\n const chunkSize =\n CHUNK_SIZE + sodium.crypto_secretstream_xchacha20poly1305_ABYTES;\n const max = Math.ceil(data.byteLength / chunkSize) * CHUNK_SIZE;\n\n progress?.({\n percent: 0,\n total: max,\n current: 0\n });\n const final = new Uint8Array(max);\n let total = 0;\n\n let lastPercent = total / max;\n\n for (const chunk of chunks(data, chunkSize)) {\n if (abort?.signal.aborted) {\n throw new Error(`Decrypt aborted`);\n }\n const tmp = decryptt(chunk);\n final.set(tmp.message, total);\n total += tmp.message.byteLength;\n const percent = total / max;\n if (percent > lastPercent + 0.01) {\n progress?.({\n percent,\n total: max,\n current: total\n });\n lastPercent = percent;\n }\n }\n\n destroy();\n progress?.({\n percent: 1,\n total,\n current: total\n });\n return final.slice(0, total);\n}\n\n// async function mainSecretstream(random: Uint8Array): Promise<void> {\n// const key = secretstreamKeygen();\n// console.time(\"secretstream_encrypt\");\n// const crypted = encryptSecretstream(key, random);\n// console.timeEnd(\"secretstream_encrypt\");\n// console.time(\"secretstream_decrypt\");\n// const decrypted = decryptSecretstream(key, crypted);\n// console.timeEnd(\"secretstream_decrypt\");\n// const first = to_hex(random).slice(0, 32);\n// const final = to_hex(decrypted).slice(0, 32);\n// console.log({\n// first,\n// final,\n// equals: first === final\n// });\n// }\n// async function mainSecretbox(random: Uint8Array): Promise<void> {\n// const key = generateSecretBox();\n// console.time(\"secretbox_encrypt\");\n// const crypted = encryptFile(random, key);\n// console.timeEnd(\"secretbox_encrypt\");\n// console.time(\"secretbox_decrypt\");\n// const decrypted = decryptFile(crypted, key);\n// console.timeEnd(\"secretbox_decrypt\");\n// const first = to_hex(random).slice(0, 32);\n// const final = to_hex(decrypted).slice(0, 32);\n// console.log({\n// first,\n// final,\n// equals: first === final\n// });\n// }\n\n// async function main(): Promise<void> {\n// await ready;\n// console.time(\"randombytes_buf\");\n// const random = randombytes_buf(1_000_000 * 1024);\n// console.timeEnd(\"randombytes_buf\");\n// await Promise.all([mainSecretstream(random), mainSecretbox(random)]);\n// }\n\n// main();\n"],"mappings":"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","names":["setup","sodium","SparkMD5","chunks","assert","c","message","secretstreamKeygen","encrypt","key","destroyed","state","header","tag","plaintext","destroy","decrypt","ciphertext","CHUNK_SIZE","encryptSecretstream","data","progress","abort","crypt","cryptedChunk","max","final","sparkEncrypted","spark","total","lastPercent","chunk","crypted","percent","decryptSecretstream","decryptt","chunkSize","tmp"]}
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utilsjs = require('../utils/utils.js');var _sodiumjs = require('../sodium.js');function p(t,o,e){const n=_sodiumjs.sodium.randombytes_buf(_sodiumjs.sodium.crypto_box_NONCEBYTES),c=_sodiumjs.sodium.crypto_box_easy(t,n,_sodiumjs.sodium.from_hex(o),_sodiumjs.sodium.from_hex(e));return _utilsjs.concatenate.call(void 0, n,c)}function s(){return _sodiumjs.sodium.crypto_box_keypair("hex")}function x(t,o,e){if(t.length<_sodiumjs.sodium.crypto_box_NONCEBYTES+_sodiumjs.sodium.crypto_box_MACBYTES)throw"data too short";const n=t.slice(0,_sodiumjs.sodium.crypto_box_NONCEBYTES),c=t.slice(_sodiumjs.sodium.crypto_box_NONCEBYTES);return _sodiumjs.sodium.crypto_box_open_easy(c,n,_sodiumjs.sodium.from_hex(o),_sodiumjs.sodium.from_hex(e))}function a(){return _sodiumjs.sodium.randombytes_buf(_sodiumjs.sodium.crypto_secretbox_KEYBYTES,"hex")}function b(t,o){const e=_sodiumjs.sodium.randombytes_buf(_sodiumjs.sodium.crypto_secretbox_NONCEBYTES),n=_sodiumjs.sodium.crypto_secretbox_easy(t,e,_sodiumjs.sodium.from_hex(o));return _utilsjs.concatenate.call(void 0, e,n)}function f(t,o){if(t.length<_sodiumjs.sodium.crypto_secretbox_NONCEBYTES+_sodiumjs.sodium.crypto_secretbox_MACBYTES)throw"data too short";const e=t.slice(0,_sodiumjs.sodium.crypto_secretbox_NONCEBYTES),n=t.slice(_sodiumjs.sodium.crypto_secretbox_NONCEBYTES);return _sodiumjs.sodium.crypto_secretbox_open_easy(n,e,_sodiumjs.sodium.from_hex(o))}function u(t,o){return _sodiumjs.sodium.crypto_box_seal(t,_sodiumjs.sodium.from_hex(o))}function E(t,{privateKey:o,publicKey:e}){return _sodiumjs.sodium.crypto_box_seal_open(t,_sodiumjs.sodium.from_hex(e),_sodiumjs.sodium.from_hex(o))}exports.decryptAnonymous = E; exports.decryptCryptoBox = x; exports.decryptSecretBox = f; exports.encryptAnonymous = u; exports.encryptCryptoBox = p; exports.encryptSecretBox = b; exports.generateCryptoBoxKeyPair = s; exports.generateSecretBoxKey = a;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/crypto/index.ts"],"names":["concatenate","sodium","encryptCryptoBox","data","publicKeyBob","privateKeyAlice","nonce","crypt","generateCryptoBoxKeyPair","decryptCryptoBox","publicKeyAlice","privateKeyBob","cipher","generateSecretBoxKey","encryptSecretBox","key","decryptSecretBox","encryptAnonymous","receiverPublicKey","decryptAnonymous","privateKey","publicKey"],"mappings":"AAAA,OAAS,eAAAA,MAAmB,oBAC5B,OAAS,UAAAC,MAAc,eAOhB,SAASC,EACdC,EACAC,EACAC,EACY,CACZ,MAAMC,EAAQL,EAAO,gBAAgBA,EAAO,qBAAqB,EAC3DM,EAAQN,EAAO,gBACnBE,EACAG,EACAL,EAAO,SAASG,CAAY,EAC5BH,EAAO,SAASI,CAAe,CACjC,EACA,OAAOL,EAAYM,EAAOC,CAAK,CACjC,CAEO,SAASC,GAAoC,CAClD,OAAOP,EAAO,mBAAmB,KAAK,CACxC,CAEO,SAASQ,EACdN,EACAO,EACAC,EACY,CACZ,GAAIR,EAAK,OAASF,EAAO,sBAAwBA,EAAO,oBACtD,KAAM,iBAER,MAAMK,EAAQH,EAAK,MAAM,EAAGF,EAAO,qBAAqB,EAClDW,EAAST,EAAK,MAAMF,EAAO,qBAAqB,EACtD,OAAOA,EAAO,qBACZW,EACAN,EACAL,EAAO,SAASS,CAAc,EAC9BT,EAAO,SAASU,CAAa,CAC/B,CACF,CAEO,SAASE,GAA+B,CAC7C,OAAOZ,EAAO,gBAAgBA,EAAO,0BAA2B,KAAK,CACvE,CAEO,SAASa,EAAiBX,EAAkBY,EAAyB,CAC1E,MAAMT,EAAQL,EAAO,gBAAgBA,EAAO,2BAA2B,EACjEM,EAAQN,EAAO,sBAAsBE,EAAMG,EAAOL,EAAO,SAASc,CAAG,CAAC,EAC5E,OAAOf,EAAYM,EAAOC,CAAK,CACjC,CAEO,SAASS,EAAiBb,EAAkBY,EAAyB,CAC1E,GACEZ,EAAK,OACLF,EAAO,4BAA8BA,EAAO,0BAE5C,KAAM,iBAER,MAAMK,EAAQH,EAAK,MAAM,EAAGF,EAAO,2BAA2B,EACxDW,EAAST,EAAK,MAAMF,EAAO,2BAA2B,EAC5D,OAAOA,EAAO,2BAA2BW,EAAQN,EAAOL,EAAO,SAASc,CAAG,CAAC,CAC9E,CAEO,SAASE,EACdd,EACAe,EACY,CACZ,OAAOjB,EAAO,gBAAgBE,EAAMF,EAAO,SAASiB,CAAiB,CAAC,CACxE,CAEO,SAASC,EACdhB,EACA,CAAE,WAAAiB,EAAY,UAAAC,CAAU,EACZ,CACZ,OAAOpB,EAAO,qBACZE,EACAF,EAAO,SAASoB,CAAS,EACzBpB,EAAO,SAASmB,CAAU,CAC5B,CACF","sourcesContent":["import { concatenate } from \"../utils/utils.js\";\nimport { sodium } from \"../sodium.js\";\n\nexport interface KeyPair {\n publicKey: string;\n privateKey: string;\n}\n\nexport function encryptCryptoBox(\n data: Uint8Array,\n publicKeyBob: string,\n privateKeyAlice: string\n): Uint8Array {\n const nonce = sodium.randombytes_buf(sodium.crypto_box_NONCEBYTES);\n const crypt = sodium.crypto_box_easy(\n data,\n nonce,\n sodium.from_hex(publicKeyBob),\n sodium.from_hex(privateKeyAlice)\n );\n return concatenate(nonce, crypt);\n}\n\nexport function generateCryptoBoxKeyPair(): KeyPair {\n return sodium.crypto_box_keypair(\"hex\");\n}\n\nexport function decryptCryptoBox(\n data: Uint8Array,\n publicKeyAlice: string,\n privateKeyBob: string\n): Uint8Array {\n if (data.length < sodium.crypto_box_NONCEBYTES + sodium.crypto_box_MACBYTES) {\n throw \"data too short\";\n }\n const nonce = data.slice(0, sodium.crypto_box_NONCEBYTES);\n const cipher = data.slice(sodium.crypto_box_NONCEBYTES);\n return sodium.crypto_box_open_easy(\n cipher,\n nonce,\n sodium.from_hex(publicKeyAlice),\n sodium.from_hex(privateKeyBob)\n );\n}\n\nexport function generateSecretBoxKey(): string {\n return sodium.randombytes_buf(sodium.crypto_secretbox_KEYBYTES, \"hex\");\n}\n\nexport function encryptSecretBox(data: Uint8Array, key: string): Uint8Array {\n const nonce = sodium.randombytes_buf(sodium.crypto_secretbox_NONCEBYTES);\n const crypt = sodium.crypto_secretbox_easy(data, nonce, sodium.from_hex(key));\n return concatenate(nonce, crypt);\n}\n\nexport function decryptSecretBox(data: Uint8Array, key: string): Uint8Array {\n if (\n data.length <\n sodium.crypto_secretbox_NONCEBYTES + sodium.crypto_secretbox_MACBYTES\n ) {\n throw \"data too short\";\n }\n const nonce = data.slice(0, sodium.crypto_secretbox_NONCEBYTES);\n const cipher = data.slice(sodium.crypto_secretbox_NONCEBYTES);\n return sodium.crypto_secretbox_open_easy(cipher, nonce, sodium.from_hex(key));\n}\n\nexport function encryptAnonymous(\n data: Uint8Array,\n receiverPublicKey: string\n): Uint8Array {\n return sodium.crypto_box_seal(data, sodium.from_hex(receiverPublicKey));\n}\n\nexport function decryptAnonymous(\n data: Uint8Array,\n { privateKey, publicKey }: KeyPair\n): Uint8Array {\n return sodium.crypto_box_seal_open(\n data,\n sodium.from_hex(publicKey),\n sodium.from_hex(privateKey)\n );\n}\n"]}
@@ -1,14 +0,0 @@
1
- interface KeyPair {
2
- publicKey: string;
3
- privateKey: string;
4
- }
5
- declare function encryptCryptoBox(data: Uint8Array, publicKeyBob: string, privateKeyAlice: string): Uint8Array;
6
- declare function generateCryptoBoxKeyPair(): KeyPair;
7
- declare function decryptCryptoBox(data: Uint8Array, publicKeyAlice: string, privateKeyBob: string): Uint8Array;
8
- declare function generateSecretBoxKey(): string;
9
- declare function encryptSecretBox(data: Uint8Array, key: string): Uint8Array;
10
- declare function decryptSecretBox(data: Uint8Array, key: string): Uint8Array;
11
- declare function encryptAnonymous(data: Uint8Array, receiverPublicKey: string): Uint8Array;
12
- declare function decryptAnonymous(data: Uint8Array, { privateKey, publicKey }: KeyPair): Uint8Array;
13
-
14
- export { KeyPair, decryptAnonymous, decryptCryptoBox, decryptSecretBox, encryptAnonymous, encryptCryptoBox, encryptSecretBox, generateCryptoBoxKeyPair, generateSecretBoxKey };
@@ -1,2 +0,0 @@
1
- import{concatenate as y}from"../utils/utils.js";import{sodium as r}from"../sodium.js";function p(t,o,e){const n=r.randombytes_buf(r.crypto_box_NONCEBYTES),c=r.crypto_box_easy(t,n,r.from_hex(o),r.from_hex(e));return y(n,c)}function s(){return r.crypto_box_keypair("hex")}function x(t,o,e){if(t.length<r.crypto_box_NONCEBYTES+r.crypto_box_MACBYTES)throw"data too short";const n=t.slice(0,r.crypto_box_NONCEBYTES),c=t.slice(r.crypto_box_NONCEBYTES);return r.crypto_box_open_easy(c,n,r.from_hex(o),r.from_hex(e))}function a(){return r.randombytes_buf(r.crypto_secretbox_KEYBYTES,"hex")}function b(t,o){const e=r.randombytes_buf(r.crypto_secretbox_NONCEBYTES),n=r.crypto_secretbox_easy(t,e,r.from_hex(o));return y(e,n)}function f(t,o){if(t.length<r.crypto_secretbox_NONCEBYTES+r.crypto_secretbox_MACBYTES)throw"data too short";const e=t.slice(0,r.crypto_secretbox_NONCEBYTES),n=t.slice(r.crypto_secretbox_NONCEBYTES);return r.crypto_secretbox_open_easy(n,e,r.from_hex(o))}function u(t,o){return r.crypto_box_seal(t,r.from_hex(o))}function E(t,{privateKey:o,publicKey:e}){return r.crypto_box_seal_open(t,r.from_hex(e),r.from_hex(o))}export{E as decryptAnonymous,x as decryptCryptoBox,f as decryptSecretBox,u as encryptAnonymous,p as encryptCryptoBox,b as encryptSecretBox,s as generateCryptoBoxKeyPair,a as generateSecretBoxKey};
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/crypto/index.ts"],"sourcesContent":["import { concatenate } from \"../utils/utils.js\";\nimport { sodium } from \"../sodium.js\";\n\nexport interface KeyPair {\n publicKey: string;\n privateKey: string;\n}\n\nexport function encryptCryptoBox(\n data: Uint8Array,\n publicKeyBob: string,\n privateKeyAlice: string\n): Uint8Array {\n const nonce = sodium.randombytes_buf(sodium.crypto_box_NONCEBYTES);\n const crypt = sodium.crypto_box_easy(\n data,\n nonce,\n sodium.from_hex(publicKeyBob),\n sodium.from_hex(privateKeyAlice)\n );\n return concatenate(nonce, crypt);\n}\n\nexport function generateCryptoBoxKeyPair(): KeyPair {\n return sodium.crypto_box_keypair(\"hex\");\n}\n\nexport function decryptCryptoBox(\n data: Uint8Array,\n publicKeyAlice: string,\n privateKeyBob: string\n): Uint8Array {\n if (data.length < sodium.crypto_box_NONCEBYTES + sodium.crypto_box_MACBYTES) {\n throw \"data too short\";\n }\n const nonce = data.slice(0, sodium.crypto_box_NONCEBYTES);\n const cipher = data.slice(sodium.crypto_box_NONCEBYTES);\n return sodium.crypto_box_open_easy(\n cipher,\n nonce,\n sodium.from_hex(publicKeyAlice),\n sodium.from_hex(privateKeyBob)\n );\n}\n\nexport function generateSecretBoxKey(): string {\n return sodium.randombytes_buf(sodium.crypto_secretbox_KEYBYTES, \"hex\");\n}\n\nexport function encryptSecretBox(data: Uint8Array, key: string): Uint8Array {\n const nonce = sodium.randombytes_buf(sodium.crypto_secretbox_NONCEBYTES);\n const crypt = sodium.crypto_secretbox_easy(data, nonce, sodium.from_hex(key));\n return concatenate(nonce, crypt);\n}\n\nexport function decryptSecretBox(data: Uint8Array, key: string): Uint8Array {\n if (\n data.length <\n sodium.crypto_secretbox_NONCEBYTES + sodium.crypto_secretbox_MACBYTES\n ) {\n throw \"data too short\";\n }\n const nonce = data.slice(0, sodium.crypto_secretbox_NONCEBYTES);\n const cipher = data.slice(sodium.crypto_secretbox_NONCEBYTES);\n return sodium.crypto_secretbox_open_easy(cipher, nonce, sodium.from_hex(key));\n}\n\nexport function encryptAnonymous(\n data: Uint8Array,\n receiverPublicKey: string\n): Uint8Array {\n return sodium.crypto_box_seal(data, sodium.from_hex(receiverPublicKey));\n}\n\nexport function decryptAnonymous(\n data: Uint8Array,\n { privateKey, publicKey }: KeyPair\n): Uint8Array {\n return sodium.crypto_box_seal_open(\n data,\n sodium.from_hex(publicKey),\n sodium.from_hex(privateKey)\n );\n}\n"],"mappings":"AAAA,OAAS,eAAAA,MAAmB,oBAC5B,OAAS,UAAAC,MAAc,eAOhB,SAASC,EACdC,EACAC,EACAC,EACY,CACZ,MAAMC,EAAQL,EAAO,gBAAgBA,EAAO,qBAAqB,EAC3DM,EAAQN,EAAO,gBACnBE,EACAG,EACAL,EAAO,SAASG,CAAY,EAC5BH,EAAO,SAASI,CAAe,CACjC,EACA,OAAOL,EAAYM,EAAOC,CAAK,CACjC,CAEO,SAASC,GAAoC,CAClD,OAAOP,EAAO,mBAAmB,KAAK,CACxC,CAEO,SAASQ,EACdN,EACAO,EACAC,EACY,CACZ,GAAIR,EAAK,OAASF,EAAO,sBAAwBA,EAAO,oBACtD,KAAM,iBAER,MAAMK,EAAQH,EAAK,MAAM,EAAGF,EAAO,qBAAqB,EAClDW,EAAST,EAAK,MAAMF,EAAO,qBAAqB,EACtD,OAAOA,EAAO,qBACZW,EACAN,EACAL,EAAO,SAASS,CAAc,EAC9BT,EAAO,SAASU,CAAa,CAC/B,CACF,CAEO,SAASE,GAA+B,CAC7C,OAAOZ,EAAO,gBAAgBA,EAAO,0BAA2B,KAAK,CACvE,CAEO,SAASa,EAAiBX,EAAkBY,EAAyB,CAC1E,MAAMT,EAAQL,EAAO,gBAAgBA,EAAO,2BAA2B,EACjEM,EAAQN,EAAO,sBAAsBE,EAAMG,EAAOL,EAAO,SAASc,CAAG,CAAC,EAC5E,OAAOf,EAAYM,EAAOC,CAAK,CACjC,CAEO,SAASS,EAAiBb,EAAkBY,EAAyB,CAC1E,GACEZ,EAAK,OACLF,EAAO,4BAA8BA,EAAO,0BAE5C,KAAM,iBAER,MAAMK,EAAQH,EAAK,MAAM,EAAGF,EAAO,2BAA2B,EACxDW,EAAST,EAAK,MAAMF,EAAO,2BAA2B,EAC5D,OAAOA,EAAO,2BAA2BW,EAAQN,EAAOL,EAAO,SAASc,CAAG,CAAC,CAC9E,CAEO,SAASE,EACdd,EACAe,EACY,CACZ,OAAOjB,EAAO,gBAAgBE,EAAMF,EAAO,SAASiB,CAAiB,CAAC,CACxE,CAEO,SAASC,EACdhB,EACA,CAAE,WAAAiB,EAAY,UAAAC,CAAU,EACZ,CACZ,OAAOpB,EAAO,qBACZE,EACAF,EAAO,SAASoB,CAAS,EACzBpB,EAAO,SAASmB,CAAU,CAC5B,CACF","names":["concatenate","sodium","encryptCryptoBox","data","publicKeyBob","privateKeyAlice","nonce","crypt","generateCryptoBoxKeyPair","decryptCryptoBox","publicKeyAlice","privateKeyBob","cipher","generateSecretBoxKey","encryptSecretBox","key","decryptSecretBox","encryptAnonymous","receiverPublicKey","decryptAnonymous","privateKey","publicKey"]}
package/dist/error.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";//# sourceMappingURL=error.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":""}
package/dist/error.d.ts DELETED
@@ -1,38 +0,0 @@
1
- type ErrorType = "ErrorUpgradePlan" | "ErrorBadRequest" | "ErrorNotFound" | "ErrorNotExist" | "ErrorAccessDenied" | "ErrorLangNotExist" | "ErrorLimit" | "ErrorStripe" | "ErrorBasic";
2
- interface ErrorBase {
3
- message: string;
4
- __typename: ErrorType;
5
- }
6
- interface ErrorUpgradePlan extends ErrorBase {
7
- __typename: "ErrorUpgradePlan";
8
- }
9
- interface ErrorNotFound extends ErrorBase {
10
- __typename: "ErrorNotFound";
11
- field?: string | undefined;
12
- }
13
- interface ErrorNotExist extends ErrorBase {
14
- __typename: "ErrorNotExist";
15
- field?: string | undefined;
16
- }
17
- interface ErrorAccessDenied extends ErrorBase {
18
- __typename: "ErrorAccessDenied";
19
- }
20
- interface ErrorLangNotExist extends ErrorBase {
21
- __typename: "ErrorLangNotExist";
22
- }
23
- interface ErrorLimit extends ErrorBase {
24
- __typename: "ErrorLimit";
25
- field?: string | undefined;
26
- }
27
- interface ErrorBasic extends ErrorBase {
28
- __typename: "ErrorBasic";
29
- }
30
- interface ErrorStripe extends ErrorBase {
31
- __typename: "ErrorStripe";
32
- }
33
- interface ErrorBadRequest extends ErrorBase {
34
- __typename: "ErrorBadRequest";
35
- }
36
- type SecrecyError = ErrorUpgradePlan | ErrorNotFound | ErrorNotExist | ErrorAccessDenied | ErrorLangNotExist | ErrorLimit | ErrorStripe | ErrorBasic | ErrorBadRequest;
37
-
38
- export { ErrorAccessDenied, ErrorBadRequest, ErrorBase, ErrorBasic, ErrorLangNotExist, ErrorLimit, ErrorNotExist, ErrorNotFound, ErrorStripe, ErrorType, ErrorUpgradePlan, SecrecyError };
package/dist/error.js DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=error.js.map
package/dist/error.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/dist/index.cjs DELETED
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _createStarExport(obj) { Object.keys(obj) .filter((key) => key !== "default" && key !== "__esModule") .forEach((key) => { if (exports.hasOwnProperty(key)) { return; } Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]}); }); }var _indexjs = require('./client/index.js'); _createStarExport(_indexjs);var _indexjs3 = require('./crypto/index.js'); _createStarExport(_indexjs3);var _BaseClientjs = require('./BaseClient.js');var _helpersjs = require('./client/helpers.js'); _createStarExport(_helpersjs);var _sodiumjs = require('./sodium.js'); _createStarExport(_sodiumjs);var _storebuddyjs = require('./utils/store-buddy.js'); _createStarExport(_storebuddyjs);var _indexjs5 = require('./zeus/index.js');var _errorjs = require('./error.js'); _createStarExport(_errorjs);var _zeus = require('./zeus');exports.BaseClient = _BaseClientjs.BaseClient; exports.FileContentType = _indexjs5.FileContentType; exports.InfuraNetwork = _indexjs5.InfuraNetwork; exports.Lang = _indexjs5.Lang; exports.MailType = _indexjs5.MailType; exports.PayInputType = _indexjs5.PayInputType; exports.PlanKind = _indexjs5.PlanKind; exports.Rights = _indexjs5.Rights; exports.Selector = _zeus.Selector; exports.SortApplications = _indexjs5.SortApplications; exports.Thunder = _indexjs5.Thunder; exports.UserRole = _indexjs5.UserRole;
2
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":["BaseClient","Lang","FileContentType","MailType","PlanKind","Rights","PayInputType","UserRole","InfuraNetwork","SortApplications","Thunder","Selector"],"mappings":"AAAA,WAAc,oBACd,WAAc,oBAYd,OAAS,cAAAA,MAAkB,kBAoB3B,WAAc,sBACd,WAAc,cACd,WAAc,yBACd,OACE,QAAAC,EACA,mBAAAC,EACA,YAAAC,EACA,YAAAC,EACA,UAAAC,EACA,gBAAAC,EACA,YAAAC,EACA,iBAAAC,EACA,oBAAAC,EACA,WAAAC,MACK,kBAEP,WAAc,aAEd,OAAS,YAAAC,MAAgB","sourcesContent":["export * from \"./client/index.js\";\nexport * from \"./crypto/index.js\";\nexport type { Progress } from \"./crypto/file.js\";\nexport type {\n User,\n QueryLimits,\n DownloadProgress,\n UserData,\n MailLimitsValues,\n CloudLimits,\n SendReport,\n SuccessResponse\n} from \"./BaseClient.js\";\nexport { BaseClient } from \"./BaseClient.js\";\nexport type {\n Node,\n NodeFull,\n FileMetadata,\n SecrecyUserApp,\n BaseMail,\n ReceivedMail,\n SentMail,\n PublicUser,\n UserAppSettings,\n NodeSize,\n UserAppNotifications,\n MailFile,\n MailIntegrity,\n DraftMail,\n Mail,\n WaitingReceivedMail,\n MailRecipientInput\n} from \"./client/types/index.js\";\nexport * from \"./client/helpers.js\";\nexport * from \"./sodium.js\";\nexport * from \"./utils/store-buddy.js\";\nexport {\n Lang,\n FileContentType,\n MailType,\n PlanKind,\n Rights,\n PayInputType,\n UserRole,\n InfuraNetwork,\n SortApplications,\n Thunder\n} from \"./zeus/index.js\";\nexport type { GraphQLTypes } from \"./zeus/index.js\";\nexport * from \"./error.js\";\nexport type { InputType } from \"./zeus\";\nexport { Selector } from \"./zeus\";\n"]}
package/dist/index.d.ts DELETED
@@ -1,19 +0,0 @@
1
- export { B as BaseClient, C as CloudLimits, D as DownloadProgress, H as HashInfos, M as MailLimitsValues, N as NewMail, P as ProgressCallback, Q as QueryLimits, d as SecrecyClient, f as SecrecyEnv, S as SendReport, c as SuccessResponse, h as UseSecrecyParams, a as User, b as UserData, V as Value, e as encryptName, i as getSecrecyClient, g as getUrl, l as login, p as parseInfos } from './BaseClient-2af8a400.js';
2
- export { KeyPair, decryptAnonymous, decryptCryptoBox, decryptSecretBox, encryptAnonymous, encryptCryptoBox, encryptSecretBox, generateCryptoBoxKeyPair, generateSecretBoxKey } from './crypto/index.js';
3
- export { Progress } from './crypto/file.js';
4
- export { BaseMail, DraftMail, Mail, MailFile, MailIntegrity, MailRecipientInput, Node, NodeFull, NodeSize, PublicUser, ReceivedMail, SecrecyUserApp, SentMail, WaitingReceivedMail } from './client/types/index.js';
5
- export { setup } from './sodium.js';
6
- export { StoreBuddy, storeBuddy } from './utils/store-buddy.js';
7
- export { FileContentType, GraphQLTypes, InfuraNetwork, InputType, Lang, MailType, PayInputType, PlanKind, Rights, Selector, SortApplications, Thunder, UserRole } from './zeus/index.js';
8
- export { ErrorAccessDenied, ErrorBadRequest, ErrorBase, ErrorBasic, ErrorLangNotExist, ErrorLimit, ErrorNotExist, ErrorNotFound, ErrorStripe, ErrorType, ErrorUpgradePlan, SecrecyError } from './error.js';
9
- export { FileMetadata } from './client/types/File.js';
10
- export { UserAppSettings } from './client/types/UserAppSettings.js';
11
- export { UserAppNotifications } from './client/types/UserAppNotifications.js';
12
- export { default as sodium } from 'libsodium-wrappers';
13
- import 'ky';
14
- import 'jsonwebtoken';
15
- import 'bson';
16
- import 'ethers';
17
- import './client/types/selectors.js';
18
- import './client/types/Inputs.js';
19
- import './zeus/const.js';
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export*from"./client/index.js";export*from"./crypto/index.js";import{BaseClient as i}from"./BaseClient.js";export*from"./client/helpers.js";export*from"./sodium.js";export*from"./utils/store-buddy.js";import{Lang as n,FileContentType as f,MailType as m,PlanKind as x,Rights as y,PayInputType as c,UserRole as d,InfuraNetwork as u,SortApplications as M,Thunder as S}from"./zeus/index.js";export*from"./error.js";import{Selector as U}from"./zeus";export{i as BaseClient,f as FileContentType,u as InfuraNetwork,n as Lang,m as MailType,c as PayInputType,x as PlanKind,y as Rights,U as Selector,M as SortApplications,S as Thunder,d as UserRole};
2
- //# sourceMappingURL=index.js.map