@qvac/core 0.1.6 → 0.1.8

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 (34) hide show
  1. package/README.md +10 -5
  2. package/dist-lib/lib/api/chat-groups.d.ts +1 -1
  3. package/dist-lib/lib/api/chat-groups.js +6 -3
  4. package/dist-lib/lib/core/chat-group.d.ts +5 -0
  5. package/dist-lib/lib/core/chat-group.js +63 -1
  6. package/dist-lib/lib/core/chat.d.ts +10 -0
  7. package/dist-lib/lib/core/chat.js +75 -9
  8. package/dist-lib/lib/core/mesh.js +2 -1
  9. package/dist-lib/lib/core/rank.d.ts +14 -0
  10. package/dist-lib/lib/core/rank.js +23 -0
  11. package/dist-lib/schema/content.js +5 -1
  12. package/dist-lib/schema/engine.js +30 -0
  13. package/dist-lib/schema/field-order.js +3 -1
  14. package/dist-lib/schema/qvac.js +5 -2
  15. package/dist-lib/spec/bind.js +9 -0
  16. package/dist-lib/spec/calls.js +31 -28
  17. package/dist-lib/spec/capabilities.d.ts +6 -0
  18. package/dist-lib/spec/hrpc/hrpc.json +39 -0
  19. package/dist-lib/spec/hrpc/index.js +39 -3
  20. package/dist-lib/spec/hrpc/messages.js +85 -46
  21. package/dist-lib/spec/hyperschema/index.js +85 -46
  22. package/dist-lib/spec/hyperschema/schema.json +56 -1
  23. package/dist-lib/spec/hyperschema/types.d.ts +14 -1
  24. package/dist-lib/spec/local/hyperdb/messages.js +48 -96
  25. package/dist-lib/spec/local/hyperschema/index.js +24 -48
  26. package/dist-lib/spec/local/hyperschema/schema.json +12 -0
  27. package/dist-lib/spec/mesh/hyperdb/messages.js +177 -296
  28. package/dist-lib/spec/mesh/hyperdispatch/messages.js +126 -222
  29. package/dist-lib/spec/mesh/hyperschema/index.js +126 -222
  30. package/dist-lib/spec/mesh/hyperschema/schema.json +71 -1
  31. package/dist-lib/spec/mesh/hyperschema/types.d.ts +4 -1
  32. package/package.json +12 -11
  33. package/tui/app.mjs +95 -23
  34. package/tui/lib/sidebar.mjs +3 -2
@@ -49,12 +49,11 @@ const encoding1 = {
49
49
  if (m.value) c.json.encode(state, m.value)
50
50
  },
51
51
  decode(state) {
52
- const v = c.uint.decode(state)
53
52
  const r0 = c.string.decode(state)
54
53
  const flags = c.uint.decode(state)
55
54
 
56
55
  return {
57
- version: v,
56
+ version: 0,
58
57
  key: r0,
59
58
  value: (flags & 1) !== 0 ? c.json.decode(state) : null
60
59
  }
@@ -88,13 +87,12 @@ const encoding2 = {
88
87
  }
89
88
  },
90
89
  decode(state) {
91
- const start = state.start
92
90
  const v = c.uint.decode(state)
93
- state.start = start
94
91
  switch (v) {
95
92
  case 0:
96
93
  case 1: {
97
94
  const decoded = encoding1.decode(state)
95
+ decoded.version = v
98
96
  return decoded
99
97
  }
100
98
  default:
@@ -122,12 +120,11 @@ const encoding3 = {
122
120
  if (m.meshSeed) c.buffer.encode(state, m.meshSeed)
123
121
  },
124
122
  decode(state) {
125
- const v = c.uint.decode(state)
126
123
  const r0 = c.buffer.decode(state)
127
124
  const flags = c.uint.decode(state)
128
125
 
129
126
  return {
130
- version: v,
127
+ version: 0,
131
128
  deviceId: r0,
132
129
  meshCreator: (flags & 1) !== 0,
133
130
  meshKey: (flags & 2) !== 0 ? c.buffer.decode(state) : null,
@@ -163,13 +160,12 @@ const encoding4 = {
163
160
  }
164
161
  },
165
162
  decode(state) {
166
- const start = state.start
167
163
  const v = c.uint.decode(state)
168
- state.start = start
169
164
  switch (v) {
170
165
  case 0:
171
166
  case 1: {
172
167
  const decoded = encoding3.decode(state)
168
+ decoded.version = v
173
169
  return decoded
174
170
  }
175
171
  default:
@@ -197,13 +193,12 @@ const encoding5 = {
197
193
  if (m.writerSeed) c.string.encode(state, m.writerSeed)
198
194
  },
199
195
  decode(state) {
200
- const v = c.uint.decode(state)
201
196
  const r0 = c.buffer.decode(state)
202
197
  const r1 = c.buffer.decode(state)
203
198
  const flags = c.uint.decode(state)
204
199
 
205
200
  return {
206
- version: v,
201
+ version: 0,
207
202
  key: r0,
208
203
  seed: r1,
209
204
  creator: (flags & 1) !== 0,
@@ -239,13 +234,12 @@ const encoding6 = {
239
234
  }
240
235
  },
241
236
  decode(state) {
242
- const start = state.start
243
237
  const v = c.uint.decode(state)
244
- state.start = start
245
238
  switch (v) {
246
239
  case 0:
247
240
  case 1: {
248
241
  const decoded = encoding5.decode(state)
242
+ decoded.version = v
249
243
  return decoded
250
244
  }
251
245
  default:
@@ -277,7 +271,6 @@ const encoding7 = {
277
271
  if (version >= 2 && m.platform) c.string.encode(state, m.platform)
278
272
  },
279
273
  decode(state) {
280
- const v = c.uint.decode(state)
281
274
  const r0 = c.buffer.decode(state)
282
275
  const r1 = c.string.decode(state)
283
276
  const r2 = encoding14.decode(state)
@@ -285,7 +278,7 @@ const encoding7 = {
285
278
  const flags = state.start < state.end ? c.uint.decode(state) : 0
286
279
 
287
280
  return {
288
- version: v,
281
+ version: 0,
289
282
  publicKey: r0,
290
283
  name: r1,
291
284
  capabilityProfile: r2,
@@ -322,13 +315,12 @@ const encoding8 = {
322
315
  }
323
316
  },
324
317
  decode(state) {
325
- const start = state.start
326
318
  const v = c.uint.decode(state)
327
- state.start = start
328
319
  switch (v) {
329
320
  case 0:
330
321
  case 1: {
331
322
  const decoded = encoding7.decode(state)
323
+ decoded.version = v
332
324
  return decoded
333
325
  }
334
326
  default:
@@ -385,12 +377,11 @@ const encoding9 = {
385
377
  if (m.pausedModels) encoding9_8.encode(state, m.pausedModels)
386
378
  },
387
379
  decode(state) {
388
- const v = c.uint.decode(state)
389
380
  const r0 = c.string.decode(state)
390
381
  const flags = c.uint.decode(state)
391
382
 
392
383
  return {
393
- version: v,
384
+ version: 0,
394
385
  id: r0,
395
386
  activeAgentId: (flags & 1) !== 0 ? c.string.decode(state) : null,
396
387
  activeChatId: (flags & 2) !== 0 ? c.string.decode(state) : null,
@@ -431,13 +422,12 @@ const encoding10 = {
431
422
  }
432
423
  },
433
424
  decode(state) {
434
- const start = state.start
435
425
  const v = c.uint.decode(state)
436
- state.start = start
437
426
  switch (v) {
438
427
  case 0:
439
428
  case 1: {
440
429
  const decoded = encoding9.decode(state)
430
+ decoded.version = v
441
431
  return decoded
442
432
  }
443
433
  default:
@@ -525,13 +515,12 @@ const encoding12 = {
525
515
  if (m.bytesPerSecond) c.uint.encode(state, m.bytesPerSecond)
526
516
  },
527
517
  decode(state) {
528
- const v = c.uint.decode(state)
529
518
  const r0 = c.string.decode(state)
530
519
  const r1 = encoding11.decode(state)
531
520
  const flags = c.uint.decode(state)
532
521
 
533
522
  return {
534
- version: v,
523
+ version: 0,
535
524
  name: r0,
536
525
  phase: r1,
537
526
  percentage: (flags & 1) !== 0 ? c.uint.decode(state) : 0,
@@ -571,13 +560,12 @@ const encoding13 = {
571
560
  }
572
561
  },
573
562
  decode(state) {
574
- const start = state.start
575
563
  const v = c.uint.decode(state)
576
- state.start = start
577
564
  switch (v) {
578
565
  case 0:
579
566
  case 1: {
580
567
  const decoded = encoding12.decode(state)
568
+ decoded.version = v
581
569
  return decoded
582
570
  }
583
571
  default:
@@ -665,13 +653,12 @@ const encoding15 = {
665
653
  c.uint.encode(state, m.createdAt)
666
654
  },
667
655
  decode(state) {
668
- const v = c.uint.decode(state)
669
656
  const r0 = c.string.decode(state)
670
657
  const r1 = c.string.decode(state)
671
658
  const flags = c.uint.decode(state)
672
659
 
673
660
  return {
674
- version: v,
661
+ version: 0,
675
662
  name: r0,
676
663
  src: r1,
677
664
  mmprojSrc: (version >= 2 && (flags & 1) !== 0) ? c.string.decode(state) : null,
@@ -711,13 +698,12 @@ const encoding16 = {
711
698
  }
712
699
  },
713
700
  decode(state) {
714
- const start = state.start
715
701
  const v = c.uint.decode(state)
716
- state.start = start
717
702
  switch (v) {
718
703
  case 0:
719
704
  case 1: {
720
705
  const decoded = encoding15.decode(state)
706
+ decoded.version = v
721
707
  return decoded
722
708
  }
723
709
  default:
@@ -741,14 +727,13 @@ const encoding17 = {
741
727
  c.uint.encode(state, m.createdAt)
742
728
  },
743
729
  decode(state) {
744
- const v = c.uint.decode(state)
745
730
  const r0 = c.string.decode(state)
746
731
  const r1 = c.buffer.decode(state)
747
732
  const r2 = c.buffer.decode(state)
748
733
  const r3 = c.uint.decode(state)
749
734
 
750
735
  return {
751
- version: v,
736
+ version: 0,
752
737
  id: r0,
753
738
  publicKey: r1,
754
739
  proof: r2,
@@ -784,13 +769,12 @@ const encoding18 = {
784
769
  }
785
770
  },
786
771
  decode(state) {
787
- const start = state.start
788
772
  const v = c.uint.decode(state)
789
- state.start = start
790
773
  switch (v) {
791
774
  case 0:
792
775
  case 1: {
793
776
  const decoded = encoding17.decode(state)
777
+ decoded.version = v
794
778
  return decoded
795
779
  }
796
780
  default:
@@ -814,14 +798,13 @@ const encoding19 = {
814
798
  c.uint.encode(state, m.attestedAt)
815
799
  },
816
800
  decode(state) {
817
- const v = c.uint.decode(state)
818
801
  const r0 = c.string.decode(state)
819
802
  const r1 = c.fixed32.decode(state)
820
803
  const r2 = c.buffer.decode(state)
821
804
  const r3 = c.uint.decode(state)
822
805
 
823
806
  return {
824
- version: v,
807
+ version: 0,
825
808
  id: r0,
826
809
  memberId: r1,
827
810
  proof: r2,
@@ -857,13 +840,12 @@ const encoding20 = {
857
840
  }
858
841
  },
859
842
  decode(state) {
860
- const start = state.start
861
843
  const v = c.uint.decode(state)
862
- state.start = start
863
844
  switch (v) {
864
845
  case 0:
865
846
  case 1: {
866
847
  const decoded = encoding19.decode(state)
848
+ decoded.version = v
867
849
  return decoded
868
850
  }
869
851
  default:
@@ -883,12 +865,11 @@ const encoding21 = {
883
865
  c.uint.encode(state, m.ackedThrough)
884
866
  },
885
867
  decode(state) {
886
- const v = c.uint.decode(state)
887
868
  const r0 = c.string.decode(state)
888
869
  const r1 = c.uint.decode(state)
889
870
 
890
871
  return {
891
- version: v,
872
+ version: 0,
892
873
  chatId: r0,
893
874
  ackedThrough: r1
894
875
  }
@@ -922,13 +903,12 @@ const encoding22 = {
922
903
  }
923
904
  },
924
905
  decode(state) {
925
- const start = state.start
926
906
  const v = c.uint.decode(state)
927
- state.start = start
928
907
  switch (v) {
929
908
  case 0:
930
909
  case 1: {
931
910
  const decoded = encoding21.decode(state)
911
+ decoded.version = v
932
912
  return decoded
933
913
  }
934
914
  default:
@@ -962,13 +942,12 @@ const encoding23 = {
962
942
  if (version >= 4 && m.completedAt) c.uint.encode(state, m.completedAt)
963
943
  },
964
944
  decode(state) {
965
- const v = c.uint.decode(state)
966
945
  const r0 = c.string.decode(state)
967
946
  const r1 = c.string.decode(state)
968
947
  const flags = c.uint.decode(state)
969
948
 
970
949
  return {
971
- version: v,
950
+ version: 0,
972
951
  name: r0,
973
952
  transferId: r1,
974
953
  notificationId: (version >= 4 && (flags & 1) !== 0) ? c.string.decode(state) : null,
@@ -1006,13 +985,12 @@ const encoding24 = {
1006
985
  }
1007
986
  },
1008
987
  decode(state) {
1009
- const start = state.start
1010
988
  const v = c.uint.decode(state)
1011
- state.start = start
1012
989
  switch (v) {
1013
990
  case 0:
1014
991
  case 1: {
1015
992
  const decoded = encoding23.decode(state)
993
+ decoded.version = v
1016
994
  return decoded
1017
995
  }
1018
996
  default:
@@ -1040,13 +1018,12 @@ const encoding25 = {
1040
1018
  if (version >= 4 && m.writerSeed) c.string.encode(state, m.writerSeed)
1041
1019
  },
1042
1020
  decode(state) {
1043
- const v = c.uint.decode(state)
1044
1021
  const r0 = c.buffer.decode(state)
1045
1022
  const r1 = c.buffer.decode(state)
1046
1023
  const flags = c.uint.decode(state)
1047
1024
 
1048
1025
  return {
1049
- version: v,
1026
+ version: 0,
1050
1027
  key: r0,
1051
1028
  seed: r1,
1052
1029
  creator: (version >= 4 && (flags & 1) !== 0),
@@ -1082,13 +1059,12 @@ const encoding26 = {
1082
1059
  }
1083
1060
  },
1084
1061
  decode(state) {
1085
- const start = state.start
1086
1062
  const v = c.uint.decode(state)
1087
- state.start = start
1088
1063
  switch (v) {
1089
1064
  case 0:
1090
1065
  case 1: {
1091
1066
  const decoded = encoding25.decode(state)
1067
+ decoded.version = v
1092
1068
  return decoded
1093
1069
  }
1094
1070
  default:
@@ -1112,11 +1088,10 @@ const encoding27 = {
1112
1088
  if (m.value) c.json.encode(state, m.value)
1113
1089
  },
1114
1090
  decode(state) {
1115
- const v = c.uint.decode(state)
1116
1091
  const flags = c.uint.decode(state)
1117
1092
 
1118
1093
  return {
1119
- version: v,
1094
+ version: 0,
1120
1095
  key: null,
1121
1096
  value: (flags & 1) !== 0 ? c.json.decode(state) : null
1122
1097
  }
@@ -1150,13 +1125,12 @@ const encoding28 = {
1150
1125
  }
1151
1126
  },
1152
1127
  decode(state) {
1153
- const start = state.start
1154
1128
  const v = c.uint.decode(state)
1155
- state.start = start
1156
1129
  switch (v) {
1157
1130
  case 0:
1158
1131
  case 1: {
1159
1132
  const decoded = encoding27.decode(state)
1133
+ decoded.version = v
1160
1134
  return decoded
1161
1135
  }
1162
1136
  default:
@@ -1182,11 +1156,10 @@ const encoding29 = {
1182
1156
  if (m.meshSeed) c.buffer.encode(state, m.meshSeed)
1183
1157
  },
1184
1158
  decode(state) {
1185
- const v = c.uint.decode(state)
1186
1159
  const flags = c.uint.decode(state)
1187
1160
 
1188
1161
  return {
1189
- version: v,
1162
+ version: 0,
1190
1163
  deviceId: null,
1191
1164
  meshCreator: (flags & 1) !== 0,
1192
1165
  meshKey: (flags & 2) !== 0 ? c.buffer.decode(state) : null,
@@ -1222,13 +1195,12 @@ const encoding30 = {
1222
1195
  }
1223
1196
  },
1224
1197
  decode(state) {
1225
- const start = state.start
1226
1198
  const v = c.uint.decode(state)
1227
- state.start = start
1228
1199
  switch (v) {
1229
1200
  case 0:
1230
1201
  case 1: {
1231
1202
  const decoded = encoding29.decode(state)
1203
+ decoded.version = v
1232
1204
  return decoded
1233
1205
  }
1234
1206
  default:
@@ -1254,12 +1226,11 @@ const encoding31 = {
1254
1226
  if (m.writerSeed) c.string.encode(state, m.writerSeed)
1255
1227
  },
1256
1228
  decode(state) {
1257
- const v = c.uint.decode(state)
1258
1229
  const r1 = c.buffer.decode(state)
1259
1230
  const flags = c.uint.decode(state)
1260
1231
 
1261
1232
  return {
1262
- version: v,
1233
+ version: 0,
1263
1234
  key: null,
1264
1235
  seed: r1,
1265
1236
  creator: (flags & 1) !== 0,
@@ -1295,13 +1266,12 @@ const encoding32 = {
1295
1266
  }
1296
1267
  },
1297
1268
  decode(state) {
1298
- const start = state.start
1299
1269
  const v = c.uint.decode(state)
1300
- state.start = start
1301
1270
  switch (v) {
1302
1271
  case 0:
1303
1272
  case 1: {
1304
1273
  const decoded = encoding31.decode(state)
1274
+ decoded.version = v
1305
1275
  return decoded
1306
1276
  }
1307
1277
  default:
@@ -1331,14 +1301,13 @@ const encoding33 = {
1331
1301
  if (version >= 2 && m.platform) c.string.encode(state, m.platform)
1332
1302
  },
1333
1303
  decode(state) {
1334
- const v = c.uint.decode(state)
1335
1304
  const r1 = c.string.decode(state)
1336
1305
  const r2 = encoding14.decode(state)
1337
1306
  const r3 = c.string.decode(state)
1338
1307
  const flags = state.start < state.end ? c.uint.decode(state) : 0
1339
1308
 
1340
1309
  return {
1341
- version: v,
1310
+ version: 0,
1342
1311
  publicKey: null,
1343
1312
  name: r1,
1344
1313
  capabilityProfile: r2,
@@ -1375,13 +1344,12 @@ const encoding34 = {
1375
1344
  }
1376
1345
  },
1377
1346
  decode(state) {
1378
- const start = state.start
1379
1347
  const v = c.uint.decode(state)
1380
- state.start = start
1381
1348
  switch (v) {
1382
1349
  case 0:
1383
1350
  case 1: {
1384
1351
  const decoded = encoding33.decode(state)
1352
+ decoded.version = v
1385
1353
  return decoded
1386
1354
  }
1387
1355
  default:
@@ -1436,11 +1404,10 @@ const encoding35 = {
1436
1404
  if (m.pausedModels) encoding35_8.encode(state, m.pausedModels)
1437
1405
  },
1438
1406
  decode(state) {
1439
- const v = c.uint.decode(state)
1440
1407
  const flags = c.uint.decode(state)
1441
1408
 
1442
1409
  return {
1443
- version: v,
1410
+ version: 0,
1444
1411
  id: null,
1445
1412
  activeAgentId: (flags & 1) !== 0 ? c.string.decode(state) : null,
1446
1413
  activeChatId: (flags & 2) !== 0 ? c.string.decode(state) : null,
@@ -1481,13 +1448,12 @@ const encoding36 = {
1481
1448
  }
1482
1449
  },
1483
1450
  decode(state) {
1484
- const start = state.start
1485
1451
  const v = c.uint.decode(state)
1486
- state.start = start
1487
1452
  switch (v) {
1488
1453
  case 0:
1489
1454
  case 1: {
1490
1455
  const decoded = encoding35.decode(state)
1456
+ decoded.version = v
1491
1457
  return decoded
1492
1458
  }
1493
1459
  default:
@@ -1528,12 +1494,11 @@ const encoding37 = {
1528
1494
  if (m.bytesPerSecond) c.uint.encode(state, m.bytesPerSecond)
1529
1495
  },
1530
1496
  decode(state) {
1531
- const v = c.uint.decode(state)
1532
1497
  const r1 = encoding11.decode(state)
1533
1498
  const flags = c.uint.decode(state)
1534
1499
 
1535
1500
  return {
1536
- version: v,
1501
+ version: 0,
1537
1502
  name: null,
1538
1503
  phase: r1,
1539
1504
  percentage: (flags & 1) !== 0 ? c.uint.decode(state) : 0,
@@ -1573,13 +1538,12 @@ const encoding38 = {
1573
1538
  }
1574
1539
  },
1575
1540
  decode(state) {
1576
- const start = state.start
1577
1541
  const v = c.uint.decode(state)
1578
- state.start = start
1579
1542
  switch (v) {
1580
1543
  case 0:
1581
1544
  case 1: {
1582
1545
  const decoded = encoding37.decode(state)
1546
+ decoded.version = v
1583
1547
  return decoded
1584
1548
  }
1585
1549
  default:
@@ -1614,12 +1578,11 @@ const encoding39 = {
1614
1578
  c.uint.encode(state, m.createdAt)
1615
1579
  },
1616
1580
  decode(state) {
1617
- const v = c.uint.decode(state)
1618
1581
  const r1 = c.string.decode(state)
1619
1582
  const flags = c.uint.decode(state)
1620
1583
 
1621
1584
  return {
1622
- version: v,
1585
+ version: 0,
1623
1586
  name: null,
1624
1587
  src: r1,
1625
1588
  mmprojSrc: (version >= 2 && (flags & 1) !== 0) ? c.string.decode(state) : null,
@@ -1659,13 +1622,12 @@ const encoding40 = {
1659
1622
  }
1660
1623
  },
1661
1624
  decode(state) {
1662
- const start = state.start
1663
1625
  const v = c.uint.decode(state)
1664
- state.start = start
1665
1626
  switch (v) {
1666
1627
  case 0:
1667
1628
  case 1: {
1668
1629
  const decoded = encoding39.decode(state)
1630
+ decoded.version = v
1669
1631
  return decoded
1670
1632
  }
1671
1633
  default:
@@ -1687,13 +1649,12 @@ const encoding41 = {
1687
1649
  c.uint.encode(state, m.createdAt)
1688
1650
  },
1689
1651
  decode(state) {
1690
- const v = c.uint.decode(state)
1691
1652
  const r1 = c.buffer.decode(state)
1692
1653
  const r2 = c.buffer.decode(state)
1693
1654
  const r3 = c.uint.decode(state)
1694
1655
 
1695
1656
  return {
1696
- version: v,
1657
+ version: 0,
1697
1658
  id: null,
1698
1659
  publicKey: r1,
1699
1660
  proof: r2,
@@ -1729,13 +1690,12 @@ const encoding42 = {
1729
1690
  }
1730
1691
  },
1731
1692
  decode(state) {
1732
- const start = state.start
1733
1693
  const v = c.uint.decode(state)
1734
- state.start = start
1735
1694
  switch (v) {
1736
1695
  case 0:
1737
1696
  case 1: {
1738
1697
  const decoded = encoding41.decode(state)
1698
+ decoded.version = v
1739
1699
  return decoded
1740
1700
  }
1741
1701
  default:
@@ -1757,13 +1717,12 @@ const encoding43 = {
1757
1717
  c.uint.encode(state, m.attestedAt)
1758
1718
  },
1759
1719
  decode(state) {
1760
- const v = c.uint.decode(state)
1761
1720
  const r1 = c.fixed32.decode(state)
1762
1721
  const r2 = c.buffer.decode(state)
1763
1722
  const r3 = c.uint.decode(state)
1764
1723
 
1765
1724
  return {
1766
- version: v,
1725
+ version: 0,
1767
1726
  id: null,
1768
1727
  memberId: r1,
1769
1728
  proof: r2,
@@ -1799,13 +1758,12 @@ const encoding44 = {
1799
1758
  }
1800
1759
  },
1801
1760
  decode(state) {
1802
- const start = state.start
1803
1761
  const v = c.uint.decode(state)
1804
- state.start = start
1805
1762
  switch (v) {
1806
1763
  case 0:
1807
1764
  case 1: {
1808
1765
  const decoded = encoding43.decode(state)
1766
+ decoded.version = v
1809
1767
  return decoded
1810
1768
  }
1811
1769
  default:
@@ -1823,11 +1781,10 @@ const encoding45 = {
1823
1781
  c.uint.encode(state, m.ackedThrough)
1824
1782
  },
1825
1783
  decode(state) {
1826
- const v = c.uint.decode(state)
1827
1784
  const r1 = c.uint.decode(state)
1828
1785
 
1829
1786
  return {
1830
- version: v,
1787
+ version: 0,
1831
1788
  chatId: null,
1832
1789
  ackedThrough: r1
1833
1790
  }
@@ -1861,13 +1818,12 @@ const encoding46 = {
1861
1818
  }
1862
1819
  },
1863
1820
  decode(state) {
1864
- const start = state.start
1865
1821
  const v = c.uint.decode(state)
1866
- state.start = start
1867
1822
  switch (v) {
1868
1823
  case 0:
1869
1824
  case 1: {
1870
1825
  const decoded = encoding45.decode(state)
1826
+ decoded.version = v
1871
1827
  return decoded
1872
1828
  }
1873
1829
  default:
@@ -1899,12 +1855,11 @@ const encoding47 = {
1899
1855
  if (version >= 4 && m.completedAt) c.uint.encode(state, m.completedAt)
1900
1856
  },
1901
1857
  decode(state) {
1902
- const v = c.uint.decode(state)
1903
1858
  const r1 = c.string.decode(state)
1904
1859
  const flags = c.uint.decode(state)
1905
1860
 
1906
1861
  return {
1907
- version: v,
1862
+ version: 0,
1908
1863
  name: null,
1909
1864
  transferId: r1,
1910
1865
  notificationId: (version >= 4 && (flags & 1) !== 0) ? c.string.decode(state) : null,
@@ -1942,13 +1897,12 @@ const encoding48 = {
1942
1897
  }
1943
1898
  },
1944
1899
  decode(state) {
1945
- const start = state.start
1946
1900
  const v = c.uint.decode(state)
1947
- state.start = start
1948
1901
  switch (v) {
1949
1902
  case 0:
1950
1903
  case 1: {
1951
1904
  const decoded = encoding47.decode(state)
1905
+ decoded.version = v
1952
1906
  return decoded
1953
1907
  }
1954
1908
  default:
@@ -1974,12 +1928,11 @@ const encoding49 = {
1974
1928
  if (version >= 4 && m.writerSeed) c.string.encode(state, m.writerSeed)
1975
1929
  },
1976
1930
  decode(state) {
1977
- const v = c.uint.decode(state)
1978
1931
  const r1 = c.buffer.decode(state)
1979
1932
  const flags = c.uint.decode(state)
1980
1933
 
1981
1934
  return {
1982
- version: v,
1935
+ version: 0,
1983
1936
  key: null,
1984
1937
  seed: r1,
1985
1938
  creator: (version >= 4 && (flags & 1) !== 0),
@@ -2015,13 +1968,12 @@ const encoding50 = {
2015
1968
  }
2016
1969
  },
2017
1970
  decode(state) {
2018
- const start = state.start
2019
1971
  const v = c.uint.decode(state)
2020
- state.start = start
2021
1972
  switch (v) {
2022
1973
  case 0:
2023
1974
  case 1: {
2024
1975
  const decoded = encoding49.decode(state)
1976
+ decoded.version = v
2025
1977
  return decoded
2026
1978
  }
2027
1979
  default: