@candypoets/nipworker 0.94.0 → 0.96.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 (43) hide show
  1. package/dist/NarrowTypes.js +91 -87
  2. package/dist/cache/index.js +136 -128
  3. package/dist/cache/pkg/cache.d.ts +3 -3
  4. package/dist/cache/pkg/cache_bg.wasm.d.ts +3 -3
  5. package/dist/connections/index.js +68 -58
  6. package/dist/connections/pkg/connections.d.ts +4 -4
  7. package/dist/connections/pkg/connections_bg.wasm.d.ts +4 -4
  8. package/dist/connections/proxy.js +1 -1
  9. package/dist/connections/proxy.js.map +4 -4
  10. package/dist/crypto/index.js +86 -77
  11. package/dist/generated/nostr/fb/content-block.d.ts +3 -2
  12. package/dist/generated/nostr/fb/content-block.d.ts.map +1 -1
  13. package/dist/generated/nostr/fb/content-data.d.ts +5 -3
  14. package/dist/generated/nostr/fb/content-data.d.ts.map +1 -1
  15. package/dist/generated/nostr/fb/emoji-data.d.ts +30 -0
  16. package/dist/generated/nostr/fb/emoji-data.d.ts.map +1 -0
  17. package/dist/generated/nostr/fb/kind1018-parsed.d.ts +37 -0
  18. package/dist/generated/nostr/fb/kind1018-parsed.d.ts.map +1 -0
  19. package/dist/generated/nostr/fb/kind1068-parsed.d.ts +58 -0
  20. package/dist/generated/nostr/fb/kind1068-parsed.d.ts.map +1 -0
  21. package/dist/generated/nostr/fb/parsed-data-union.d.ts +2 -0
  22. package/dist/generated/nostr/fb/parsed-data-union.d.ts.map +1 -1
  23. package/dist/generated/nostr/fb/parsed-data.d.ts +17 -13
  24. package/dist/generated/nostr/fb/parsed-data.d.ts.map +1 -1
  25. package/dist/generated/nostr/fb/parsed-event.d.ts +4 -2
  26. package/dist/generated/nostr/fb/parsed-event.d.ts.map +1 -1
  27. package/dist/generated/nostr/fb/poll-option.d.ts +26 -0
  28. package/dist/generated/nostr/fb/poll-option.d.ts.map +1 -0
  29. package/dist/generated/nostr/fb/poll-type.d.ts +5 -0
  30. package/dist/generated/nostr/fb/poll-type.d.ts.map +1 -0
  31. package/dist/generated/nostr/fb.d.ts +5 -0
  32. package/dist/generated/nostr/fb.d.ts.map +1 -1
  33. package/dist/index.js +159 -150
  34. package/dist/index2.js +31 -31
  35. package/dist/lib/ConnectionTracker.d.ts +2 -0
  36. package/dist/lib/ConnectionTracker.d.ts.map +1 -1
  37. package/dist/lib/NarrowTypes.d.ts +2 -1
  38. package/dist/lib/NarrowTypes.d.ts.map +1 -1
  39. package/dist/parser/index.js +51 -52
  40. package/dist/relayProxyServer.js +298 -352
  41. package/dist/utils.js +91 -86
  42. package/dist/worker-message.js +1148 -759
  43. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { M as d, C as M, E as H, a as I, B as R, V as S, P as x, N as j, b as e, K as u, c as i, d as l, e as p, f as K, g as o, h as f, i as P, j as c, k as w, l as y, m as T, n as D, o as C, p as E, q as N, r as G, s as h, t as L, L as V, u as B, v as s, w as q, H as z, x as A, I as g, y as J, z as O, A as Q, D as U, F as W } from "./worker-message.js";
1
+ import { M as d, C as M, E as j, a as H, B as I, V as R, P as S, N as m, b as e, K as u, c as i, d as l, e as p, f as o, g as K, h as f, i as P, j as c, k as w, l as y, m as T, n as D, o as C, p as E, q as N, r as G, s as h, t as L, L as V, u as B, v as s, w as x, H as q, x as z, I as A, y as g, z as J, A as O, D as Q, F as U, G as W } from "./worker-message.js";
2
2
  import "flatbuffers";
3
3
  function X(n) {
4
4
  return n.type() !== d.ConnectionStatus ? null : n.content(new M()) ?? null;
5
5
  }
6
- const nn = X;
6
+ const en = X;
7
7
  function Y(n) {
8
- return n.type() !== d.Eoce ? null : n.content(new H()) ?? null;
8
+ return n.type() !== d.Eoce ? null : n.content(new j()) ?? null;
9
9
  }
10
- const en = Y;
10
+ const an = Y;
11
11
  function Z(n) {
12
- return n.type() !== d.CountResponse ? null : n.content(new I()) ?? null;
12
+ return n.type() !== d.CountResponse ? null : n.content(new H()) ?? null;
13
13
  }
14
- const an = Z;
14
+ const rn = Z;
15
15
  function _(n) {
16
- return n.type() !== d.BufferFull ? null : n.content(new R()) ?? null;
16
+ return n.type() !== d.BufferFull ? null : n.content(new I()) ?? null;
17
17
  }
18
- const rn = _;
18
+ const sn = _;
19
19
  function $(n) {
20
- return n.type() !== d.ValidProofs ? null : n.content(new S()) ?? null;
20
+ return n.type() !== d.ValidProofs ? null : n.content(new R()) ?? null;
21
21
  }
22
- const sn = $;
22
+ const dn = $;
23
23
  function F(n) {
24
- return n.type() !== d.ParsedNostrEvent ? null : n.content(new x()) ?? null;
24
+ return n.type() !== d.ParsedNostrEvent ? null : n.content(new S()) ?? null;
25
25
  }
26
- const dn = F, m = (n) => n.type() !== d.NostrEvent ? null : n.content(new j()) ?? null, tn = m;
26
+ const tn = F, k = (n) => n.type() !== d.NostrEvent ? null : n.content(new m()) ?? null, un = k;
27
27
  function r(n, t) {
28
28
  if (!n) return null;
29
29
  const a = F(n);
@@ -38,9 +38,9 @@ function r(n, t) {
38
38
  case e.Kind4Parsed:
39
39
  return a.parsed(new p());
40
40
  case e.Kind6Parsed:
41
- return a.parsed(new K());
42
- case e.Kind7Parsed:
43
41
  return a.parsed(new o());
42
+ case e.Kind7Parsed:
43
+ return a.parsed(new K());
44
44
  case e.Kind17Parsed:
45
45
  return a.parsed(new f());
46
46
  case e.Kind20Parsed:
@@ -77,70 +77,70 @@ function r(n, t) {
77
77
  return null;
78
78
  }
79
79
  }
80
- function un(n) {
80
+ function ln(n) {
81
81
  return r(n, e.Kind0Parsed);
82
82
  }
83
- function ln(n) {
83
+ function pn(n) {
84
84
  return !n || n.parsedType() !== e.Kind0Parsed ? null : n.parsed(new u()) ?? null;
85
85
  }
86
- function pn(n) {
86
+ function on(n) {
87
87
  return r(n, e.Kind1Parsed);
88
88
  }
89
89
  function Kn(n) {
90
90
  return n.parsedType() !== e.Kind1Parsed ? null : n.parsed(new i()) ?? null;
91
91
  }
92
- function on(n) {
93
- return r(n, e.Kind3Parsed);
94
- }
95
92
  function fn(n) {
96
- return n.parsedType() !== e.Kind3Parsed ? null : n.parsed(new l()) ?? null;
93
+ return r(n, e.Kind3Parsed);
97
94
  }
98
95
  function Pn(n) {
99
- return r(n, e.Kind4Parsed);
96
+ return n.parsedType() !== e.Kind3Parsed ? null : n.parsed(new l()) ?? null;
100
97
  }
101
98
  function cn(n) {
102
- return n.parsedType() !== e.Kind4Parsed ? null : n.parsed(new p()) ?? null;
99
+ return r(n, e.Kind4Parsed);
103
100
  }
104
101
  function wn(n) {
105
- return r(n, e.Kind6Parsed);
102
+ return n.parsedType() !== e.Kind4Parsed ? null : n.parsed(new p()) ?? null;
106
103
  }
107
104
  function yn(n) {
108
- return n.parsedType() !== e.Kind6Parsed ? null : n.parsed(new K()) ?? null;
105
+ return r(n, e.Kind6Parsed);
109
106
  }
110
107
  function Tn(n) {
111
- return r(n, e.Kind7Parsed);
108
+ return n.parsedType() !== e.Kind6Parsed ? null : n.parsed(new o()) ?? null;
112
109
  }
113
110
  function Dn(n) {
114
- return n.parsedType() !== e.Kind7Parsed ? null : n.parsed(new o()) ?? null;
111
+ return r(n, e.Kind7Parsed);
115
112
  }
116
113
  function Cn(n) {
117
- return r(n, e.Kind17Parsed);
114
+ return n.parsedType() !== e.Kind7Parsed ? null : n.parsed(new K()) ?? null;
118
115
  }
119
116
  function En(n) {
120
- return n.parsedType() !== e.Kind17Parsed ? null : n.parsed(new f()) ?? null;
117
+ return r(n, e.Kind17Parsed);
121
118
  }
122
119
  function Nn(n) {
123
- return r(n, e.Kind20Parsed);
120
+ return n.parsedType() !== e.Kind17Parsed ? null : n.parsed(new f()) ?? null;
124
121
  }
125
122
  function Gn(n) {
126
- return n.parsedType() !== e.Kind20Parsed ? null : n.parsed(new P()) ?? null;
123
+ return r(n, e.Kind20Parsed);
127
124
  }
128
125
  function hn(n) {
129
- return r(n, e.Kind22Parsed);
126
+ return n.parsedType() !== e.Kind20Parsed ? null : n.parsed(new P()) ?? null;
130
127
  }
131
128
  function Ln(n) {
132
- return n.parsedType() !== e.Kind22Parsed ? null : n.parsed(new c()) ?? null;
129
+ return r(n, e.Kind22Parsed);
133
130
  }
134
131
  function Vn(n) {
135
- return r(n, e.Kind1111Parsed);
132
+ return n.parsedType() !== e.Kind22Parsed ? null : n.parsed(new c()) ?? null;
136
133
  }
137
134
  function Bn(n) {
138
- return n.parsedType() !== e.Kind1111Parsed ? null : n.parsed(new w()) ?? null;
135
+ return r(n, e.Kind1111Parsed);
139
136
  }
140
137
  function Fn(n) {
141
- return r(n, e.Kind1311Parsed);
138
+ return n.parsedType() !== e.Kind1111Parsed ? null : n.parsed(new w()) ?? null;
142
139
  }
143
140
  function Mn(n) {
141
+ return r(n, e.Kind1311Parsed);
142
+ }
143
+ function jn(n) {
144
144
  return n.parsedType() !== e.Kind1311Parsed ? null : n.parsed(new y()) ?? null;
145
145
  }
146
146
  function Hn(n) {
@@ -155,10 +155,10 @@ function Rn(n) {
155
155
  function Sn(n) {
156
156
  return n.parsedType() !== e.Kind10019Parsed ? null : n.parsed(new D()) ?? null;
157
157
  }
158
- function xn(n) {
158
+ function mn(n) {
159
159
  return r(n, e.Kind17375Parsed);
160
160
  }
161
- function jn(n) {
161
+ function xn(n) {
162
162
  return n.parsedType() !== e.Kind17375Parsed ? null : n.parsed(new C()) ?? null;
163
163
  }
164
164
  function qn(n) {
@@ -203,48 +203,51 @@ function _n(n) {
203
203
  function $n(n) {
204
204
  return n.parsedType() !== e.PreGenericParsed ? null : n.parsed(new B()) ?? null;
205
205
  }
206
- function mn(n) {
207
- return n.dataType() !== s.CodeData ? null : n.data(new q()) ?? null;
208
- }
209
206
  function kn(n) {
210
- return n.dataType() !== s.HashtagData ? null : n.data(new z()) ?? null;
207
+ return n.dataType() !== s.CodeData ? null : n.data(new x()) ?? null;
211
208
  }
212
209
  function bn(n) {
213
- return n.dataType() !== s.CashuData ? null : n.data(new A()) ?? null;
210
+ return n.dataType() !== s.HashtagData ? null : n.data(new q()) ?? null;
214
211
  }
215
212
  function vn(n) {
216
- return n.dataType() !== s.ImageData ? null : n.data(new g()) ?? null;
213
+ return n.dataType() !== s.CashuData ? null : n.data(new z()) ?? null;
217
214
  }
218
215
  function ne(n) {
219
- return n.dataType() !== s.VideoData ? null : n.data(new J()) ?? null;
216
+ return n.dataType() !== s.ImageData ? null : n.data(new A()) ?? null;
220
217
  }
221
218
  function ee(n) {
222
- return n.dataType() !== s.MediaGroupData ? null : n.data(new O()) ?? null;
219
+ return n.dataType() !== s.VideoData ? null : n.data(new g()) ?? null;
223
220
  }
224
221
  function ae(n) {
225
- return n.dataType() !== s.NostrData ? null : n.data(new Q()) ?? null;
222
+ return n.dataType() !== s.MediaGroupData ? null : n.data(new J()) ?? null;
226
223
  }
227
224
  function re(n) {
228
- return n.dataType() !== s.LinkPreviewData ? null : n.data(new U()) ?? null;
225
+ return n.dataType() !== s.NostrData ? null : n.data(new O()) ?? null;
226
+ }
227
+ function se(n) {
228
+ return n.dataType() !== s.LinkPreviewData ? null : n.data(new Q()) ?? null;
229
+ }
230
+ function de(n) {
231
+ return n.dataType() !== s.EmojiData ? null : n.data(new U()) ?? null;
229
232
  }
230
233
  export {
231
234
  Zn as $,
232
- Cn as A,
233
- En as B,
234
- Nn as C,
235
- Gn as D,
236
- hn as E,
237
- Ln as F,
238
- Vn as G,
239
- Bn as H,
240
- Fn as I,
241
- Mn as J,
235
+ En as A,
236
+ Nn as B,
237
+ Gn as C,
238
+ hn as D,
239
+ Ln as E,
240
+ Vn as F,
241
+ Bn as G,
242
+ Fn as H,
243
+ Mn as I,
244
+ jn as J,
242
245
  Hn as K,
243
246
  In as L,
244
247
  Rn as M,
245
248
  Sn as N,
246
- xn as O,
247
- jn as P,
249
+ mn as O,
250
+ xn as P,
248
251
  qn as Q,
249
252
  zn as R,
250
253
  An as S,
@@ -256,40 +259,41 @@ export {
256
259
  Wn as Y,
257
260
  Xn as Z,
258
261
  Yn as _,
259
- m as a,
262
+ k as a,
260
263
  _n as a0,
261
264
  $n as a1,
262
- mn as a2,
263
- kn as a3,
264
- bn as a4,
265
- vn as a5,
266
- ne as a6,
267
- ee as a7,
268
- ae as a8,
269
- re as a9,
265
+ kn as a2,
266
+ bn as a3,
267
+ vn as a4,
268
+ ne as a5,
269
+ ee as a6,
270
+ ae as a7,
271
+ re as a8,
272
+ se as a9,
273
+ de as aa,
270
274
  X as b,
271
275
  Y as c,
272
- dn as d,
273
- tn as e,
274
- nn as f,
275
- en as g,
276
+ tn as d,
277
+ un as e,
278
+ en as f,
279
+ an as g,
276
280
  Z as h,
277
281
  F as i,
278
- an as j,
282
+ rn as j,
279
283
  _ as k,
280
- rn as l,
284
+ sn as l,
281
285
  $ as m,
282
- sn as n,
283
- un as o,
284
- ln as p,
285
- pn as q,
286
+ dn as n,
287
+ ln as o,
288
+ pn as p,
289
+ on as q,
286
290
  Kn as r,
287
- on as s,
288
- fn as t,
289
- Pn as u,
290
- cn as v,
291
- wn as w,
292
- yn as x,
293
- Tn as y,
294
- Dn as z
291
+ fn as s,
292
+ Pn as t,
293
+ cn as u,
294
+ wn as v,
295
+ yn as w,
296
+ Tn as x,
297
+ Dn as y,
298
+ Cn as z
295
299
  };