@neelegirl/baileys 1.5.5 → 1.5.7
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/LICENSE +21 -0
- package/README.md +183 -10
- package/WAProto/WAProto.proto +5007 -0
- package/WAProto/index.d.ts +57712 -0
- package/WAProto/index.js +178969 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +68 -0
- package/lib/Defaults/index.js +137 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/WASignalGroup/GroupProtocol.js +1909 -0
- package/lib/Signal/WASignalGroup/ciphertext_message.js +16 -0
- package/lib/Signal/WASignalGroup/generate-proto.sh +1 -0
- package/lib/Signal/WASignalGroup/group.proto +42 -0
- package/lib/Signal/WASignalGroup/group_cipher.js +120 -0
- package/lib/Signal/WASignalGroup/group_session_builder.js +46 -0
- package/lib/Signal/WASignalGroup/index.js +6 -0
- package/lib/Signal/WASignalGroup/keyhelper.js +21 -0
- package/lib/Signal/WASignalGroup/protobufs.js +3 -0
- package/lib/Signal/WASignalGroup/queue_job.js +69 -0
- package/lib/Signal/WASignalGroup/readme.md +6 -0
- package/lib/Signal/WASignalGroup/sender_chain_key.js +50 -0
- package/lib/Signal/WASignalGroup/sender_key_distribution_message.js +78 -0
- package/lib/Signal/WASignalGroup/sender_key_message.js +92 -0
- package/lib/Signal/WASignalGroup/sender_key_name.js +70 -0
- package/lib/Signal/WASignalGroup/sender_key_record.js +56 -0
- package/lib/Signal/WASignalGroup/sender_key_state.js +129 -0
- package/lib/Signal/WASignalGroup/sender_message_key.js +39 -0
- package/lib/Signal/libsignal.d.ts +4 -0
- package/lib/Signal/libsignal.js +162 -0
- package/lib/Socket/Client/abstract-socket-client.d.ts +15 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +2 -0
- package/lib/Socket/Client/index.js +22 -0
- package/lib/Socket/Client/mobile-socket-client.d.ts +12 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/types.d.ts +16 -0
- package/lib/Socket/Client/types.js +18 -0
- package/lib/Socket/Client/websocket.d.ts +13 -0
- package/lib/Socket/Client/websocket.js +62 -0
- package/lib/Socket/business.d.ts +187 -0
- package/lib/Socket/business.js +268 -0
- package/lib/Socket/chats.d.ts +98 -0
- package/lib/Socket/chats.js +1113 -0
- package/lib/Socket/communities.d.ts +223 -0
- package/lib/Socket/communities.js +433 -0
- package/lib/Socket/groups.d.ts +131 -0
- package/lib/Socket/groups.js +352 -0
- package/lib/Socket/index.d.ts +191 -0
- package/lib/Socket/index.js +23 -0
- package/lib/Socket/messages-recv.d.ts +177 -0
- package/lib/Socket/messages-recv.js +1764 -0
- package/lib/Socket/messages-send.d.ts +168 -0
- package/lib/Socket/messages-send.js +1303 -0
- package/lib/Socket/mex.d.ts +2 -0
- package/lib/Socket/mex.js +47 -0
- package/lib/Socket/newsletter.d.ts +147 -0
- package/lib/Socket/newsletter.js +286 -0
- package/lib/Socket/registration.d.ts +266 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +45 -0
- package/lib/Socket/socket.js +766 -0
- package/lib/Socket/usync.d.ts +37 -0
- package/lib/Socket/usync.js +83 -0
- package/lib/Store/index.d.ts +4 -0
- package/lib/Store/index.js +24 -0
- package/lib/Store/make-cache-manager-store.d.ts +14 -0
- package/lib/Store/make-cache-manager-store.js +90 -0
- package/lib/Store/make-in-memory-store.d.ts +123 -0
- package/lib/Store/make-in-memory-store.js +429 -0
- package/lib/Store/make-ordered-dictionary.d.ts +12 -0
- package/lib/Store/make-ordered-dictionary.js +86 -0
- package/lib/Store/object-repository.d.ts +10 -0
- package/lib/Store/object-repository.js +31 -0
- package/lib/Types/Auth.d.ts +120 -0
- package/lib/Types/Auth.js +3 -0
- package/lib/Types/Call.d.ts +14 -0
- package/lib/Types/Call.js +3 -0
- package/lib/Types/Chat.d.ts +138 -0
- package/lib/Types/Chat.js +9 -0
- package/lib/Types/Contact.d.ts +20 -0
- package/lib/Types/Contact.js +3 -0
- package/lib/Types/Events.d.ts +229 -0
- package/lib/Types/Events.js +3 -0
- package/lib/Types/GroupMetadata.d.ts +66 -0
- package/lib/Types/GroupMetadata.js +3 -0
- package/lib/Types/Label.d.ts +48 -0
- package/lib/Types/Label.js +31 -0
- package/lib/Types/LabelAssociation.d.ts +35 -0
- package/lib/Types/LabelAssociation.js +13 -0
- package/lib/Types/Message.d.ts +473 -0
- package/lib/Types/Message.js +13 -0
- package/lib/Types/MexUpdates.d.ts +9 -0
- package/lib/Types/MexUpdates.js +18 -0
- package/lib/Types/Newsletter.d.ts +109 -0
- package/lib/Types/Newsletter.js +40 -0
- package/lib/Types/Product.d.ts +92 -0
- package/lib/Types/Product.js +3 -0
- package/lib/Types/Signal.d.ts +68 -0
- package/lib/Types/Signal.js +3 -0
- package/lib/Types/Socket.d.ts +122 -0
- package/lib/Types/Socket.js +3 -0
- package/lib/Types/State.d.ts +41 -0
- package/lib/Types/State.js +14 -0
- package/lib/Types/USync.d.ts +26 -0
- package/lib/Types/USync.js +3 -0
- package/lib/Types/index.d.ts +79 -0
- package/lib/Types/index.js +48 -0
- package/lib/Utils/auth-utils.d.ts +21 -0
- package/lib/Utils/auth-utils.js +205 -0
- package/lib/Utils/baileys-event-stream.d.ts +18 -0
- package/lib/Utils/baileys-event-stream.js +70 -0
- package/lib/Utils/business.d.ts +29 -0
- package/lib/Utils/business.js +255 -0
- package/lib/Utils/chat-utils.d.ts +82 -0
- package/lib/Utils/chat-utils.js +781 -0
- package/lib/Utils/check-npm-version.d.ts +15 -0
- package/lib/Utils/check-npm-version.js +52 -0
- package/lib/Utils/crypto.d.ts +56 -0
- package/lib/Utils/crypto.js +179 -0
- package/lib/Utils/decode-wa-message.d.ts +41 -0
- package/lib/Utils/decode-wa-message.js +253 -0
- package/lib/Utils/event-buffer.d.ts +39 -0
- package/lib/Utils/event-buffer.js +565 -0
- package/lib/Utils/generics.d.ts +129 -0
- package/lib/Utils/generics.js +618 -0
- package/lib/Utils/history.d.ts +23 -0
- package/lib/Utils/history.js +110 -0
- package/lib/Utils/index.d.ts +19 -0
- package/lib/Utils/index.js +41 -0
- package/lib/Utils/link-preview.d.ts +23 -0
- package/lib/Utils/link-preview.js +120 -0
- package/lib/Utils/logger.d.ts +13 -0
- package/lib/Utils/logger.js +7 -0
- package/lib/Utils/lt-hash.d.ts +14 -0
- package/lib/Utils/lt-hash.js +58 -0
- package/lib/Utils/make-mutex.d.ts +9 -0
- package/lib/Utils/make-mutex.js +49 -0
- package/lib/Utils/message-retry-manager.d.ts +82 -0
- package/lib/Utils/message-retry-manager.js +177 -0
- package/lib/Utils/messages-media.d.ts +129 -0
- package/lib/Utils/messages-media.js +806 -0
- package/lib/Utils/messages.d.ts +103 -0
- package/lib/Utils/messages.js +1579 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.js +155 -0
- package/lib/Utils/process-message.d.ts +49 -0
- package/lib/Utils/process-message.js +428 -0
- package/lib/Utils/signal.d.ts +42 -0
- package/lib/Utils/signal.js +166 -0
- package/lib/Utils/use-mongo-file-auth-state.d.ts +6 -0
- package/lib/Utils/use-mongo-file-auth-state.js +84 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +18 -0
- package/lib/Utils/use-multi-file-auth-state.js +238 -0
- package/lib/Utils/use-single-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-single-file-auth-state.js +80 -0
- package/lib/Utils/validate-connection.d.ts +13 -0
- package/lib/Utils/validate-connection.js +187 -0
- package/lib/WABinary/constants.d.ts +30 -0
- package/lib/WABinary/constants.js +1316 -0
- package/lib/WABinary/decode.d.ts +9 -0
- package/lib/WABinary/decode.js +288 -0
- package/lib/WABinary/encode.d.ts +3 -0
- package/lib/WABinary/encode.js +265 -0
- package/lib/WABinary/generic-utils.d.ts +28 -0
- package/lib/WABinary/generic-utils.js +142 -0
- package/lib/WABinary/index.d.ts +5 -0
- package/lib/WABinary/index.js +25 -0
- package/lib/WABinary/jid-utils.d.ts +53 -0
- package/lib/WABinary/jid-utils.js +92 -0
- package/lib/WABinary/types.d.ts +22 -0
- package/lib/WABinary/types.js +3 -0
- package/lib/WAM/BinaryInfo.d.ts +16 -0
- package/lib/WAM/BinaryInfo.js +17 -0
- package/lib/WAM/constants.d.ts +47 -0
- package/lib/WAM/constants.js +15371 -0
- package/lib/WAM/encode.d.ts +3 -0
- package/lib/WAM/encode.js +165 -0
- package/lib/WAM/index.d.ts +3 -0
- package/lib/WAM/index.js +23 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +28 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +69 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +10 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +36 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +26 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +62 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +35 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +14 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +46 -0
- package/lib/WAUSync/Protocols/index.d.ts +6 -0
- package/lib/WAUSync/Protocols/index.js +26 -0
- package/lib/WAUSync/USyncQuery.d.ts +31 -0
- package/lib/WAUSync/USyncQuery.js +92 -0
- package/lib/WAUSync/USyncUser.d.ts +12 -0
- package/lib/WAUSync/USyncUser.js +30 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +23 -0
- package/lib/index.d.ts +13 -0
- package/lib/index.js +33 -0
- package/package.json +88 -10
- package/index.js +0 -38
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
"use strict"
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true })
|
|
4
|
+
|
|
5
|
+
const boom_1 = require("@hapi/boom")
|
|
6
|
+
const crypto_1 = require("crypto")
|
|
7
|
+
const WAProto_1 = require("../../WAProto")
|
|
8
|
+
const Defaults_1 = require("../Defaults")
|
|
9
|
+
const WABinary_1 = require("../WABinary")
|
|
10
|
+
const crypto_2 = require("./crypto")
|
|
11
|
+
const generics_1 = require("./generics")
|
|
12
|
+
const signal_1 = require("./signal")
|
|
13
|
+
|
|
14
|
+
const getUserAgent = (config) => {
|
|
15
|
+
return {
|
|
16
|
+
appVersion: {
|
|
17
|
+
primary: config.version[0],
|
|
18
|
+
secondary: config.version[1],
|
|
19
|
+
tertiary: config.version[2],
|
|
20
|
+
},
|
|
21
|
+
platform: WAProto_1.proto.ClientPayload.UserAgent.Platform.WEB,
|
|
22
|
+
releaseChannel: WAProto_1.proto.ClientPayload.UserAgent.ReleaseChannel.BETA,
|
|
23
|
+
osVersion: '0.1',
|
|
24
|
+
device: 'Desktop',
|
|
25
|
+
deviceType: WAProto_1.proto.ClientPayload.UserAgent.DeviceType.DESKTOP,
|
|
26
|
+
osBuildNumber: '0.1',
|
|
27
|
+
localeLanguageIso6391: 'en',
|
|
28
|
+
mnc: '000',
|
|
29
|
+
mcc: '000',
|
|
30
|
+
localeCountryIso31661Alpha2: config.countryCode,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const PLATFORM_MAP = {
|
|
35
|
+
'Mac OS': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.DARWIN,
|
|
36
|
+
'Windows': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN32,
|
|
37
|
+
'Android': WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WIN_HYBRID
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const getWebInfo = (config) => {
|
|
41
|
+
let webSubPlatform = WAProto_1.proto.ClientPayload.WebInfo.WebSubPlatform.WEB_BROWSER
|
|
42
|
+
if (config.syncFullHistory && PLATFORM_MAP[config.browser[0]]) {
|
|
43
|
+
webSubPlatform = PLATFORM_MAP[config.browser[0]]
|
|
44
|
+
}
|
|
45
|
+
return { webSubPlatform }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const getClientPayload = (config) => {
|
|
49
|
+
const payload = {
|
|
50
|
+
connectType: WAProto_1.proto.ClientPayload.ConnectType.WIFI_UNKNOWN,
|
|
51
|
+
connectReason: WAProto_1.proto.ClientPayload.ConnectReason.USER_ACTIVATED,
|
|
52
|
+
userAgent: getUserAgent(config),
|
|
53
|
+
}
|
|
54
|
+
payload.webInfo = getWebInfo(config)
|
|
55
|
+
return payload
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const generateLoginNode = (userJid, config) => {
|
|
59
|
+
const { user, device } = WABinary_1.jidDecode(userJid)
|
|
60
|
+
const payload = {
|
|
61
|
+
...getClientPayload(config),
|
|
62
|
+
passive: false,
|
|
63
|
+
pull: true,
|
|
64
|
+
username: +user,
|
|
65
|
+
device: device,
|
|
66
|
+
}
|
|
67
|
+
return WAProto_1.proto.ClientPayload.fromObject(payload)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const getPlatformType = (platform) => {
|
|
71
|
+
const platformType = platform.toUpperCase()
|
|
72
|
+
return WAProto_1.proto.DeviceProps.PlatformType[platformType] || WAProto_1.proto.DeviceProps.PlatformType.DESKTOP
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const generateRegistrationNode = ({ registrationId, signedPreKey, signedIdentityKey }, config) => {
|
|
76
|
+
// the app version needs to be md5 hashed
|
|
77
|
+
// and passed in
|
|
78
|
+
const appVersionBuf = crypto_1.createHash('md5')
|
|
79
|
+
.update(config.version.join('.')) // join as string
|
|
80
|
+
.digest()
|
|
81
|
+
const companion = {
|
|
82
|
+
os: config.browser[0],
|
|
83
|
+
platformType: getPlatformType(config.browser[1]),
|
|
84
|
+
requireFullSync: config.syncFullHistory,
|
|
85
|
+
}
|
|
86
|
+
const companionProto = WAProto_1.proto.DeviceProps.encode(companion).finish()
|
|
87
|
+
const registerPayload = {
|
|
88
|
+
...getClientPayload(config),
|
|
89
|
+
passive: false,
|
|
90
|
+
pull: false,
|
|
91
|
+
devicePairingData: {
|
|
92
|
+
buildHash: appVersionBuf,
|
|
93
|
+
deviceProps: companionProto,
|
|
94
|
+
eRegid: generics_1.encodeBigEndian(registrationId),
|
|
95
|
+
eKeytype: Defaults_1.KEY_BUNDLE_TYPE,
|
|
96
|
+
eIdent: signedIdentityKey.public,
|
|
97
|
+
eSkeyId: generics_1.encodeBigEndian(signedPreKey.keyId, 3),
|
|
98
|
+
eSkeyVal: signedPreKey.keyPair.public,
|
|
99
|
+
eSkeySig: signedPreKey.signature,
|
|
100
|
+
},
|
|
101
|
+
}
|
|
102
|
+
return WAProto_1.proto.ClientPayload.fromObject(registerPayload)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
const configureSuccessfulPairing = (stanza, { advSecretKey, signedIdentityKey, signalIdentities }) => {
|
|
106
|
+
const msgId = stanza.attrs.id
|
|
107
|
+
const pairSuccessNode = WABinary_1.getBinaryNodeChild(stanza, 'pair-success')
|
|
108
|
+
const deviceIdentityNode = WABinary_1.getBinaryNodeChild(pairSuccessNode, 'device-identity')
|
|
109
|
+
const platformNode = WABinary_1.getBinaryNodeChild(pairSuccessNode, 'platform')
|
|
110
|
+
const deviceNode = WABinary_1.getBinaryNodeChild(pairSuccessNode, 'device')
|
|
111
|
+
const businessNode = WABinary_1.getBinaryNodeChild(pairSuccessNode, 'biz')
|
|
112
|
+
if (!deviceIdentityNode || !deviceNode) {
|
|
113
|
+
throw new boom_1.Boom('Missing device-identity or device in pair success node', { data: stanza })
|
|
114
|
+
}
|
|
115
|
+
const bizName = businessNode?.attrs?.name
|
|
116
|
+
const jid = deviceNode.attrs.jid
|
|
117
|
+
const { details, hmac, accountType } = WAProto_1.proto.ADVSignedDeviceIdentityHMAC.decode(deviceIdentityNode.content)
|
|
118
|
+
const isHostedAccount = accountType !== undefined && accountType === WAProto_1.proto.ADVEncryptionType.HOSTED
|
|
119
|
+
const hmacPrefix = isHostedAccount ? Buffer.from([6, 5]) : Buffer.alloc(0)
|
|
120
|
+
const advSign = crypto_2.hmacSign(Buffer.concat([hmacPrefix, details]), Buffer.from(advSecretKey, 'base64'))
|
|
121
|
+
if (Buffer.compare(hmac, advSign) !== 0) {
|
|
122
|
+
throw new boom_1.Boom('Invalid account signature')
|
|
123
|
+
}
|
|
124
|
+
const account = WAProto_1.proto.ADVSignedDeviceIdentity.decode(details)
|
|
125
|
+
const { accountSignatureKey, accountSignature, details: deviceDetails } = account
|
|
126
|
+
const accountMsg = Buffer.concat([Buffer.from([6, 0]), deviceDetails, signedIdentityKey.public])
|
|
127
|
+
if (!crypto_2.Curve.verify(accountSignatureKey, accountMsg, accountSignature)) {
|
|
128
|
+
throw new boom_1.Boom('Failed to verify account signature')
|
|
129
|
+
}
|
|
130
|
+
const devicePrefix = isHostedAccount ? Buffer.from([6, 6]) : Buffer.from([6, 1])
|
|
131
|
+
const deviceMsg = Buffer.concat([devicePrefix, deviceDetails, signedIdentityKey.public, accountSignatureKey])
|
|
132
|
+
account.deviceSignature = crypto_2.Curve.sign(signedIdentityKey.private, deviceMsg)
|
|
133
|
+
const identity = signal_1.createSignalIdentity(jid, accountSignatureKey)
|
|
134
|
+
const accountEnc = encodeSignedDeviceIdentity(account, false)
|
|
135
|
+
const deviceIdentity = WAProto_1.proto.ADVDeviceIdentity.decode(account.details)
|
|
136
|
+
const reply = {
|
|
137
|
+
tag: 'iq',
|
|
138
|
+
attrs: {
|
|
139
|
+
to: WABinary_1.S_WHATSAPP_NET,
|
|
140
|
+
type: 'result',
|
|
141
|
+
id: msgId,
|
|
142
|
+
},
|
|
143
|
+
content: [
|
|
144
|
+
{
|
|
145
|
+
tag: 'pair-device-sign',
|
|
146
|
+
attrs: {},
|
|
147
|
+
content: [
|
|
148
|
+
{
|
|
149
|
+
tag: 'device-identity',
|
|
150
|
+
attrs: { 'key-index': deviceIdentity.keyIndex.toString() },
|
|
151
|
+
content: accountEnc
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
}
|
|
157
|
+
const authUpdate = {
|
|
158
|
+
account,
|
|
159
|
+
me: { id: jid, name: bizName },
|
|
160
|
+
signalIdentities: [
|
|
161
|
+
...(signalIdentities || []),
|
|
162
|
+
identity
|
|
163
|
+
],
|
|
164
|
+
platform: platformNode?.attrs?.name
|
|
165
|
+
}
|
|
166
|
+
return {
|
|
167
|
+
creds: authUpdate,
|
|
168
|
+
reply
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
const encodeSignedDeviceIdentity = (account, includeSignatureKey) => {
|
|
173
|
+
account = { ...account }
|
|
174
|
+
// set to null if we are not to include the signature key
|
|
175
|
+
// or if we are including the signature key but it is empty
|
|
176
|
+
if (!includeSignatureKey || !account.accountSignatureKey?.length) {
|
|
177
|
+
account.accountSignatureKey = null
|
|
178
|
+
}
|
|
179
|
+
return WAProto_1.proto.ADVSignedDeviceIdentity.encode(account).finish()
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
module.exports = {
|
|
183
|
+
generateLoginNode,
|
|
184
|
+
generateRegistrationNode,
|
|
185
|
+
configureSuccessfulPairing,
|
|
186
|
+
encodeSignedDeviceIdentity
|
|
187
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const TAGS: {
|
|
2
|
+
LIST_EMPTY: number
|
|
3
|
+
DICTIONARY_0: number
|
|
4
|
+
DICTIONARY_1: number
|
|
5
|
+
DICTIONARY_2: number
|
|
6
|
+
DICTIONARY_3: number
|
|
7
|
+
INTEROP_JID: number
|
|
8
|
+
FB_JID: number
|
|
9
|
+
AD_JID: number
|
|
10
|
+
LIST_8: number
|
|
11
|
+
LIST_16: number
|
|
12
|
+
JID_PAIR: number
|
|
13
|
+
HEX_8: number
|
|
14
|
+
BINARY_8: number
|
|
15
|
+
BINARY_20: number
|
|
16
|
+
BINARY_32: number
|
|
17
|
+
NIBBLE_8: number
|
|
18
|
+
PACKED_MAX: number
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export declare const DOUBLE_BYTE_TOKENS: string[][]
|
|
22
|
+
|
|
23
|
+
export declare const SINGLE_BYTE_TOKENS: (string | null)[]
|
|
24
|
+
|
|
25
|
+
export declare const TOKEN_MAP: {
|
|
26
|
+
[token: string]: {
|
|
27
|
+
dict?: number
|
|
28
|
+
index: number
|
|
29
|
+
}
|
|
30
|
+
}
|