@lynovratech/baileys 1.0.4 → 1.0.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.
- package/lib/cjs/Utils/chat-utils.js +1 -1
- package/lib/cjs/Utils/crypto.js +1 -1
- package/lib/cjs/Utils/lt-hash.js +1 -1
- package/lib/esm/Utils/chat-utils.js +1 -1
- package/lib/esm/Utils/crypto.js +1 -1
- package/lib/esm/Utils/lt-hash.js +1 -1
- package/lib/vendor/whatsapp-rust-bridge.d.ts +1 -0
- package/lib/vendor/whatsapp-rust-bridge.js +1950 -0
- package/package.json +5 -3
- package/scripts/fix-rust-bridge-import.cjs +35 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processSyncAction = exports.chatModificationToAppPatch = exports.decodePatches = exports.decodeSyncdSnapshot = exports.downloadExternalPatch = exports.downloadExternalBlob = exports.extractSyncdPatches = exports.decodeSyncdPatch = exports.decodeSyncdMutations = exports.encodeSyncdPatch = exports.newLTHashState = void 0;
|
|
4
4
|
const boom_1 = require("@hapi/boom");
|
|
5
|
-
const whatsapp_rust_bridge_1 = require("whatsapp-rust-bridge");
|
|
5
|
+
const whatsapp_rust_bridge_1 = require("../vendor/whatsapp-rust-bridge.js");
|
|
6
6
|
const index_js_1 = require("../../WAProto/index.js");
|
|
7
7
|
const LabelAssociation_1 = require("../Types/LabelAssociation");
|
|
8
8
|
const WABinary_1 = require("../WABinary");
|
package/lib/cjs/Utils/crypto.js
CHANGED
|
@@ -48,7 +48,7 @@ exports.derivePairingCodeKey = derivePairingCodeKey;
|
|
|
48
48
|
const crypto_1 = require("crypto");
|
|
49
49
|
const curve = __importStar(require("libsignal/src/curve"));
|
|
50
50
|
const Defaults_1 = require("../Defaults");
|
|
51
|
-
var whatsapp_rust_bridge_1 = require("whatsapp-rust-bridge");
|
|
51
|
+
var whatsapp_rust_bridge_1 = require("../vendor/whatsapp-rust-bridge.js");
|
|
52
52
|
Object.defineProperty(exports, "md5", { enumerable: true, get: function () { return whatsapp_rust_bridge_1.md5; } });
|
|
53
53
|
Object.defineProperty(exports, "hkdf", { enumerable: true, get: function () { return whatsapp_rust_bridge_1.hkdf; } });
|
|
54
54
|
// insure browser & node compatibility
|
package/lib/cjs/Utils/lt-hash.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.LT_HASH_ANTI_TAMPERING = void 0;
|
|
4
|
-
const whatsapp_rust_bridge_1 = require("whatsapp-rust-bridge");
|
|
4
|
+
const whatsapp_rust_bridge_1 = require("../vendor/whatsapp-rust-bridge.js");
|
|
5
5
|
/**
|
|
6
6
|
* LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
|
|
7
7
|
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
|
-
import { expandAppStateKeys } from
|
|
2
|
+
import { expandAppStateKeys } from "../vendor/whatsapp-rust-bridge.js";
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
4
|
import { LabelAssociationType } from '../Types/LabelAssociation.js';
|
|
5
5
|
import { getBinaryNodeChild, getBinaryNodeChildren, isJidGroup, jidNormalizedUser } from '../WABinary/index.js';
|
package/lib/esm/Utils/crypto.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createCipheriv, createDecipheriv, createHash, createHmac, randomBytes } from 'crypto';
|
|
2
2
|
import * as curve from 'libsignal/src/curve.js';
|
|
3
3
|
import { KEY_BUNDLE_TYPE } from '../Defaults/index.js';
|
|
4
|
-
export { md5, hkdf } from
|
|
4
|
+
export { md5, hkdf } from "../vendor/whatsapp-rust-bridge.js";
|
|
5
5
|
// insure browser & node compatibility
|
|
6
6
|
const { subtle } = globalThis.crypto;
|
|
7
7
|
/** prefix version byte to the pub keys, required for some curve crypto functions */
|
package/lib/esm/Utils/lt-hash.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LTHashAntiTampering } from
|
|
1
|
+
import { LTHashAntiTampering } from "../vendor/whatsapp-rust-bridge.js";
|
|
2
2
|
/**
|
|
3
3
|
* LT Hash is a summation based hash algorithm that maintains the integrity of a piece of data
|
|
4
4
|
* over a series of mutations. You can add/remove mutations and it'll return a hash equal to
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../pkg/whatsapp_rust_bridge.js";
|