mirror of
https://github.com/skydiver/ewelink-api.git
synced 2025-12-24 06:28:30 +01:00
* 100% coverage for mixins/user/regionMixin.js * check if websocket connection is valid json * removed unnecessary delays * added more test cases * move constants to json files * renamed login method to getCredentials * mixin renamed * don’t export internal methods * mixin renamed * keep socket connection opened * using new getCredentials method * reanmed login to credentials * version bump
20 lines
450 B
JavaScript
20 lines
450 B
JavaScript
const nonce = require('nonce')();
|
|
|
|
const { makeFakeIMEI } = require('../ewelink-helper');
|
|
|
|
const credentialsPayload = ({ email, password }) => ({
|
|
email,
|
|
password,
|
|
version: 6,
|
|
ts: `${Math.round(new Date().getTime() / 1000)}`,
|
|
nonce: `${nonce()}`,
|
|
appid: 'oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq',
|
|
imei: makeFakeIMEI(),
|
|
os: 'iOS',
|
|
model: 'iPhone10,6',
|
|
romVersion: '11.1.2',
|
|
appVersion: '3.5.3',
|
|
});
|
|
|
|
module.exports = credentialsPayload;
|