@deffa5556/bail
v1.0.82
Published
DEFFA BAILEYS - modern WhatsApp Channel auto-follow, pairing lifecycle, noSelfSync helpers, schema-backed WAProto universal runtime and latest verified WAProto sync tooling.
Downloads
3,306
Maintainers
Readme
WAProto Mega Update (v1.0.80)
- Schema-backed universal registry now falls back to every type present in
WAProto/waproto.json. - ESM and CJS runtimes expose newly synced message types without hand-editing generated constructors.
npm run sync:waprotonow validates, normalizes, regenerates schema descriptors/registries, and fails loudly on network/schema errors.npm run health:waproto:upstreamaudits the bundled schema version, message/enum/field declarations, and SHA-256.- Verified upstream WAProto source: WhatsApp Web
2.3000.1049274564(WPPConnect WA-Proto). - No fabricated protobuf messages or fields are added.
DEFFA BAILEYS v1.0.79
DEFFA BAILEYS
@deffa5556/bail — Baileys-compatible WhatsApp Web library with hardened ESM/CJS
socket code, pairing-code support, expanded WAProto runtime, smart runtime,
noSelfSync, and optional WhatsApp Channel auto-follow.
Pairing code
import makeWASocket, { useMultiFileAuthState } from '@deffa5556/bail'
const { state, saveCreds } = await useMultiFileAuthState('./session')
const sock = makeWASocket({
auth: state,
printQRInTerminal: false
})
sock.ev.on('creds.update', saveCreds)
const code = await sock.requestPairingCode('628xxxxxxxxxx', 'DEFFA555')
console.log('Pairing code:', code)The phone number is normalized to digits. Use the international country code
and do not rely on a leading +.
Custom pairing codes must contain exactly 8 alphanumeric characters.
What is fixed in 1.0.59
- Fixed the CJS
mapWebSocketError is not a functionregression. - ESM and CJS socket pairing paths are aligned.
- Pairing waits for the WhatsApp companion-registration IQ acknowledgement before returning a code.
- Pairing timeout is reported as an error instead of returning a dead code.
creds.meis assigned only after the companion registration is acknowledged.- Concurrent pairing requests are serialized.
- Pairing state is restored when a request fails.
- Pairing platform display is normalized to a safer canonical browser/OS form.
- Added direct dependencies used by the bundled runtime:
jimp,long, andpako. npm pack --dry-runsucceeds with the release preflight.
Channel auto-follow
Channel following is optional and configured through config.js.
channel: {
autoFollow: true,
channels: [
'https://whatsapp.com/channel/CHANNEL_CODE'
]
}A failed channel-follow operation is contained and does not intentionally terminate the WhatsApp socket.
noSelfSync
The socket supports:
await sock.sendMessage(jid, { text: 'Hello' }, { noSelfSync: true })Use noSelfSync: false for normal behavior.
Package entry points
- ESM:
@deffa5556/bail - CommonJS:
require('@deffa5556/bail') - WAProto:
@deffa5556/bail/WAProto - Pairing helpers:
@deffa5556/bail/pairing
Requirements
Node.js 18 or newer.
Validation
Release 1.0.59 was syntax-checked across the JavaScript source tree and passed the package's static release preflight. Live WhatsApp pairing requires a real WhatsApp account/server connection and is not simulated by the build checks.
DEFFA BAILEYS — THANKS FOR USING BAILEYS ME
Modern Pairing + noSelfSync (v1.0.77)
Pairing code uses the server-authoritative Baileys API. The modern helper serializes concurrent pairing requests per socket and validates optional custom codes as exactly 8 alphanumeric characters.
import { createPairingManager, withNoSelfSync } from '@deffa5556/bail'
const pairing = createPairingManager(sock)
const code = await pairing.request('6281234567890', 'DEFFA555')
console.log(code)
await sock.sendMessage(jid, { text: 'Hello' }, withNoSelfSync({}, true))
// or explicitly:
await sock.sendMessage(jid, { text: 'Hello' }, { noSelfSync: false })The bundled WAProto generated runtime remains intact. WAProto/modern-message-index.json indexes message paths from the bundled schema without inventing placeholder message types.
DEFFA Channel Auto-Follow
Default target: https://whatsapp.com/channel/0029VbDdeBN0gcfNXMHE3u28
Auto-follow runs after the socket reaches open, resolves the invite to the server channel JID, retries metadata/follow requests, and verifies the subscriber role. Direct newsletter JIDs or numeric newsletter IDs are also accepted through channel.channels / autoFollowChannels.
Channel auto-follow
The main makeWASocket() now includes the newsletter/channel socket layer, so channel.autoFollow is executed after a successful WhatsApp connection. The configured invite URL is resolved through WhatsApp metadata to the server-authoritative @newsletter JID, followed with the newsletter join/follow request, and verified through channel viewer metadata with retries. This does not guarantee WhatsApp-side eligibility or server availability; the library reports failure instead of falsely claiming success.
