vialeys 0.0.1 → 0.0.2

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 (102) hide show
  1. package/README.md +11 -5
  2. package/WAProto/AICommon/AICommon.js +13991 -9169
  3. package/WAProto/AICommon/AICommon.proto +110 -3
  4. package/WAProto/CompanionReg/CompanionReg.js +114 -0
  5. package/WAProto/CompanionReg/CompanionReg.proto +3 -0
  6. package/WAProto/DeviceCapabilities/DeviceCapabilities.js +652 -0
  7. package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +19 -0
  8. package/WAProto/E2E/E2E.js +77193 -51248
  9. package/WAProto/E2E/E2E.proto +68 -12
  10. package/WAProto/HistorySync/HistorySync.js +3375 -178
  11. package/WAProto/HistorySync/HistorySync.proto +3 -3
  12. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +98 -49
  13. package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +2 -2
  14. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +75226 -48422
  15. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +6 -0
  16. package/WAProto/StatusAttributions/StatusAttributions.js +21 -0
  17. package/WAProto/StatusAttributions/StatusAttributions.proto +3 -0
  18. package/WAProto/SyncAction/SyncAction.js +9423 -2023
  19. package/WAProto/SyncAction/SyncAction.proto +208 -15
  20. package/WAProto/Wa6/Wa6.js +83 -0
  21. package/WAProto/Wa6/Wa6.proto +3 -0
  22. package/WAProto/Web/Web.js +92664 -63403
  23. package/WAProto/Web/Web.proto +31 -13
  24. package/engine-requirements.js +9 -7
  25. package/lib/Defaults/baileys-version.json +2 -2
  26. package/lib/Defaults/connection.js +51 -0
  27. package/lib/Defaults/constants.js +62 -0
  28. package/lib/Defaults/history.js +17 -0
  29. package/lib/Defaults/index.js +36 -142
  30. package/lib/Defaults/media.js +48 -0
  31. package/lib/Defaults/prefix.js +18 -0
  32. package/lib/Signal/Group/group-session-builder.js +10 -42
  33. package/lib/Signal/Group/group_cipher.js +9 -6
  34. package/lib/Signal/Group/index.js +39 -53
  35. package/lib/Signal/Group/keyhelper.js +8 -41
  36. package/lib/Signal/Group/sender-chain-key.js +4 -4
  37. package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
  38. package/lib/Signal/Group/sender-key-message.js +12 -8
  39. package/lib/Signal/Group/sender-key-state.js +4 -4
  40. package/lib/Signal/Group/sender-message-key.js +2 -2
  41. package/lib/Signal/libsignal.js +45 -69
  42. package/lib/Signal/lid-mapping.js +15 -11
  43. package/lib/Socket/Client/types.js +2 -2
  44. package/lib/Socket/Client/websocket.js +16 -14
  45. package/lib/Socket/business.js +41 -32
  46. package/lib/Socket/chats.js +123 -98
  47. package/lib/Socket/community.js +50 -40
  48. package/lib/Socket/groups.js +59 -47
  49. package/lib/Socket/index.js +4 -4
  50. package/lib/Socket/messages-recv.js +226 -171
  51. package/lib/Socket/messages-send.js +187 -143
  52. package/lib/Socket/newsletter.js +61 -47
  53. package/lib/Socket/socket.js +133 -90
  54. package/lib/Socket/usync.js +6 -6
  55. package/lib/Store/index.js +27 -11
  56. package/lib/Store/make-cache-manager-store.js +14 -15
  57. package/lib/Store/make-in-memory-store.js +28 -24
  58. package/lib/Types/LabelAssociation.js +2 -2
  59. package/lib/Types/Message.js +6 -6
  60. package/lib/Types/MexUpdates.js +5 -4
  61. package/lib/Types/State.js +4 -4
  62. package/lib/Types/index.js +28 -12
  63. package/lib/Utils/auth-utils.js +28 -26
  64. package/lib/Utils/baileys-event-stream.js +68 -69
  65. package/lib/Utils/business.js +63 -53
  66. package/lib/Utils/chat-utils.js +81 -71
  67. package/lib/Utils/crypto.js +25 -45
  68. package/lib/Utils/decode-wa-message.js +319 -311
  69. package/lib/Utils/event-buffer.js +21 -22
  70. package/lib/Utils/generics.js +103 -73
  71. package/lib/Utils/history.js +21 -21
  72. package/lib/Utils/index.js +27 -13
  73. package/lib/Utils/link-preview.js +7 -30
  74. package/lib/Utils/logger.js +5 -5
  75. package/lib/Utils/lt-hash.js +3 -3
  76. package/lib/Utils/message-retry-manager.js +4 -4
  77. package/lib/Utils/messages-media.js +104 -109
  78. package/lib/Utils/messages.js +203 -171
  79. package/lib/Utils/noise-handler.js +28 -19
  80. package/lib/Utils/process-message.js +370 -136
  81. package/lib/Utils/signal.js +36 -25
  82. package/lib/Utils/use-multi-file-auth-state.js +18 -22
  83. package/lib/Utils/validate-connection.js +52 -45
  84. package/lib/WABinary/decode.js +6 -32
  85. package/lib/WABinary/encode.js +3 -29
  86. package/lib/WABinary/generic-utils.js +4 -4
  87. package/lib/WABinary/index.js +27 -11
  88. package/lib/WAM/encode.js +16 -8
  89. package/lib/WAM/index.js +27 -11
  90. package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
  91. package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
  92. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
  93. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
  94. package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
  95. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
  96. package/lib/WAUSync/Protocols/index.js +27 -11
  97. package/lib/WAUSync/USyncQuery.js +17 -10
  98. package/lib/WAUSync/index.js +27 -11
  99. package/lib/index.js +62 -37
  100. package/package.json +1 -1
  101. package/WAProto/index.d.ts +0 -55
  102. package/lib/index.d.ts +0 -13
@@ -230,10 +230,13 @@ message EmbeddedMusic {
230
230
  optional string artworkDirectPath = 5;
231
231
  optional bytes artworkSha256 = 6;
232
232
  optional bytes artworkEncSha256 = 7;
233
- optional bytes artworkMediaKey = 11;
234
233
  optional string artistAttribution = 8;
235
234
  optional bytes countryBlocklist = 9;
236
235
  optional bool isExplicit = 10;
236
+ optional bytes artworkMediaKey = 11;
237
+ optional int64 musicSongStartTimeInMs = 12;
238
+ optional int64 derivedContentStartTimeInMs = 13;
239
+ optional int64 overlapDurationInMs = 14;
237
240
  }
238
241
 
239
242
  message EmbeddedMessage {
@@ -268,6 +271,7 @@ message MessageContextInfo {
268
271
  optional Protocol.LimitSharing limitSharing = 13;
269
272
  optional Protocol.LimitSharing limitSharingV2 = 14;
270
273
  repeated ThreadID threadId = 15;
274
+ optional WebLinkRenderConfig weblinkRenderConfig = 16;
271
275
  enum MessageAddonExpiryType {
272
276
  STATIC = 1;
273
277
  DEPENDENT_ON_PARENT = 2;
@@ -307,6 +311,8 @@ message MessageAssociation {
307
311
  STATUS_ADD_YOURS_AI_IMAGINE = 15;
308
312
  STATUS_QUESTION = 16;
309
313
  STATUS_ADD_YOURS_DIWALI = 17;
314
+ STATUS_REACTION = 18;
315
+ HEVC_VIDEO_DUAL_UPLOAD = 19;
310
316
  }
311
317
  }
312
318
 
@@ -365,6 +371,7 @@ message ContextInfo {
365
371
  optional StatusAudienceMetadata statusAudienceMetadata = 69;
366
372
  optional uint32 nonJidMentions = 70;
367
373
  optional QuotedType quotedType = 71;
374
+ optional AICommon.BotMessageSharingInfo botMessageSharingInfo = 72;
368
375
  message AdReplyInfo {
369
376
  optional string advertiserName = 1;
370
377
  optional MediaType mediaType = 2;
@@ -469,6 +476,8 @@ message ContextInfo {
469
476
  HD_IMAGE_CHILD = 4;
470
477
  MOTION_PHOTO_PARENT = 5;
471
478
  MOTION_PHOTO_CHILD = 6;
479
+ HEVC_VIDEO_PARENT = 7;
480
+ HEVC_VIDEO_CHILD = 8;
472
481
  }
473
482
  message QuestionReplyQuotedMessage {
474
483
  optional int32 serverQuestionId = 1;
@@ -585,7 +594,6 @@ message Message {
585
594
  optional FutureProofMessage associatedChildMessage = 91;
586
595
  optional FutureProofMessage groupStatusMentionMessage = 92;
587
596
  optional FutureProofMessage pollCreationMessageV4 = 93;
588
- optional FutureProofMessage pollCreationMessageV5 = 94;
589
597
  optional FutureProofMessage statusAddYours = 95;
590
598
  optional FutureProofMessage groupStatusMessage = 96;
591
599
  optional AIRichResponseMessage richResponseMessage = 97;
@@ -599,8 +607,11 @@ message Message {
599
607
  optional StatusQuestionAnswerMessage statusQuestionAnswerMessage = 105;
600
608
  optional FutureProofMessage questionReplyMessage = 106;
601
609
  optional QuestionResponseMessage questionResponseMessage = 107;
602
- optional NewsletterFollowerInviteMessage newsletterFollowerInviteMessage = 108;
603
610
  optional StatusQuotedMessage statusQuotedMessage = 109;
611
+ optional StatusStickerInteractionMessage statusStickerInteractionMessage = 110;
612
+ optional PollCreationMessage pollCreationMessageV5 = 111;
613
+ optional NewsletterFollowerInviteMessage newsletterFollowerInviteMessageV2 = 113;
614
+ optional PollResultSnapshotMessage pollResultSnapshotMessageV3 = 115;
604
615
  message AlbumMessage {
605
616
  optional uint32 expectedImageCount = 2;
606
617
  optional uint32 expectedVideoCount = 3;
@@ -726,6 +737,7 @@ message Message {
726
737
  optional ContextInfo contextInfo = 7;
727
738
  optional string nativeFlowCallButtonPayload = 8;
728
739
  optional string deeplinkPayload = 9;
740
+ optional MessageContextInfo messageContextInfo = 10;
729
741
  }
730
742
  message CallLogMessage {
731
743
  optional bool isVideo = 1;
@@ -849,6 +861,8 @@ message Message {
849
861
  optional int64 endTime = 8;
850
862
  optional bool extraGuestsAllowed = 9;
851
863
  optional bool isScheduleCall = 10;
864
+ optional bool hasReminder = 11;
865
+ optional int64 reminderOffsetSec = 12;
852
866
  }
853
867
  message EventResponseMessage {
854
868
  optional EventResponseType response = 1;
@@ -893,6 +907,7 @@ message Message {
893
907
  repeated Message.VideoEndCard endCardTiles = 36;
894
908
  optional string videoContentUrl = 37;
895
909
  optional EmbeddedMusic musicMetadata = 38;
910
+ optional Message.PaymentExtendedMetadata paymentExtendedMetadata = 39;
896
911
  enum FontType {
897
912
  SYSTEM = 0;
898
913
  SYSTEM_TEXT = 1;
@@ -991,6 +1006,9 @@ message Message {
991
1006
  }
992
1007
  }
993
1008
  }
1009
+ message HistorySyncMessageAccessStatus {
1010
+ optional bool completeAccessGranted = 1;
1011
+ }
994
1012
  message HistorySyncNotification {
995
1013
  optional bytes fileSha256 = 1;
996
1014
  optional uint64 fileLength = 2;
@@ -1006,6 +1024,7 @@ message Message {
1006
1024
  optional string peerDataRequestSessionId = 12;
1007
1025
  optional Message.FullHistorySyncOnDemandRequestMetadata fullHistorySyncOnDemandRequestMetadata = 13;
1008
1026
  optional string encHandle = 14;
1027
+ optional Message.HistorySyncMessageAccessStatus messageAccessStatus = 15;
1009
1028
  }
1010
1029
  enum HistorySyncType {
1011
1030
  INITIAL_BOOTSTRAP = 0;
@@ -1016,6 +1035,7 @@ message Message {
1016
1035
  NON_BLOCKING_DATA = 5;
1017
1036
  ON_DEMAND = 6;
1018
1037
  NO_HISTORY = 7;
1038
+ MESSAGE_ACCESS_STATUS = 8;
1019
1039
  }
1020
1040
  message ImageMessage {
1021
1041
  optional string url = 1;
@@ -1091,6 +1111,10 @@ message Message {
1091
1111
  }
1092
1112
  message Footer {
1093
1113
  optional string text = 1;
1114
+ optional bool hasMediaAttachment = 3;
1115
+ oneof media {
1116
+ Message.AudioMessage audioMessage = 2;
1117
+ }
1094
1118
  }
1095
1119
  message Header {
1096
1120
  optional string title = 1;
@@ -1174,6 +1198,9 @@ message Message {
1174
1198
  optional uint32 linkMediaDuration = 4;
1175
1199
  optional SocialMediaPostType socialMediaPostType = 5;
1176
1200
  optional bool linkInlineVideoMuted = 6;
1201
+ optional string videoContentUrl = 7;
1202
+ optional EmbeddedMusic musicMetadata = 8;
1203
+ optional string videoContentCaption = 9;
1177
1204
  enum SocialMediaPostType {
1178
1205
  NONE = 0;
1179
1206
  REEL = 1;
@@ -1339,6 +1366,10 @@ message Message {
1339
1366
  CATALOG = 1;
1340
1367
  }
1341
1368
  }
1369
+ message PaymentExtendedMetadata {
1370
+ optional uint32 type = 1;
1371
+ optional string platform = 2;
1372
+ }
1342
1373
  message PaymentInviteMessage {
1343
1374
  optional ServiceType serviceType = 1;
1344
1375
  optional int64 expiryTimestamp = 2;
@@ -1376,10 +1407,19 @@ message Message {
1376
1407
  optional FullHistorySyncOnDemandRequest fullHistorySyncOnDemandRequest = 6;
1377
1408
  optional SyncDCollectionFatalRecoveryRequest syncdCollectionFatalRecoveryRequest = 7;
1378
1409
  optional HistorySyncChunkRetryRequest historySyncChunkRetryRequest = 8;
1410
+ optional GalaxyFlowAction galaxyFlowAction = 9;
1379
1411
  message FullHistorySyncOnDemandRequest {
1380
1412
  optional Message.FullHistorySyncOnDemandRequestMetadata requestMetadata = 1;
1381
1413
  optional CompanionReg.DeviceProps.HistorySyncConfig historySyncConfig = 2;
1382
1414
  }
1415
+ message GalaxyFlowAction {
1416
+ optional GalaxyFlowActionType type = 1;
1417
+ optional string flowId = 2;
1418
+ optional string stanzaId = 3;
1419
+ enum GalaxyFlowActionType {
1420
+ NOTIFY_LAUNCH = 1;
1421
+ }
1422
+ }
1383
1423
  message HistorySyncChunkRetryRequest {
1384
1424
  optional Message.HistorySyncType syncType = 1;
1385
1425
  optional uint32 chunkOrder = 2;
@@ -1508,6 +1548,7 @@ message Message {
1508
1548
  COMPANION_SYNCD_SNAPSHOT_FATAL_RECOVERY = 8;
1509
1549
  COMPANION_CANONICAL_USER_NONCE_FETCH = 9;
1510
1550
  HISTORY_SYNC_CHUNK_RETRY = 10;
1551
+ GALAXY_FLOW_ACTION = 11;
1511
1552
  }
1512
1553
  message PinInChatMessage {
1513
1554
  optional Protocol.MessageKey key = 1;
@@ -1537,16 +1578,12 @@ message Message {
1537
1578
  optional uint32 selectableOptionsCount = 4;
1538
1579
  optional ContextInfo contextInfo = 5;
1539
1580
  optional Message.PollContentType pollContentType = 6;
1540
- optional PollType pollType = 7;
1581
+ optional Message.PollType pollType = 7;
1541
1582
  optional Option correctAnswer = 8;
1542
1583
  message Option {
1543
1584
  optional string optionName = 1;
1544
1585
  optional string optionHash = 2;
1545
1586
  }
1546
- enum PollType {
1547
- POLL = 0;
1548
- QUIZ = 1;
1549
- }
1550
1587
  }
1551
1588
  message PollEncValue {
1552
1589
  optional bytes encPayload = 1;
@@ -1556,11 +1593,16 @@ message Message {
1556
1593
  optional string name = 1;
1557
1594
  repeated PollVote pollVotes = 2;
1558
1595
  optional ContextInfo contextInfo = 3;
1596
+ optional Message.PollType pollType = 4;
1559
1597
  message PollVote {
1560
1598
  optional string optionName = 1;
1561
1599
  optional int64 optionVoteCount = 2;
1562
1600
  }
1563
1601
  }
1602
+ enum PollType {
1603
+ POLL = 0;
1604
+ QUIZ = 1;
1605
+ }
1564
1606
  message PollUpdateMessage {
1565
1607
  optional Protocol.MessageKey pollCreationMessageKey = 1;
1566
1608
  optional Message.PollEncValue vote = 2;
@@ -1745,6 +1787,15 @@ message Message {
1745
1787
  QUESTION_ANSWER = 1;
1746
1788
  }
1747
1789
  }
1790
+ message StatusStickerInteractionMessage {
1791
+ optional Protocol.MessageKey key = 1;
1792
+ optional string stickerKey = 2;
1793
+ optional StatusStickerType type = 3;
1794
+ enum StatusStickerType {
1795
+ UNKNOWN = 0;
1796
+ REACTION = 1;
1797
+ }
1798
+ }
1748
1799
  message StickerMessage {
1749
1800
  optional string url = 1;
1750
1801
  optional bytes fileSha256 = 2;
@@ -1857,10 +1908,10 @@ message Message {
1857
1908
  optional uint32 fbExperimentId = 1;
1858
1909
  }
1859
1910
  message VideoEndCard {
1860
- required string username = 1;
1861
- required string caption = 2;
1862
- required string thumbnailImageUrl = 3;
1863
- required string profilePictureUrl = 4;
1911
+ optional string username = 1;
1912
+ optional string caption = 2;
1913
+ optional string thumbnailImageUrl = 3;
1914
+ optional string profilePictureUrl = 4;
1864
1915
  }
1865
1916
  message VideoMessage {
1866
1917
  optional string url = 1;
@@ -1911,4 +1962,9 @@ enum KeepType {
1911
1962
  UNKNOWN = 0;
1912
1963
  KEEP_FOR_ALL = 1;
1913
1964
  UNDO_KEEP_FOR_ALL = 2;
1965
+ }
1966
+
1967
+ enum WebLinkRenderConfig {
1968
+ WEBVIEW = 0;
1969
+ SYSTEM = 1;
1914
1970
  }