chore: update proto

the proto was generated using a different method, hence the diff is larger -- but if the method continues to work, we should get very nice little diffs
This commit is contained in:
Adhiraj Singh
2022-06-23 22:14:43 +05:30
parent a75d9118bd
commit 8fa500a8a2
5 changed files with 43127 additions and 35380 deletions

File diff suppressed because it is too large Load Diff

20538
WAProto/index.d.ts vendored

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -105,7 +105,7 @@ export const makeNoiseHandler = (
const certDecoded = decrypt(serverHello!.payload!)
const { intermediate: certIntermediate } = proto.CertChain.decode(certDecoded)
const { issuerSerial } = proto.Details.decode(certIntermediate!.details!)
const { issuerSerial } = proto.CertChainNoiseCertificateDetails.decode(certIntermediate!.details!)
if(issuerSerial !== WA_CERT_DETAILS.SERIAL) {
throw new Boom('certification match failed', { statusCode: 400 })

View File

@@ -66,25 +66,26 @@ export const generateRegistrationNode = (
.digest()
const browserVersion = config.browser[2].split('.')
const companion: proto.ICompanionProps = {
const companion: proto.IDeviceProps = {
os: config.browser[0],
version: {
primary: +(browserVersion[0] || 0),
secondary: +(browserVersion[1] || 1),
tertiary: +(browserVersion[2] || 0),
},
platformType: proto.CompanionProps.CompanionPropsPlatformType[config.browser[1].toUpperCase()] || proto.CompanionProps.CompanionPropsPlatformType.UNKNOWN,
platformType: proto.DeviceProps.DevicePropsPlatformType[config.browser[1].toUpperCase()]
|| proto.DeviceProps.DevicePropsPlatformType.UNKNOWN,
requireFullSync: false,
}
const companionProto = proto.CompanionProps.encode(companion).finish()
const companionProto = proto.DeviceProps.encode(companion).finish()
const registerPayload: proto.IClientPayload = {
...getClientPayload(config),
passive: false,
regData: {
devicePairingData: {
buildHash: appVersionBuf,
companionProps: companionProto,
deviceProps: companionProto,
eRegid: encodeBigEndian(registrationId),
eKeytype: KEY_BUNDLE_TYPE,
eIdent: signedIdentityKey.public,