chore: update noise_version to 6

This commit is contained in:
Adhiraj Singh
2022-04-25 23:15:22 +05:30
parent d834e1d029
commit 47ab32f314
2 changed files with 11 additions and 11 deletions

View File

@@ -13,18 +13,18 @@ export const PHONE_CONNECTION_CB = 'CB:Pong'
export const WA_DEFAULT_EPHEMERAL = 7 * 24 * 60 * 60
export const NOISE_MODE = 'Noise_XX_25519_AESGCM_SHA256\0\0\0\0'
export const DICT_VERSION = Buffer.from([2])
export const DICT_VERSION = 2
export const KEY_BUNDLE_TYPE = Buffer.from([5])
export const NOISE_WA_HEADER = Buffer.concat(
[
Buffer.from('WA', 'ascii'),
KEY_BUNDLE_TYPE,
DICT_VERSION
]
export const NOISE_WA_HEADER = Buffer.from(
[ 87, 65, 6, DICT_VERSION ]
) // last is "DICT_VERSION"
/** from: https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url */
export const URL_REGEX = /[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()@:%_+.~#?&//=]*)?/gi
export const WA_CERT_DETAILS = {
SERIAL: 0,
}
const BASE_CONNECTION_CONFIG: CommonSocketConfig<any> = {
version: version as any,
browser: Browsers.baileys('Chrome'),