Sunday at 07:24 AM2 days 1 minute ago, sakidi nurkhalim said:@Fajri Yandimasih punya arsipnya mas?Ada di halaman utama tinggal pilih versinya saja
Sunday at 08:15 AM1 day 51 minutes ago, sakidi nurkhalim said:@Fajri Yandimasih punya arsipnya mas?Di pilihan file download masih ada,cuma perlu nantinya cli npm install @whiskeysockets/baileys@7.0.0-rc.6 atau versi lainnya,ini 7.0 beta soalnya
Sunday at 08:40 AM1 day 4 hours ago, Fajri Yandi said:pake mpwa yang versi 9.6.1 bisa pak,saya menggunakan versi lama yang masih make whiskeysocketnpm listnpm warn config init.module Use `--init-module` instead.mpwa@9.6.1 /www/wwwroot/wa.fajriyandi.com+-- @google/generative-ai@0.21.0+-- @jimp/plugin-blit@1.6.0+-- @whiskeysockets/baileys@7.0.0-rc.6+-- axios@1.7.9+-- dotenv@16.4.7+-- express@4.21.2+-- imagemin-webp@8.0.0+-- imagemin@9.0.0+-- jimp@1.6.0+-- link-preview-js@3.0.12+-- mime-types@2.1.35+-- mysql2@3.12.0+-- node-cache@5.1.2+-- pino-pretty@10.3.1+-- qrcode@1.5.4+-- sharp@0.32.6`-- socket.io@4.8.1Kalau saya pakai versi terbaru device masih terhubung, cuma ya tidak bisa membuat koneksi baru wkwk
Sunday at 08:46 AM1 day I think a lot of people are getting connection error. You can do the below steps and thank me later if it worked for you. I am not a professional developer and it took me almost 2 days to reach this point. This is a very simple 2 step process even a non-tech can do this; So, Let's start.Step 1Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.d.ts" and replace the whole code of this file with below codeimport { proto } from '../../WAProto';import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types';import { BinaryNode } from '../WABinary';export declare const generateLoginNode: (userJid: string, config: SocketConfig) => proto.ClientPayload;export declare const generateRegistrationNode: ( creds: SignalCreds, config: SocketConfig) => proto.ClientPayload;export declare const configureSuccessfulPairing: ( stanza: BinaryNode, opts: Pick<AuthenticationCreds, 'advSecretKey' | 'signedIdentityKey' | 'signalIdentities'>) => { creds: Partial<AuthenticationCreds>; reply: BinaryNode;};export declare const encodeSignedDeviceIdentity: ( account: proto.IADVSignedDeviceIdentity, includeSignatureKey: boolean) => Uint8Array;Step 2:Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.js" and replace the whole code of this file with below code"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.encodeSignedDeviceIdentity = exports.configureSuccessfulPairing = exports.generateRegistrationNode = exports.generateLoginNode = void 0;const boom_1 = require("@hapi/boom");const crypto_1 = require("crypto");const WAProto_1 = require("../../WAProto");const Defaults_1 = require("../Defaults");const WABinary_1 = require("../WABinary");const crypto_2 = require("./crypto");const generics_1 = require("./generics");const signal_1 = require("./signal");const getUserAgent = (config) => ({ appVersion: { primary: config.version[0], secondary: config.version[1], tertiary: config.version[2], }, platform: WAProto_1.proto.ClientPayload.UserAgent.Platform.WEB, releaseChannel: WAProto_1.proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE, osVersion: '0.1', device: 'Desktop', osBuildNumber: '0.1', localeLanguageIso6391: 'en', mnc: '000', mcc: '000', localeCountryIso31661Alpha2: config.countryCode,});const PLATFORM_MAP = { 'Mac OS': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN, Windows: WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN32,};const getWebInfo = (config) => { let webSubPlatform = WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER; if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) { webSubPlatform = PLATFORM_MAP[config.browser[0]]; } return { webSubPlatform };};const getClientPayload = (config) => { const payload = { connectType: WAProto_1.proto.ClientPayload.ConnectType.WIFI_UNKNOWN, connectReason: WAProto_1.proto.ClientPayload.ConnectReason.USER_ACTIVATED, userAgent: getUserAgent(config), }; payload.webInfo = getWebInfo(config); return payload;};const generateLoginNode = (userJid, config) => { const { user, device } = (0, WABinary_1.jidDecode)(userJid); const payload = { ...getClientPayload(config), passive: false, pull: true, username: +user, device: device, }; return WAProto_1.proto.ClientPayload.fromObject(payload);};exports.generateLoginNode = generateLoginNode;const getPlatformType = (platform) => { const platformType = platform.toUpperCase(); return WAProto_1.proto.DeviceProps.PlatformType[platformType] || WAProto_1.proto.DeviceProps.PlatformType.DESKTOP;};const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => { const appVersionBuf = (0, crypto_1.createHash)('md5').update(config.version.join('.')).digest(); const companion = { os: config.browser[0], platformType: getPlatformType(config.browser[1]), requireFullSync: config.syncFullHistory, historySyncConfig: { storageQuotaMb: 10240, inlineInitialPayloadInE2EeMsg: true, recentSyncDaysLimit: undefined, supportCallLogHistory: false, supportBotUserAgentChatHistory: true, supportCagReactionsAndPolls: true, supportBizHostedMsg: true, supportRecentSyncChunkMessageCountTuning: true, supportHostedGroupMsg: true, supportFbidBotChatHistory: true, supportAddOnHistorySyncMigration: undefined, supportMessageAssociation: true, }, }; const companionProto = WAProto_1.proto.DeviceProps.encode(companion).finish(); const registerPayload = { ...getClientPayload(config), passive: false, pull: false, devicePairingData: { buildHash: appVersionBuf, deviceProps: companionProto, eRegid: (0, generics_1.encodeBigEndian)(registrationId), eKeytype: Defaults_1.KEY_BUNDLE_TYPE, eIdent: signedIdentityKey.public, eSkeyId: (0, generics_1.encodeBigEndian)(signedPreKey.keyId, 3), eSkeyVal: signedPreKey.keyPair.public, eSkeySig: signedPreKey.signature, }, }; return WAProto_1.proto.ClientPayload.fromObject(registerPayload);};exports.generateRegistrationNode = generateRegistrationNode;const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, signalIdentities }) => { const msgId = stanza.attrs.id; const pairSuccessNode = (0, WABinary_1.getBinaryNodeChild)(stanza, 'pair-success'); const deviceIdentityNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device-identity'); const platformNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'platform'); const deviceNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device'); const businessNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'biz'); if (!deviceIdentityNode || !deviceNode) { throw new boom_1.Boom('Missing device-identity or device in pair success node', { data: stanza }); } const bizName = businessNode?.attrs.name; const jid = deviceNode.attrs.jid; const { details, hmac, accountType } = WAProto_1.proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content); const isHostedAccount = accountType === WAProto_1.proto.ADVEncryptionType.HOSTED; const hmacPrefix = isHostedAccount ? Buffer.from([6, 5]) : Buffer.alloc(0); const advSign = (0, crypto_2.hmacSign)(Buffer.concat([hmacPrefix, details]), Buffer.from(advSecretKey, 'base64')); if (Buffer.compare(hmac, advSign) !== 0) { throw new boom_1.Boom('Invalid account signature'); } const account = WAProto_1.proto.ADVSignedDeviceIdentity.decode(details); const { accountSignatureKey, accountSignature, details: deviceDetails } = account; const accountMsg = Buffer.concat([Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public]); if (!crypto_2.Curve.verify(accountSignatureKey, accountMsg, accountSignature)) { throw new boom_1.Boom('Failed to verify account signature'); } const devicePrefix = isHostedAccount ? Buffer.from([6, 6]) : Buffer.from([6, 1]); const deviceMsg = Buffer.concat([devicePrefix, deviceDetails, signedIdentityKey.public, accountSignatureKey]); account.deviceSignature = crypto_2.Curve.sign(signedIdentityKey.private, deviceMsg); const identity = (0, signal_1.createSignalIdentity)(jid, accountSignatureKey); const accountEnc = exports.encodeSignedDeviceIdentity(account, false); const deviceIdentity = WAProto_1.proto.ADVDeviceIdentity.decode(account.details); const reply = { tag: 'iq', attrs: { to: WABinary_1.S_WHATSAPP_NET, type: 'result', id: msgId }, content: [{ tag: 'pair-device-sign', attrs: {}, content: [{ tag: 'device-identity', attrs: { 'key-index': deviceIdentity.keyIndex.toString() }, content: accountEnc }] }], }; const authUpdate = { account, me: { id: jid, name: bizName }, signalIdentities: [...(signalIdentities || []), identity], platform: platformNode?.attrs.name, }; return { creds: authUpdate, reply };};exports.configureSuccessfulPairing = configureSuccessfulPairing;const encodeSignedDeviceIdentity = (account, includeSignatureKey) => { account = { ...account }; if (!includeSignatureKey || !account.accountSignatureKey?.length) account.accountSignatureKey = null; return WAProto_1.proto.ADVSignedDeviceIdentity.encode(account).finish();};exports.encodeSignedDeviceIdentity = encodeSignedDeviceIdentity;
Sunday at 09:01 AM1 day 13 minutes ago, jjsons said:I think a lot of people are getting connection error. You can do the below steps and thank me later if it worked for you. I am not a professional developer and it took me almost 2 days to reach this point. This is a very simple 2 step process even a non-tech can do this; So, Let's start.Step 1Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.d.ts" and replace the whole code of this file with below codeimport { proto } from '../../WAProto';import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types';import { BinaryNode } from '../WABinary';export declare const generateLoginNode: (userJid: string, config: SocketConfig) => proto.ClientPayload;export declare const generateRegistrationNode: (creds: SignalCreds,config: SocketConfig) => proto.ClientPayload;export declare const configureSuccessfulPairing: (stanza: BinaryNode,opts: Pick<AuthenticationCreds, 'advSecretKey' | 'signedIdentityKey' | 'signalIdentities'>) => {creds: Partial<AuthenticationCreds>;reply: BinaryNode;};export declare const encodeSignedDeviceIdentity: (account: proto.IADVSignedDeviceIdentity,includeSignatureKey: boolean) => Uint8Array;Step 2:Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.js" and replace the whole code of this file with below code"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.encodeSignedDeviceIdentity = exports.configureSuccessfulPairing = exports.generateRegistrationNode = exports.generateLoginNode = void 0;const boom_1 = require("@hapi/boom");const crypto_1 = require("crypto");const WAProto_1 = require("../../WAProto");const Defaults_1 = require("../Defaults");const WABinary_1 = require("../WABinary");const crypto_2 = require("./crypto");const generics_1 = require("./generics");const signal_1 = require("./signal");const getUserAgent = (config) => ({appVersion: {primary: config.version[0],secondary: config.version[1],tertiary: config.version[2],},platform: WAProto_1.proto.ClientPayload.UserAgent.Platform.WEB,releaseChannel: WAProto_1.proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,osVersion: '0.1',device: 'Desktop',osBuildNumber: '0.1',localeLanguageIso6391: 'en',mnc: '000',mcc: '000',localeCountryIso31661Alpha2: config.countryCode,});const PLATFORM_MAP = {'Mac OS': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN,Windows: WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN32,};const getWebInfo = (config) => {let webSubPlatform = WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER;if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) {webSubPlatform = PLATFORM_MAP[config.browser[0]];}return { webSubPlatform };};const getClientPayload = (config) => {const payload = {connectType: WAProto_1.proto.ClientPayload.ConnectType.WIFI_UNKNOWN,connectReason: WAProto_1.proto.ClientPayload.ConnectReason.USER_ACTIVATED,userAgent: getUserAgent(config),};payload.webInfo = getWebInfo(config);return payload;};const generateLoginNode = (userJid, config) => {const { user, device } = (0, WABinary_1.jidDecode)(userJid);const payload = {...getClientPayload(config),passive: false,pull: true,username: +user,device: device,};return WAProto_1.proto.ClientPayload.fromObject(payload);};exports.generateLoginNode = generateLoginNode;const getPlatformType = (platform) => {const platformType = platform.toUpperCase();return WAProto_1.proto.DeviceProps.PlatformType[platformType] || WAProto_1.proto.DeviceProps.PlatformType.DESKTOP;};const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => {const appVersionBuf = (0, crypto_1.createHash)('md5').update(config.version.join('.')).digest();const companion = {os: config.browser[0],platformType: getPlatformType(config.browser[1]),requireFullSync: config.syncFullHistory,historySyncConfig: {storageQuotaMb: 10240,inlineInitialPayloadInE2EeMsg: true,recentSyncDaysLimit: undefined,supportCallLogHistory: false,supportBotUserAgentChatHistory: true,supportCagReactionsAndPolls: true,supportBizHostedMsg: true,supportRecentSyncChunkMessageCountTuning: true,supportHostedGroupMsg: true,supportFbidBotChatHistory: true,supportAddOnHistorySyncMigration: undefined,supportMessageAssociation: true,},};const companionProto = WAProto_1.proto.DeviceProps.encode(companion).finish();const registerPayload = {...getClientPayload(config),passive: false,pull: false,devicePairingData: {buildHash: appVersionBuf,deviceProps: companionProto,eRegid: (0, generics_1.encodeBigEndian)(registrationId),eKeytype: Defaults_1.KEY_BUNDLE_TYPE,eIdent: signedIdentityKey.public,eSkeyId: (0, generics_1.encodeBigEndian)(signedPreKey.keyId, 3),eSkeyVal: signedPreKey.keyPair.public,eSkeySig: signedPreKey.signature,},};return WAProto_1.proto.ClientPayload.fromObject(registerPayload);};exports.generateRegistrationNode = generateRegistrationNode;const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, signalIdentities }) => {const msgId = stanza.attrs.id;const pairSuccessNode = (0, WABinary_1.getBinaryNodeChild)(stanza, 'pair-success');const deviceIdentityNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device-identity');const platformNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'platform');const deviceNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device');const businessNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'biz');if (!deviceIdentityNode || !deviceNode) {throw new boom_1.Boom('Missing device-identity or device in pair success node', { data: stanza });}const bizName = businessNode?.attrs.name;const jid = deviceNode.attrs.jid;const { details, hmac, accountType } = WAProto_1.proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content);const isHostedAccount = accountType === WAProto_1.proto.ADVEncryptionType.HOSTED;const hmacPrefix = isHostedAccount ? Buffer.from([6, 5]) : Buffer.alloc(0);const advSign = (0, crypto_2.hmacSign)(Buffer.concat([hmacPrefix, details]), Buffer.from(advSecretKey, 'base64'));if (Buffer.compare(hmac, advSign) !== 0) {throw new boom_1.Boom('Invalid account signature');}const account = WAProto_1.proto.ADVSignedDeviceIdentity.decode(details);const { accountSignatureKey, accountSignature, details: deviceDetails } = account;const accountMsg = Buffer.concat([Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public]);if (!crypto_2.Curve.verify(accountSignatureKey, accountMsg, accountSignature)) {throw new boom_1.Boom('Failed to verify account signature');}const devicePrefix = isHostedAccount ? Buffer.from([6, 6]) : Buffer.from([6, 1]);const deviceMsg = Buffer.concat([devicePrefix, deviceDetails, signedIdentityKey.public, accountSignatureKey]);account.deviceSignature = crypto_2.Curve.sign(signedIdentityKey.private, deviceMsg);const identity = (0, signal_1.createSignalIdentity)(jid, accountSignatureKey);const accountEnc = exports.encodeSignedDeviceIdentity(account, false);const deviceIdentity = WAProto_1.proto.ADVDeviceIdentity.decode(account.details);const reply = {tag: 'iq',attrs: { to: WABinary_1.S_WHATSAPP_NET, type: 'result', id: msgId },content: [{ tag: 'pair-device-sign', attrs: {}, content: [{ tag: 'device-identity', attrs: { 'key-index': deviceIdentity.keyIndex.toString() }, content: accountEnc }] }],};const authUpdate = {account,me: { id: jid, name: bizName },signalIdentities: [...(signalIdentities || []), identity],platform: platformNode?.attrs.name,};return { creds: authUpdate, reply };};exports.configureSuccessfulPairing = configureSuccessfulPairing;const encodeSignedDeviceIdentity = (account, includeSignatureKey) => {account = { ...account };if (!includeSignatureKey || !account.accountSignatureKey?.length) account.accountSignatureKey = null;return WAProto_1.proto.ADVSignedDeviceIdentity.encode(account).finish();};exports.encodeSignedDeviceIdentity = encodeSignedDeviceIdentity;Wowwww you are amazing sir!!100% working fine
Sunday at 01:23 PM1 day 4 hours ago, jjsons said:I think a lot of people are getting connection error. You can do the below steps and thank me later if it worked for you. I am not a professional developer and it took me almost 2 days to reach this point. This is a very simple 2 step process even a non-tech can do this; So, Let's start.Step 1Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.d.ts" and replace the whole code of this file with below codeimport { proto } from '../../WAProto';import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types';import { BinaryNode } from '../WABinary';export declare const generateLoginNode: (userJid: string, config: SocketConfig) => proto.ClientPayload;export declare const generateRegistrationNode: (creds: SignalCreds,config: SocketConfig) => proto.ClientPayload;export declare const configureSuccessfulPairing: (stanza: BinaryNode,opts: Pick<AuthenticationCreds, 'advSecretKey' | 'signedIdentityKey' | 'signalIdentities'>) => {creds: Partial<AuthenticationCreds>;reply: BinaryNode;};export declare const encodeSignedDeviceIdentity: (account: proto.IADVSignedDeviceIdentity,includeSignatureKey: boolean) => Uint8Array;Step 2:Go to this dir ==> "node_modules/@onexgen/baileys/lib/Utils/validate-connection.js" and replace the whole code of this file with below code"use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.encodeSignedDeviceIdentity = exports.configureSuccessfulPairing = exports.generateRegistrationNode = exports.generateLoginNode = void 0;const boom_1 = require("@hapi/boom");const crypto_1 = require("crypto");const WAProto_1 = require("../../WAProto");const Defaults_1 = require("../Defaults");const WABinary_1 = require("../WABinary");const crypto_2 = require("./crypto");const generics_1 = require("./generics");const signal_1 = require("./signal");const getUserAgent = (config) => ({appVersion: {primary: config.version[0],secondary: config.version[1],tertiary: config.version[2],},platform: WAProto_1.proto.ClientPayload.UserAgent.Platform.WEB,releaseChannel: WAProto_1.proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,osVersion: '0.1',device: 'Desktop',osBuildNumber: '0.1',localeLanguageIso6391: 'en',mnc: '000',mcc: '000',localeCountryIso31661Alpha2: config.countryCode,});const PLATFORM_MAP = {'Mac OS': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN,Windows: WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN32,};const getWebInfo = (config) => {let webSubPlatform = WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER;if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) {webSubPlatform = PLATFORM_MAP[config.browser[0]];}return { webSubPlatform };};const getClientPayload = (config) => {const payload = {connectType: WAProto_1.proto.ClientPayload.ConnectType.WIFI_UNKNOWN,connectReason: WAProto_1.proto.ClientPayload.ConnectReason.USER_ACTIVATED,userAgent: getUserAgent(config),};payload.webInfo = getWebInfo(config);return payload;};const generateLoginNode = (userJid, config) => {const { user, device } = (0, WABinary_1.jidDecode)(userJid);const payload = {...getClientPayload(config),passive: false,pull: true,username: +user,device: device,};return WAProto_1.proto.ClientPayload.fromObject(payload);};exports.generateLoginNode = generateLoginNode;const getPlatformType = (platform) => {const platformType = platform.toUpperCase();return WAProto_1.proto.DeviceProps.PlatformType[platformType] || WAProto_1.proto.DeviceProps.PlatformType.DESKTOP;};const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => {const appVersionBuf = (0, crypto_1.createHash)('md5').update(config.version.join('.')).digest();const companion = {os: config.browser[0],platformType: getPlatformType(config.browser[1]),requireFullSync: config.syncFullHistory,historySyncConfig: {storageQuotaMb: 10240,inlineInitialPayloadInE2EeMsg: true,recentSyncDaysLimit: undefined,supportCallLogHistory: false,supportBotUserAgentChatHistory: true,supportCagReactionsAndPolls: true,supportBizHostedMsg: true,supportRecentSyncChunkMessageCountTuning: true,supportHostedGroupMsg: true,supportFbidBotChatHistory: true,supportAddOnHistorySyncMigration: undefined,supportMessageAssociation: true,},};const companionProto = WAProto_1.proto.DeviceProps.encode(companion).finish();const registerPayload = {...getClientPayload(config),passive: false,pull: false,devicePairingData: {buildHash: appVersionBuf,deviceProps: companionProto,eRegid: (0, generics_1.encodeBigEndian)(registrationId),eKeytype: Defaults_1.KEY_BUNDLE_TYPE,eIdent: signedIdentityKey.public,eSkeyId: (0, generics_1.encodeBigEndian)(signedPreKey.keyId, 3),eSkeyVal: signedPreKey.keyPair.public,eSkeySig: signedPreKey.signature,},};return WAProto_1.proto.ClientPayload.fromObject(registerPayload);};exports.generateRegistrationNode = generateRegistrationNode;const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, signalIdentities }) => {const msgId = stanza.attrs.id;const pairSuccessNode = (0, WABinary_1.getBinaryNodeChild)(stanza, 'pair-success');const deviceIdentityNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device-identity');const platformNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'platform');const deviceNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device');const businessNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'biz');if (!deviceIdentityNode || !deviceNode) {throw new boom_1.Boom('Missing device-identity or device in pair success node', { data: stanza });}const bizName = businessNode?.attrs.name;const jid = deviceNode.attrs.jid;const { details, hmac, accountType } = WAProto_1.proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content);const isHostedAccount = accountType === WAProto_1.proto.ADVEncryptionType.HOSTED;const hmacPrefix = isHostedAccount ? Buffer.from([6, 5]) : Buffer.alloc(0);const advSign = (0, crypto_2.hmacSign)(Buffer.concat([hmacPrefix, details]), Buffer.from(advSecretKey, 'base64'));if (Buffer.compare(hmac, advSign) !== 0) {throw new boom_1.Boom('Invalid account signature');}const account = WAProto_1.proto.ADVSignedDeviceIdentity.decode(details);const { accountSignatureKey, accountSignature, details: deviceDetails } = account;const accountMsg = Buffer.concat([Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public]);if (!crypto_2.Curve.verify(accountSignatureKey, accountMsg, accountSignature)) {throw new boom_1.Boom('Failed to verify account signature');}const devicePrefix = isHostedAccount ? Buffer.from([6, 6]) : Buffer.from([6, 1]);const deviceMsg = Buffer.concat([devicePrefix, deviceDetails, signedIdentityKey.public, accountSignatureKey]);account.deviceSignature = crypto_2.Curve.sign(signedIdentityKey.private, deviceMsg);const identity = (0, signal_1.createSignalIdentity)(jid, accountSignatureKey);const accountEnc = exports.encodeSignedDeviceIdentity(account, false);const deviceIdentity = WAProto_1.proto.ADVDeviceIdentity.decode(account.details);const reply = {tag: 'iq',attrs: { to: WABinary_1.S_WHATSAPP_NET, type: 'result', id: msgId },content: [{ tag: 'pair-device-sign', attrs: {}, content: [{ tag: 'device-identity', attrs: { 'key-index': deviceIdentity.keyIndex.toString() }, content: accountEnc }] }],};const authUpdate = {account,me: { id: jid, name: bizName },signalIdentities: [...(signalIdentities || []), identity],platform: platformNode?.attrs.name,};return { creds: authUpdate, reply };};exports.configureSuccessfulPairing = configureSuccessfulPairing;const encodeSignedDeviceIdentity = (account, includeSignatureKey) => {account = { ...account };if (!includeSignatureKey || !account.accountSignatureKey?.length) account.accountSignatureKey = null;return WAProto_1.proto.ADVSignedDeviceIdentity.encode(account).finish();};exports.encodeSignedDeviceIdentity = encodeSignedDeviceIdentity;Outstanding! Thank you very much
Sunday at 04:59 PM1 day 1 hour ago, Wapbot said:Yuk coba chatbot ai di https://wapbot.id?Lelucon apa ini 😂, jualan layanan di forum para pengembang wkwkwkkk
Yesterday at 01:32 AM1 day 16 hours ago, Imanudin said:Kalau saya pakai versi terbaru device masih terhubung, cuma ya tidak bisa membuat koneksi baru wkwkwow thank you. this solution working finei think only me cant connect into mpwa
Yesterday at 01:38 AM1 day 6 hours ago, JDWA said:@jjsons still error sir ,after editing file dont forget restart node js
Yesterday at 07:36 AM1 day 22 hours ago, jjsons said:Saya rasa banyak orang mengalami kesalahan koneksi. Anda dapat mengikuti langkah-langkah di bawah ini dan berterima kasih kepada saya nanti jika berhasil. Saya bukan pengembang profesional dan butuh hampir 2 hari untuk mencapai titik ini. Proses 2 langkah ini sangat sederhana, bahkan orang awam pun bisa melakukannya; Jadi, mari kita mulai. Langkah 1: Buka direktori ini ==> " node_modules/@onexgen/baileys/lib/Utils/validate-connection.d.ts" dan ganti seluruh kode berkas ini dengan kode di bawah ini.import { proto } from '../../WAProto';import type { AuthenticationCreds, SignalCreds, SocketConfig } from '../Types';import { BinaryNode } from '../WABinary';export declare const generateLoginNode: (userJid: string, config: SocketConfig) => proto.ClientPayload;export declare const generateRegistrationNode: (creds: SignalCreds,config: SocketConfig) => proto.ClientPayload;export declare const configureSuccessfulPairing: (stanza: BinaryNode,opts: Pick<AuthenticationCreds, 'advSecretKey' | 'signedIdentityKey' | 'signalIdentities'>) => {creds: Partial<AuthenticationCreds>;reply: BinaryNode;};export declare const encodeSignedDeviceIdentity: (account: proto.IADVSignedDeviceIdentity,includeSignatureKey: boolean) => Uint8Array;Langkah 2:Buka direktori ini ==> " node_modules/@onexgen/baileys/lib/Utils/validate-connection.js" dan ganti seluruh kode file ini dengan kode di bawah ini "use strict";Object.defineProperty(exports, "__esModule", { value: true });exports.encodeSignedDeviceIdentity = exports.configureSuccessfulPairing = exports.generateRegistrationNode = exports.generateLoginNode = void 0;const boom_1 = require("@hapi/boom");const crypto_1 = require("crypto");const WAProto_1 = require("../../WAProto");const Defaults_1 = require("../Defaults");const WABinary_1 = require("../WABinary");const crypto_2 = require("./crypto");const generics_1 = require("./generics");const signal_1 = require("./signal");const getUserAgent = (config) => ({appVersion: {primary: config.version[0],secondary: config.version[1],tertiary: config.version[2],},platform: WAProto_1.proto.ClientPayload.UserAgent.Platform.WEB,releaseChannel: WAProto_1.proto.ClientPayload.UserAgent.ReleaseChannel.RELEASE,osVersion: '0.1',device: 'Desktop',osBuildNumber: '0.1',localeLanguageIso6391: 'en',mnc: '000',mcc: '000',localeCountryIso31661Alpha2: config.countryCode,});const PLATFORM_MAP = {'Mac OS': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN,Windows: WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN32,};const getWebInfo = (config) => {let webSubPlatform = WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER;if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) {webSubPlatform = PLATFORM_MAP[config.browser[0]];}return { webSubPlatform };};const getClientPayload = (config) => {const payload = {connectType: WAProto_1.proto.ClientPayload.ConnectType.WIFI_UNKNOWN,connectReason: WAProto_1.proto.ClientPayload.ConnectReason.USER_ACTIVATED,userAgent: getUserAgent(config),};payload.webInfo = getWebInfo(config);return payload;};const generateLoginNode = (userJid, config) => {const { user, device } = (0, WABinary_1.jidDecode)(userJid);const payload = {...getClientPayload(config),passive: false,pull: true,username: +user,device: device,};return WAProto_1.proto.ClientPayload.fromObject(payload);};exports.generateLoginNode = generateLoginNode;const getPlatformType = (platform) => {const platformType = platform.toUpperCase();return WAProto_1.proto.DeviceProps.PlatformType[platformType] || WAProto_1.proto.DeviceProps.PlatformType.DESKTOP;};const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => {const appVersionBuf = (0, crypto_1.createHash)('md5').update(config.version.join('.')).digest();const companion = {os: config.browser[0],platformType: getPlatformType(config.browser[1]),requireFullSync: config.syncFullHistory,historySyncConfig: {storageQuotaMb: 10240,inlineInitialPayloadInE2EeMsg: true,recentSyncDaysLimit: undefined,supportCallLogHistory: false,supportBotUserAgentChatHistory: true,supportCagReactionsAndPolls: true,supportBizHostedMsg: true,supportRecentSyncChunkMessageCountTuning: true,supportHostedGroupMsg: true,supportFbidBotChatHistory: true,supportAddOnHistorySyncMigration: undefined,supportMessageAssociation: true,},};const companionProto = WAProto_1.proto.DeviceProps.encode(companion).finish();const registerPayload = {...getClientPayload(config),passive: false,pull: false,devicePairingData: {buildHash: appVersionBuf,deviceProps: companionProto,eRegid: (0, generics_1.encodeBigEndian)(registrationId),eKeytype: Defaults_1.KEY_BUNDLE_TYPE,eIdent: signedIdentityKey.public,eSkeyId: (0, generics_1.encodeBigEndian)(signedPreKey.keyId, 3),eSkeyVal: signedPreKey.keyPair.public,eSkeySig: signedPreKey.signature,},};return WAProto_1.proto.ClientPayload.fromObject(registerPayload);};exports.generateRegistrationNode = generateRegistrationNode;const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, signalIdentities }) => {const msgId = stanza.attrs.id;const pairSuccessNode = (0, WABinary_1.getBinaryNodeChild)(stanza, 'pair-success');const deviceIdentityNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device-identity');const platformNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'platform');const deviceNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'device');const businessNode = (0, WABinary_1.getBinaryNodeChild)(pairSuccessNode, 'biz');if (!deviceIdentityNode || !deviceNode) {throw new boom_1.Boom('Missing device-identity or device in pair success node', { data: stanza });}const bizName = businessNode?.attrs.name;const jid = deviceNode.attrs.jid;const { details, hmac, accountType } = WAProto_1.proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content);const isHostedAccount = accountType === WAProto_1.proto.ADVEncryptionType.HOSTED;const hmacPrefix = isHostedAccount ? Buffer.from([6, 5]) : Buffer.alloc(0);const advSign = (0, crypto_2.hmacSign)(Buffer.concat([hmacPrefix, details]), Buffer.from(advSecretKey, 'base64'));if (Buffer.compare(hmac, advSign) !== 0) {throw new boom_1.Boom('Invalid account signature');}const account = WAProto_1.proto.ADVSignedDeviceIdentity.decode(details);const { accountSignatureKey, accountSignature, details: deviceDetails } = account;const accountMsg = Buffer.concat([Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public]);if (!crypto_2.Curve.verify(accountSignatureKey, accountMsg, accountSignature)) {throw new boom_1.Boom('Failed to verify account signature');}const devicePrefix = isHostedAccount ? Buffer.from([6, 6]) : Buffer.from([6, 1]);const deviceMsg = Buffer.concat([devicePrefix, deviceDetails, signedIdentityKey.public, accountSignatureKey]);account.deviceSignature = crypto_2.Curve.sign(signedIdentityKey.private, deviceMsg);const identity = (0, signal_1.createSignalIdentity)(jid, accountSignatureKey);const accountEnc = exports.encodeSignedDeviceIdentity(account, false);const deviceIdentity = WAProto_1.proto.ADVDeviceIdentity.decode(account.details);const reply = {tag: 'iq',attrs: { to: WABinary_1.S_WHATSAPP_NET, type: 'result', id: msgId },content: [{ tag: 'pair-device-sign', attrs: {}, content: [{ tag: 'device-identity', attrs: { 'key-index': deviceIdentity.keyIndex.toString() }, content: accountEnc }] }],};const authUpdate = {account,me: { id: jid, name: bizName },signalIdentities: [...(signalIdentities || []), identity],platform: platformNode?.attrs.name,};return { creds: authUpdate, reply };};exports.configureSuccessfulPairing = configureSuccessfulPairing;const encodeSignedDeviceIdentity = (account, includeSignatureKey) => {account = { ...account };if (!includeSignatureKey || !account.accountSignatureKey?.length) account.accountSignatureKey = null;return WAProto_1.proto.ADVSignedDeviceIdentity.encode(account).finish();};exports.encodeSignedDeviceIdentity = encodeSignedDeviceIdentity;Terima kasih. berfungsi dengan baik🙏
23 hours ago23 hr @jjsons wow thank you. this solution working finei think only me cant connect into mpwa
21 hours ago21 hr 15 hours ago, Mas Jawir said:@wong wkwkwk... baca komentarmu sampai keselek aku bro 🤣🤣🚬
12 hours ago12 hr @Elrumie After I successfully changed the connection problem to the device, it was resolved, but there was a new problem, namely failing to send all messages from single messages, campaigns, etc. Is anyone else experiencing the same problem?
5 hours ago5 hr when i cannect whatsapp instant autometic logout whatsapp, whyplease help me anyone tell me how to fix
4 hours ago4 hr mau tanya ke semua nya , ini kendala nya apa ya ga bisa kirim chat apa pun di cek error gini ! pas sudah ganti script yang sebelum nya tidak bisa ter connect dari device ke mpwa
2 hours ago2 hr Halo. Mohon bantuannya teman. Saya butuh rekomendasi Hosting vps yang cocok dan stabil untuk mpwa ini. Ada kah rekomendasi nya. Atau seperti ram. Cpu. Dan lainnya itu sangat membantu. Saya coba vps idcloudhost dengan aapanel berhasil tapi tidak stabil sering kali terputus node js nya dan butuh restart setiap terputus..padahal saya beli paket 150rb lebih per bulan vps nya
1 hour ago1 hr Whatsapp Gateway@Drive. C Saya sudah 10 tahun bertahan di contabo, meski banyak yang komen miring soal hardwarenya, tapi mungkin contabolah yang paling baik menurug saya daripada yang minus lainnya
1 hour ago1 hr Hari ini saya mengalami masalah: WhatsApp Bisnis bisa dipindai dan berfungsi, tetapi ketika saya memindai WhatsApp biasa, prosesnya lama dan muncul pesan "terhubung" di panel admin, tetapi tidak berfungsi. Hal ini juga terjadi pada WhatsApp biasa! Apa yang harus saya lakukan? Edited 1 hour ago1 hr by Shivendra Kr. Sahu
1 hour ago1 hr @Drive. C coba beli di domainesia vps nya, walaupun saya pakai shared hosting node js jarang terputus,
59 minutes ago59 min 3 hours ago, Juragan Bis said:mau tanya ke semua nya , ini kendala nya apa ya ga bisa kirim chat apa pun di cek error gini ! pas sudah ganti script yang sebelum nya tidak bisa ter connect dari device ke mpwaNodejs sudah jalan?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.