feat: native-mobile-api

This commit is contained in:
SamuelScheit
2023-04-20 13:01:11 +02:00
parent 28be45a9b4
commit ef673f62ca
17 changed files with 940 additions and 74 deletions

View File

@@ -1,4 +1,5 @@
import type { proto } from '../../WAProto'
import { RegistrationOptions } from '../Socket/registration'
import type { Contact } from './Contact'
import type { MinimalMessage } from './Message'
@@ -58,6 +59,13 @@ export type AuthenticationCreds = SignalCreds & {
/** number of times history & app state has been synced */
accountSyncCounter: number
accountSettings: AccountSettings
// mobile creds
deviceId: string
phoneId: string
identityId: Buffer
registered: boolean
backupToken: Buffer
registration: RegistrationOptions
}
export type SignalDataTypeMap = {

View File

@@ -31,6 +31,8 @@ export type SocketConfig = {
defaultQueryTimeoutMs: number | undefined
/** ping-pong interval for WS connection */
keepAliveIntervalMs: number
/** should baileys use the mobile api instead of the multi device api */
mobile?: boolean
/** proxy agent */
agent?: Agent
/** pino logger */