From 612e33694e6292ef63da64af05cb48de17921fe2 Mon Sep 17 00:00:00 2001 From: Ichiro Date: Fri, 19 Jul 2024 05:33:12 +0900 Subject: [PATCH 1/2] Fix error on null historyData.transactionHistoryList --- src/MB.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MB.ts b/src/MB.ts index 794fd0a..a91a7a9 100644 --- a/src/MB.ts +++ b/src/MB.ts @@ -308,7 +308,7 @@ export default class MB { const historyData = await this.mbRequest({ path: "/api/retail-transactionms/transactionms/get-account-transaction-history", json: body }); - if (!historyData) return; + if (!historyData || !historyData.transactionHistoryList) return; const transactionHistories: TransactionInfo[] = []; @@ -337,4 +337,4 @@ export default class MB { return transactionHistories; } -} \ No newline at end of file +} From 39b5752eaaf091a060aff2b57b60d10dc2a51885 Mon Sep 17 00:00:00 2001 From: ws Date: Fri, 19 Jul 2024 06:25:21 +0900 Subject: [PATCH 2/2] Update version --- dist/index.js | 2 +- dist/index.js.map | 2 +- docs/classes/MB.default.html | 31 ++++++++++--------- .../typings_ReplaceColor.default.html | 2 +- .../utils_Global.generateDeviceId.html | 2 +- docs/functions/utils_Global.getTimeNow.html | 2 +- docs/functions/utils_LoadWasm.default.html | 2 +- .../interfaces/typings_MBApi.BalanceData.html | 10 +++--- .../interfaces/typings_MBApi.BalanceList.html | 10 +++--- .../typings_MBApi.TransactionInfo.html | 28 ++++++++--------- .../typings_MBLogin.CaptchaResponse.html | 8 ++--- .../typings_ReplaceColor.replaceData.html | 12 +++---- docs/modules/MB.html | 2 +- docs/modules/typings_MBApi.html | 2 +- docs/modules/typings_MBLogin.html | 2 +- docs/modules/typings_ReplaceColor.html | 2 +- docs/modules/utils_Global.html | 2 +- docs/modules/utils_LoadWasm.html | 2 +- docs/variables/utils_Global.FPR.html | 2 +- .../utils_Global.defaultHeaders.html | 2 +- .../utils_Global.defaultTesseractConfig.html | 2 +- package-lock.json | 4 +-- 22 files changed, 68 insertions(+), 65 deletions(-) diff --git a/dist/index.js b/dist/index.js index fa2c3fe..8bcfce6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -814,7 +814,7 @@ var MB = class { "toDate": (0, import_moment2.default)(data.toDate, "D/M/YYYY").format("DD/MM/YYYY") }; const historyData = await this.mbRequest({ path: "/api/retail-transactionms/transactionms/get-account-transaction-history", json: body }); - if (!historyData) return; + if (!historyData || !historyData.transactionHistoryList) return; const transactionHistories = []; historyData.transactionHistoryList.forEach((transactionRaw) => { const transaction = transactionRaw; diff --git a/dist/index.js.map b/dist/index.js.map index 0a53223..b7d5928 100644 --- a/dist/index.js.map +++ b/dist/index.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/index.ts","../src/MB.ts","../src/utils/Global.ts","../src/utils/LoadWasm.ts"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport MB from \"./MB\";\n\nexport { MB };","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { createHash } from \"node:crypto\";\n\nimport Jimp from \"jimp\";\nimport moment from \"moment\";\nimport { recognize } from \"node-tesseract-ocr\";\nimport replaceColor from \"replace-color\";\nimport { Client } from \"undici\";\n\nimport { BalanceData, BalanceList, TransactionInfo } from \"./typings/MBApi\";\nimport { CaptchaResponse } from \"./typings/MBLogin\";\nimport { defaultHeaders, defaultTesseractConfig, FPR, generateDeviceId, getTimeNow } from \"./utils/Global\";\nimport wasmEnc from \"./utils/LoadWasm\";\n\n/**\n * Main client class for all activities.\n */\nexport default class MB {\n /**\n * @readonly\n * Your MB account username.\n */\n public readonly username: string;\n\n /**\n * @readonly\n * Your MB account password.\n */\n public readonly password: string;\n\n /**\n * @private\n * MB-returned Session ID. Use it to validate the request.\n */\n private sessionId: string | null | undefined;\n\n /**\n * @private\n * Your non-unique, time-based Device ID.\n */\n private deviceId: string = generateDeviceId();\n\n /**\n * Undici client. Use it for sending the request to API.\n */\n public client = new Client(\"https://online.mbbank.com.vn\");\n\n /**\n * WASM Buffer, downloaded from MB.\n */\n private wasmData!: Buffer;\n\n /**\n * Login to your MB account via username and password.\n * @param data - Your MB Bank login credentials: username and password.\n * @param data.username Your MB Bank login username, usually your registered phone number.\n * @param data.password Your MB Bank login password.\n */\n public constructor(data: { username: string, password: string }) {\n if (!data.username || !data.password) throw new Error(\"You must define at least a MB account to use with this library!\");\n\n this.username = data.username;\n this.password = data.password;\n }\n\n /**\n * A private function to process MB's captcha and get Session ID.\n */\n private async login(): Promise {\n // Request ID/Ref ID for MB\n const rId = getTimeNow();\n\n const headers = defaultHeaders as any;\n headers[\"X-Request-Id\"] = rId;\n\n const captchaReq = await this.client.request({\n method: \"POST\",\n path: \"/api/retail-web-internetbankingms/getCaptchaImage\",\n headers,\n body: JSON.stringify({\n \"sessionId\": \"\",\n \"refNo\": rId,\n \"deviceIdCommon\": this.deviceId,\n }),\n });\n\n const captchaRes: CaptchaResponse = await captchaReq.body.json() as CaptchaResponse;\n let captchaBuffer = Buffer.from(captchaRes.imageString, \"base64\");\n\n // Remove the first line with static hex code\n const captchaImagePRCLine1 = await replaceColor({\n image: captchaBuffer,\n colors: {\n type: \"hex\",\n targetColor: \"#847069\",\n replaceColor: \"#ffffff\",\n },\n });\n\n captchaBuffer = await captchaImagePRCLine1.getBufferAsync(Jimp.MIME_PNG);\n\n // Remove the second line with static hex code\n const captchaImagePRCLine2 = await replaceColor({\n image: captchaBuffer,\n colors: {\n type: \"hex\",\n targetColor: \"#ffe3d5\",\n replaceColor: \"#ffffff\",\n },\n });\n\n captchaBuffer = await captchaImagePRCLine2.getBufferAsync(Jimp.MIME_PNG);\n\n // Get captcha via OCR\n const captchaContent = (await recognize(captchaBuffer, defaultTesseractConfig)).replaceAll(\"\\n\", \"\").replaceAll(\" \", \"\").slice(0, -1);\n\n // wasm\n if (!this.wasmData) {\n const wasm = await this.client.request({\n method: \"GET\",\n path: \"/assets/wasm/main.wasm\",\n headers: defaultHeaders,\n });\n this.wasmData = Buffer.from(await wasm.body.arrayBuffer());\n }\n\n // Create Data\n const requestData = {\n userId: this.username,\n password: createHash(\"md5\").update(this.password).digest(\"hex\"),\n captcha: captchaContent,\n ibAuthen2faString: FPR,\n sessionId: null,\n refNo: getTimeNow(),\n deviceIdCommon: this.deviceId,\n };\n\n const loginReq = await this.client.request({\n method: \"POST\",\n path: \"/api/retail_web/internetbanking/v2.0/doLogin\",\n headers: defaultHeaders,\n body: JSON.stringify({\n dataEnc: await wasmEnc(this.wasmData, requestData, \"0\"),\n }),\n });\n\n const loginRes = await loginReq.body.json() as any;\n\n if (!loginRes.result) {\n throw new Error(\"Login failed: Unknown data\");\n }\n\n if (loginRes.result.ok) {\n this.sessionId = loginRes.sessionId;\n return true;\n }\n else if (loginRes.result.responseCode === \"GW283\") {\n // Again...\n return this.login();\n }\n else {\n const e = new Error(\"Login failed: (\" + loginRes.result.responseCode + \"): \" + loginRes.result.message) as any;\n e.code = loginRes.result.responseCode;\n throw e;\n }\n }\n\n /**\n * A private function to calculate the reference ID required by MB.\n * @returns The reference ID that is required by MB.\n */\n private getRefNo() {\n return `${this.username}-${getTimeNow()}`;\n }\n\n private async mbRequest(data: { path: string, json?: object, headers?: object }) {\n if (!this.sessionId) {\n await this.login();\n this.mbRequest(data);\n }\n\n const rId = this.getRefNo();\n\n const headers = defaultHeaders as any;\n headers[\"X-Request-Id\"] = rId;\n headers[\"Deviceid\"] = this.deviceId,\n headers[\"Refno\"] = rId;\n\n const defaultBody = {\n \"sessionId\": this.sessionId,\n \"refNo\": rId,\n \"deviceIdCommon\": this.deviceId,\n };\n const body = Object.assign(defaultBody, data.json);\n\n const httpReq = await this.client.request({\n method: \"POST\",\n path: data.path,\n headers,\n body: JSON.stringify(body),\n });\n\n const httpRes = await httpReq.body.json() as any;\n\n if (!httpRes.result) {\n this.getBalance();\n }\n else if (httpRes.result.ok == true) return httpRes;\n else if (httpRes.result.responseCode === \"GW200\") {\n await this.login();\n this.mbRequest(data);\n }\n else {\n throw new Error(\"Request failed (\" + httpRes.result.responseCode + \"): \" + httpRes.result.message);\n }\n }\n\n /**\n * Gets your account's balance info.\n * @returns Your MB account's balance object.\n */\n public async getBalance(): Promise {\n const balanceData = await this.mbRequest({ path: \"/api/retail-web-accountms/getBalance\" });\n\n if (!balanceData) return;\n\n const balance: BalanceList = {\n totalBalance: balanceData.totalBalanceEquivalent,\n currencyEquivalent: balanceData.currencyEquivalent,\n balances: [],\n };\n\n balanceData.acct_list.forEach((acctInfo: unknown) => {\n const acct = acctInfo as any;\n\n const balanceData: BalanceData = {\n number: acct.acctNo,\n name: acct.acctNm,\n currency: acct.ccyCd,\n balance: acct.currentBalance,\n };\n\n balance.balances?.push(balanceData);\n });\n\n balanceData.internationalAcctList.forEach((acctInfo: unknown) => {\n const acct = acctInfo as any;\n\n const balanceData: BalanceData = {\n number: acct.acctNo,\n name: acct.acctNm,\n currency: acct.ccyCd,\n balance: acct.currentBalance,\n };\n\n balance.balances?.push(balanceData);\n });\n\n return balance;\n }\n\n /**\n * Gets all your transactions on MB.\n * @param data The data that function requires.\n * @param data.accountNumber The MB's account number needs to be checked.\n * @param data.fromDate The date you want to start looking up, format dd/mm/yyyy. Make sure this is not smaller than 90 days from the ending date.\n * @param data.toDate The date you want to end the lookup, format dd/mm/yyyy. Make sure this is not bigger than 90 days from the starting date.\n * @returns TransactionInfo object as an array, see TransactionInfo for more details.\n *\n * @example\n * If you want to get transactions history from account \"1234567890\", from 1/12/2023 to 1/1/2024:\n * ```ts\n * .getTransactionsHistory({ accountNumber: \"1234567890\", fromDate: \"1/12/2023\", toDate: \"1/1/2024\" });\n * ```\n */\n public async getTransactionsHistory(data: { accountNumber: string, fromDate: string, toDate: string }): Promise {\n if (moment().day() - moment(data.fromDate, \"D/M/YYYY\").day() > 90 || moment().day() - moment(data.fromDate, \"D/M/YYYY\").day() > 90) throw new Error(\"Date formatting error: Max transaction history must be shorter than 90 days!\");\n if (moment(data.fromDate, \"DD/MM/YYYY\").day() - moment(data.toDate, \"D/M/YYYY\").day() > 90) throw new Error(\"Date formatting error: Max transaction history must be shorter than 90 days!\");\n\n const body = {\n \"accountNo\": data.accountNumber,\n \"fromDate\": moment(data.fromDate, \"D/M/YYYY\").format(\"DD/MM/YYYY\"),\n \"toDate\": moment(data.toDate, \"D/M/YYYY\").format(\"DD/MM/YYYY\"),\n };\n\n const historyData = await this.mbRequest({ path: \"/api/retail-transactionms/transactionms/get-account-transaction-history\", json: body });\n\n if (!historyData) return;\n\n const transactionHistories: TransactionInfo[] = [];\n\n historyData.transactionHistoryList.forEach((transactionRaw: unknown) => {\n\n const transaction = transactionRaw as any;\n\n const transactionData: TransactionInfo = {\n postDate: transaction.postingDate,\n transactionDate: transaction.transactionDate,\n accountNumber: transaction.accountNo,\n creditAmount: transaction.creditAmount,\n debitAmount: transaction.debitAmount,\n transactionCurrency: transaction.currency,\n transactionDesc: transaction.description,\n balanceAvailable: transaction.availableBalance,\n refNo: transaction.refNo,\n toAccountName: transaction.benAccountName,\n toBank: transaction.bankName,\n toAccountNumber: transaction.benAccountName,\n type: transaction.transactionType,\n };\n\n transactionHistories.push(transactionData);\n });\n\n return transactionHistories;\n }\n}","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport moment from \"moment\";\n\nexport function getTimeNow(): string {\n return moment().format(\"YYYYMMDDHHmmss\" + moment().millisecond().toString().slice(0, -1));\n}\n\nexport function generateDeviceId() {\n return \"s1rmi184-mbib-0000-0000-\" + getTimeNow();\n}\n\nexport const defaultHeaders = {\n 'Cache-Control': 'no-cache',\n 'Accept': 'application/json, text/plain, */*',\n 'Authorization': 'Basic RU1CUkVUQUlMV0VCOlNEMjM0ZGZnMzQlI0BGR0AzNHNmc2RmNDU4NDNm',\n 'User-Agent': \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\",\n \"Origin\": \"https://online.mbbank.com.vn\",\n \"Referer\": \"https://online.mbbank.com.vn/\",\n \"Content-Type\": \"application/json; charset=UTF-8\",\n app: \"MB_WEB\",\n};\n\nexport const defaultTesseractConfig = {\n lang: \"eng\",\n oem: 1,\n psm: 12,\n};\n\nexport const FPR = \"c7a1beebb9400375bb187daa33de9659\";","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint-disable */\n// @ts-nocheck\n\nglobalThis.location = new URL(\"https://online.mbbank.com.vn/pl/login\");\n\nconst processAsync = (param1, param2, generatorFunction) =>\n new Promise((resolve, reject) => {\n var handleResult = (result) => {\n try {\n processStep(generatorFunction.next(result));\n } catch (error) {\n reject(error);\n }\n },\n handleError = (error) => {\n try {\n processStep(generatorFunction.throw(error));\n } catch (err) {\n reject(err);\n }\n },\n processStep = (step) =>\n step.done\n ? resolve(step.value)\n : Promise.resolve(step.value).then(handleResult, handleError);\n processStep(\n (generatorFunction = generatorFunction.apply(param1, param2)).next(),\n );\n });\n\n(() => {\n const ErrENOSYS = () => {\n const err = new Error(\"not implemented\");\n err.code = \"ENOSYS\";\n return err;\n };\n if (!globalThis.fs) {\n let data = \"\";\n globalThis.fs = {\n constants: {\n O_WRONLY: -1,\n O_RDWR: -1,\n O_CREAT: -1,\n O_TRUNC: -1,\n O_APPEND: -1,\n O_EXCL: -1,\n },\n writeSync(fd, buffer) {\n data += TextDecoderUnicode.decode(buffer);\n const indexEOL = data.lastIndexOf(\"\\n\");\n if (indexEOL != -1) {\n console.log(data.substring(0x0, indexEOL));\n data = data.substring(indexEOL + 0x1);\n }\n return buffer.length;\n },\n write(fd, buffer, offset, length, position, callback) {\n if (offset === 0 && length === buffer.length && position === null) {\n callback(null, this.writeSync(fd, buffer));\n } else {\n callback(ErrENOSYS());\n }\n },\n fsync(fd, callback) {\n callback(null);\n },\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid: () => -1,\n getgid: () => -1,\n geteuid: () => -1,\n getegid: () => -1,\n pid: -1,\n ppid: -1,\n };\n }\n if (!globalThis.crypto) {\n throw new Error(\n \"globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)\",\n );\n }\n if (!globalThis.performance) {\n throw new Error(\n \"globalThis.performance is not available, polyfill required (performance.now only)\",\n );\n }\n if (!globalThis.TextEncoder) {\n throw new Error(\n \"globalThis.TextEncoder is not available, polyfill required\",\n );\n }\n if (!globalThis.TextDecoder) {\n throw new Error(\n \"globalThis.TextDecoder is not available, polyfill required\",\n );\n }\n\n const TextEncoderUnicode = new TextEncoder(\"utf-8\");\n const TextDecoderUnicode = new TextDecoder(\"utf-8\");\n\n globalThis.Go = class {\n constructor() {\n this.argv = [\"js\"];\n this.env = {};\n this.exit = (exitCode) => {\n if (exitCode !== 0) {\n console.warn(\"exit code:\", exitCode);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = new Map();\n this._nextCallbackTimeoutID = 1;\n\n const setMemoryValue = (address, value) => {\n this.mem.setUint32(address + 0x0, value, true);\n this.mem.setUint32(\n address + 0x4,\n Math.floor(value / 0x100000000),\n true,\n );\n };\n\n const getValueFromMemory = (address) => {\n const floatValue = this.mem.getFloat64(address, true);\n if (floatValue === 0) {\n return;\n }\n if (!isNaN(floatValue)) {\n return floatValue;\n }\n const intValue = this.mem.getUint32(address, true);\n return this._values[intValue];\n };\n\n const setValueInMemory = (address, value) => {\n if (typeof value === \"number\" && value !== 0) {\n if (isNaN(value)) {\n this.mem.setUint32(address + 0x4, 0x7ff80000, true);\n this.mem.setUint32(address, 0x0, true);\n } else {\n this.mem.setFloat64(address, value, true);\n }\n return;\n }\n\n if (value === undefined) {\n this.mem.setFloat64(address, 0x0, true);\n return;\n }\n\n let id = this._ids.get(value);\n if (id === undefined) {\n id = this._idPool.pop();\n if (id === undefined) {\n id = this._values.length;\n }\n this._values[id] = value;\n this._goRefCounts[id] = 0;\n this._ids.set(value, id);\n }\n this._goRefCounts[id]++;\n\n let typeFlag = 0;\n switch (typeof value) {\n case \"object\":\n if (value !== null) {\n typeFlag = 1;\n }\n break;\n case \"string\":\n typeFlag = 2;\n break;\n case \"symbol\":\n typeFlag = 3;\n break;\n case \"function\":\n typeFlag = 4;\n }\n\n this.mem.setUint32(address + 0x4, 0x7ff80000 | typeFlag, true);\n this.mem.setUint32(address, id, true);\n };\n\n const getByteArrayFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n return new Uint8Array(\n this._inst.exports.mem.buffer,\n startAddress,\n length,\n );\n };\n\n const getArrayFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n const array = new Array(length);\n for (let i = 0; i < length; i++) {\n array[i] = getValueFromMemory(startAddress + 0x8 * i);\n }\n\n return array;\n };\n\n const getStringFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n return TextDecoderUnicode.decode(\n new DataView(this._inst.exports.mem.buffer, startAddress, length),\n );\n };\n\n const timeDifference = Date.now() - performance.now();\n\n this.importObject = {\n _gotest: {\n add: (a, b) => a + b,\n },\n gojs: {\n \"runtime.wasmExit\": (input) => {\n const exitCode = this.mem.getInt32(0x8 + (input >>>= 0x0), true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(exitCode);\n },\n \"runtime.wasmWrite\": (address) => {\n const fileDescriptor =\n this.mem.getUint32(0x8 + (address >>>= 0x0) + 0x0, true) +\n 0x100000000 *\n this.mem.getInt32(0x8 + (address >>>= 0x0) + 0x4, true);\n\n const dataAddress =\n this.mem.getUint32(address + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x10 + 0x4, true);\n\n const dataLength = this.mem.getInt32(address + 0x18, true);\n\n fs.writeSync(\n fileDescriptor,\n new Uint8Array(\n this._inst.exports.mem.buffer,\n dataAddress,\n dataLength,\n ),\n );\n },\n \"runtime.resetMemoryDataView\": (_0x1fc0dd) => {\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n \"runtime.nanotime1\": (_0x5843c4) => {\n setMemoryValue(\n 0x8 + (_0x5843c4 >>>= 0x0),\n 0xf4240 * (timeDifference + performance.now()),\n );\n },\n \"runtime.walltime\": (_0x431dd5) => {\n _0x431dd5 >>>= 0x0;\n const _0x2d1628 = new Date().getTime();\n setMemoryValue(_0x431dd5 + 0x8, _0x2d1628 / 0x3e8);\n this.mem.setInt32(\n _0x431dd5 + 0x10,\n (_0x2d1628 % 0x3e8) * 0xf4240,\n true,\n );\n },\n \"runtime.scheduleTimeoutEvent\": (_0x40be90) => {\n _0x40be90 >>>= 0x0;\n const _0x4d23db = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(\n _0x4d23db,\n setTimeout(() => {\n for (this._resume(); this._scheduledTimeouts.has(_0x4d23db);) {\n console.warn(\"scheduleTimeoutEvent: missed timeout event\");\n this._resume();\n }\n }, this.mem.getUint32(_0x40be90 + 0x8 + 0x0, true) + 0x100000000 * this.mem.getInt32(_0x40be90 + 0x8 + 0x4, true)),\n );\n this.mem.setInt32(_0x40be90 + 0x10, _0x4d23db, true);\n },\n \"runtime.clearTimeoutEvent\": (_0x4d392b) => {\n const _0x157834 = this.mem.getInt32(\n 0x8 + (_0x4d392b >>>= 0x0),\n true,\n );\n clearTimeout(this._scheduledTimeouts.get(_0x157834));\n this._scheduledTimeouts[\"delete\"](_0x157834);\n },\n \"runtime.getRandomData\": (_0xfc09b6) => {\n crypto.getRandomValues(\n getByteArrayFromMemory(0x8 + (_0xfc09b6 >>>= 0x0)),\n );\n },\n \"syscall/js.finalizeRef\": (_0x5edca4) => {\n const _0x57d4fc = this.mem.getUint32(\n 0x8 + (_0x5edca4 >>>= 0x0),\n true,\n );\n this._goRefCounts[_0x57d4fc]--;\n if (this._goRefCounts[_0x57d4fc] === 0x0) {\n const _0x372c88 = this._values[_0x57d4fc];\n this._values[_0x57d4fc] = null;\n this._ids[\"delete\"](_0x372c88);\n this._idPool.push(_0x57d4fc);\n }\n },\n \"syscall/js.stringVal\": (_0x11c7ea) => {\n setValueInMemory(\n 0x18 + (_0x11c7ea >>>= 0x0),\n getStringFromMemory(_0x11c7ea + 0x8),\n );\n },\n \"syscall/js.valueGet\": (_0x3c119c) => {\n _0x3c119c >>>= 0x0;\n const _0x57d3f0 = Reflect.get(\n getValueFromMemory(_0x3c119c + 0x8),\n getStringFromMemory(_0x3c119c + 0x10),\n );\n _0x3c119c = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x3c119c + 0x20, _0x57d3f0);\n },\n \"syscall/js.valueSet\": (_0x2df90d) => {\n _0x2df90d >>>= 0x0;\n Reflect.set(\n getValueFromMemory(_0x2df90d + 0x8),\n getStringFromMemory(_0x2df90d + 0x10),\n getValueFromMemory(_0x2df90d + 0x20),\n );\n },\n \"syscall/js.valueDelete\": (_0x5c6169) => {\n _0x5c6169 >>>= 0x0;\n Reflect.deleteProperty(\n getValueFromMemory(_0x5c6169 + 0x8),\n getStringFromMemory(_0x5c6169 + 0x10),\n );\n },\n \"syscall/js.valueIndex\": (_0xd5cf7e) => {\n setValueInMemory(\n 0x18 + (_0xd5cf7e >>>= 0x0),\n Reflect.get(\n getValueFromMemory(_0xd5cf7e + 0x8),\n this.mem.getUint32(_0xd5cf7e + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(_0xd5cf7e + 0x10 + 0x4, true),\n ),\n );\n },\n \"syscall/js.valueSetIndex\": (_0x1b938f) => {\n _0x1b938f >>>= 0x0;\n Reflect.set(\n getValueFromMemory(_0x1b938f + 0x8),\n this.mem.getUint32(_0x1b938f + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(_0x1b938f + 0x10 + 0x4, true),\n getValueFromMemory(_0x1b938f + 0x18),\n );\n },\n \"syscall/js.valueCall\": (_0x38baf6) => {\n _0x38baf6 >>>= 0x0;\n try {\n const _0xb55714 = getValueFromMemory(_0x38baf6 + 0x8);\n const _0x4b45ac = Reflect.get(\n _0xb55714,\n getStringFromMemory(_0x38baf6 + 0x10),\n );\n const _0x929c90 = getArrayFromMemory(_0x38baf6 + 0x20);\n const _0x331ca0 = Reflect.apply(_0x4b45ac, _0xb55714, _0x929c90);\n _0x38baf6 = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x38baf6 + 0x38, _0x331ca0);\n this.mem.setUint8(_0x38baf6 + 0x40, 0x1);\n } catch (_0x3b2cd8) {\n _0x38baf6 = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x38baf6 + 0x38, _0x3b2cd8);\n this.mem.setUint8(_0x38baf6 + 0x40, 0x0);\n }\n },\n \"syscall/js.valueInvoke\": (_0x19f35b) => {\n _0x19f35b >>>= 0x0;\n try {\n const _0xdd2a3 = getValueFromMemory(_0x19f35b + 0x8);\n const _0x330c8f = getArrayFromMemory(_0x19f35b + 0x10);\n const _0x49e23c = Reflect.apply(_0xdd2a3, undefined, _0x330c8f);\n _0x19f35b = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x19f35b + 0x28, _0x49e23c);\n this.mem.setUint8(_0x19f35b + 0x30, 0x1);\n } catch (_0x5bd1fc) {\n _0x19f35b = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x19f35b + 0x28, _0x5bd1fc);\n this.mem.setUint8(_0x19f35b + 0x30, 0x0);\n }\n },\n \"syscall/js.valueNew\": (_0x275c5e) => {\n _0x275c5e >>>= 0x0;\n try {\n const _0x2a547b = getValueFromMemory(_0x275c5e + 0x8);\n const _0x3fcde3 = getArrayFromMemory(_0x275c5e + 0x10);\n const _0x94eb67 = Reflect.construct(_0x2a547b, _0x3fcde3);\n _0x275c5e = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x275c5e + 0x28, _0x94eb67);\n this.mem.setUint8(_0x275c5e + 0x30, 0x1);\n } catch (_0x5b3614) {\n _0x275c5e = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x275c5e + 0x28, _0x5b3614);\n this.mem.setUint8(_0x275c5e + 0x30, 0x0);\n }\n },\n \"syscall/js.valueLength\": (_0x2cc204) => {\n setMemoryValue(\n 0x10 + (_0x2cc204 >>>= 0x0),\n parseInt(getValueFromMemory(_0x2cc204 + 0x8).length),\n );\n },\n \"syscall/js.valuePrepareString\": (_0x57c513) => {\n _0x57c513 >>>= 0x0;\n const _0xe5ad3d = TextEncoderUnicode.encode(\n String(getValueFromMemory(_0x57c513 + 0x8)),\n );\n setValueInMemory(_0x57c513 + 0x10, _0xe5ad3d);\n setMemoryValue(_0x57c513 + 0x18, _0xe5ad3d.length);\n },\n \"syscall/js.valueLoadString\": (_0xd20694) => {\n const _0x1bcf7e = getValueFromMemory(0x8 + (_0xd20694 >>>= 0x0));\n getByteArrayFromMemory(_0xd20694 + 0x10).set(_0x1bcf7e);\n },\n \"syscall/js.valueInstanceOf\": (_0x515e20) => {\n this.mem.setUint8(\n 0x18 + (_0x515e20 >>>= 0x0),\n getValueFromMemory(_0x515e20 + 0x8) instanceof\n getValueFromMemory(_0x515e20 + 0x10)\n ? 0x1\n : 0x0,\n );\n },\n \"syscall/js.copyBytesToGo\": (_0x3b040d) => {\n const _0xcf50d7 = getByteArrayFromMemory(\n 0x8 + (_0x3b040d >>>= 0x0),\n );\n const _0x502788 = getValueFromMemory(_0x3b040d + 0x20);\n if (\n !(\n _0x502788 instanceof Uint8Array ||\n _0x502788 instanceof Uint8ClampedArray\n )\n ) {\n return void this.mem.setUint8(_0x3b040d + 0x30, 0x0);\n }\n const _0x347884 = _0x502788.subarray(0x0, _0xcf50d7.length);\n _0xcf50d7.set(_0x347884);\n setMemoryValue(_0x3b040d + 0x28, _0x347884.length);\n this.mem.setUint8(_0x3b040d + 0x30, 0x1);\n },\n \"syscall/js.copyBytesToJS\": (_0x2c7dbd) => {\n const _0x3e840b = getValueFromMemory(0x8 + (_0x2c7dbd >>>= 0x0));\n const _0x47be1d = getByteArrayFromMemory(_0x2c7dbd + 0x10);\n if (\n !(\n _0x3e840b instanceof Uint8Array ||\n _0x3e840b instanceof Uint8ClampedArray\n )\n ) {\n return void this.mem.setUint8(_0x2c7dbd + 0x30, 0x0);\n }\n const _0x2d9d42 = _0x47be1d.subarray(0x0, _0x3e840b.length);\n _0x3e840b.set(_0x2d9d42);\n setMemoryValue(_0x2c7dbd + 0x28, _0x2d9d42.length);\n this.mem.setUint8(_0x2c7dbd + 0x30, 0x1);\n },\n debug: (_0x5560e3) => {\n console.log(_0x5560e3);\n },\n },\n };\n }\n run(_0x3a3ab2) {\n return processAsync(this, null, function* () {\n if (!(_0x3a3ab2 instanceof WebAssembly.Instance)) {\n throw new Error(\"Go.run: WebAssembly.Instance expected\");\n }\n this._inst = _0x3a3ab2;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [NaN, 0x0, null, true, false, globalThis, this];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = new Map([\n [0x0, 0x1],\n [null, 0x2],\n [true, 0x3],\n [false, 0x4],\n [globalThis, 0x5],\n [this, 0x6],\n ]);\n this._idPool = [];\n this.exited = false;\n let _0x5c27d6 = 0x1000;\n const _0x17ab00 = (_0x592ac2) => {\n const _0x42047b = _0x5c27d6;\n const _0x169394 = TextEncoderUnicode.encode(_0x592ac2 + \"\\0\");\n new Uint8Array(this.mem.buffer, _0x5c27d6, _0x169394.length).set(\n _0x169394,\n );\n _0x5c27d6 += _0x169394.length;\n if (_0x5c27d6 % 0x8 != 0x0) {\n _0x5c27d6 += 0x8 - (_0x5c27d6 % 0x8);\n }\n return _0x42047b;\n };\n const _0x33ce5b = this.argv.length;\n const _0x1d93e4 = [];\n this.argv.forEach((_0x2b450c) => {\n _0x1d93e4.push(_0x17ab00(_0x2b450c));\n });\n _0x1d93e4.push(0x0);\n Object.keys(this.env)\n .sort()\n .forEach((_0x5793a5) => {\n _0x1d93e4.push(_0x17ab00(_0x5793a5 + \"=\" + this.env[_0x5793a5]));\n });\n _0x1d93e4.push(0x0);\n const _0x1563af = _0x5c27d6;\n _0x1d93e4.forEach((_0x2954fa) => {\n this.mem.setUint32(_0x5c27d6, _0x2954fa, true);\n this.mem.setUint32(_0x5c27d6 + 0x4, 0x0, true);\n _0x5c27d6 += 0x8;\n });\n if (_0x5c27d6 >= 0x3000) {\n throw new Error(\n \"total length of command line and environment variables exceeds limit\",\n );\n }\n this._inst.exports.run(_0x33ce5b, _0x1563af);\n if (this.exited) {\n this._resolveExitPromise();\n }\n yield this._exitPromise;\n });\n }\n _resume() {\n if (this.exited) {\n throw new Error(\"Go program has already exited\");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const this_ = this;\n return function() {\n const event = {\n id,\n this: this,\n args: arguments,\n };\n this_._pendingEvent = event;\n this_._resume();\n return event.result;\n };\n }\n };\n})();\n\nexport default function(wasmBytes: Buffer, requestData: any, args1: string): Promise {\n return processAsync(this, null, function* () {\n const go = new Go();\n const instance = (yield WebAssembly.instantiate(wasmBytes, go.importObject))\n .instance;\n go.run(instance);\n return globalThis.bder(JSON.stringify(requestData), args1);\n });\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwBA,yBAA2B;AAE3B,kBAAiB;AACjB,IAAAA,iBAAmB;AACnB,gCAA0B;AAC1B,2BAAyB;AACzB,oBAAuB;;;ACNvB,oBAA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AI,eAAAA,SAAO,KAAK,UAAU,YAAY,EAAE,IAAI,QAAI,eAAAA,SAAO,KAAK,QAAQ,UAAU,EAAE,IAAI,IAAI,GAAI,OAAM,IAAI,MAAM,8EAA8E;AAE1L,UAAM,OAAO;AAAA,MACT,aAAa,KAAK;AAAA,MAClB,gBAAY,eAAAA,SAAO,KAAK,UAAU,UAAU,EAAE,OAAO,YAAY;AAAA,MACjE,cAAU,eAAAA,SAAO,KAAK,QAAQ,UAAU,EAAE,OAAO,YAAY;AAAA,IACjE;AAEA,UAAM,cAAc,MAAM,KAAK,UAAU,EAAE,MAAM,2EAA2E,MAAM,KAAK,CAAC;AAExI,QAAI,CAAC,YAAa;AAElB,UAAM,uBAA0C,CAAC;AAEjD,gBAAY,uBAAuB,QAAQ,CAAC,mBAA4B;AAEpE,YAAM,cAAc;AAEpB,YAAM,kBAAmC;AAAA,QACrC,UAAU,YAAY;AAAA,QACtB,iBAAiB,YAAY;AAAA,QAC7B,eAAe,YAAY;AAAA,QAC3B,cAAc,YAAY;AAAA,QAC1B,aAAa,YAAY;AAAA,QACzB,qBAAqB,YAAY;AAAA,QACjC,iBAAiB,YAAY;AAAA,QAC7B,kBAAkB,YAAY;AAAA,QAC9B,OAAO,YAAY;AAAA,QACnB,eAAe,YAAY;AAAA,QAC3B,QAAQ,YAAY;AAAA,QACpB,iBAAiB,YAAY;AAAA,QAC7B,MAAM,YAAY;AAAA,MACtB;AAEA,2BAAqB,KAAK,eAAe;AAAA,IAC7C,CAAC;AAED,WAAO;AAAA,EACX;AACJ;","names":["import_moment","moment","replaceColor","Jimp","balanceData","moment"]} \ No newline at end of file +{"version":3,"sources":["../src/index.ts","../src/MB.ts","../src/utils/Global.ts","../src/utils/LoadWasm.ts"],"sourcesContent":["/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport MB from \"./MB\";\n\nexport { MB };","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport { createHash } from \"node:crypto\";\n\nimport Jimp from \"jimp\";\nimport moment from \"moment\";\nimport { recognize } from \"node-tesseract-ocr\";\nimport replaceColor from \"replace-color\";\nimport { Client } from \"undici\";\n\nimport { BalanceData, BalanceList, TransactionInfo } from \"./typings/MBApi\";\nimport { CaptchaResponse } from \"./typings/MBLogin\";\nimport { defaultHeaders, defaultTesseractConfig, FPR, generateDeviceId, getTimeNow } from \"./utils/Global\";\nimport wasmEnc from \"./utils/LoadWasm\";\n\n/**\n * Main client class for all activities.\n */\nexport default class MB {\n /**\n * @readonly\n * Your MB account username.\n */\n public readonly username: string;\n\n /**\n * @readonly\n * Your MB account password.\n */\n public readonly password: string;\n\n /**\n * @private\n * MB-returned Session ID. Use it to validate the request.\n */\n private sessionId: string | null | undefined;\n\n /**\n * @private\n * Your non-unique, time-based Device ID.\n */\n private deviceId: string = generateDeviceId();\n\n /**\n * Undici client. Use it for sending the request to API.\n */\n public client = new Client(\"https://online.mbbank.com.vn\");\n\n /**\n * WASM Buffer, downloaded from MB.\n */\n private wasmData!: Buffer;\n\n /**\n * Login to your MB account via username and password.\n * @param data - Your MB Bank login credentials: username and password.\n * @param data.username Your MB Bank login username, usually your registered phone number.\n * @param data.password Your MB Bank login password.\n */\n public constructor(data: { username: string, password: string }) {\n if (!data.username || !data.password) throw new Error(\"You must define at least a MB account to use with this library!\");\n\n this.username = data.username;\n this.password = data.password;\n }\n\n /**\n * A private function to process MB's captcha and get Session ID.\n */\n private async login(): Promise {\n // Request ID/Ref ID for MB\n const rId = getTimeNow();\n\n const headers = defaultHeaders as any;\n headers[\"X-Request-Id\"] = rId;\n\n const captchaReq = await this.client.request({\n method: \"POST\",\n path: \"/api/retail-web-internetbankingms/getCaptchaImage\",\n headers,\n body: JSON.stringify({\n \"sessionId\": \"\",\n \"refNo\": rId,\n \"deviceIdCommon\": this.deviceId,\n }),\n });\n\n const captchaRes: CaptchaResponse = await captchaReq.body.json() as CaptchaResponse;\n let captchaBuffer = Buffer.from(captchaRes.imageString, \"base64\");\n\n // Remove the first line with static hex code\n const captchaImagePRCLine1 = await replaceColor({\n image: captchaBuffer,\n colors: {\n type: \"hex\",\n targetColor: \"#847069\",\n replaceColor: \"#ffffff\",\n },\n });\n\n captchaBuffer = await captchaImagePRCLine1.getBufferAsync(Jimp.MIME_PNG);\n\n // Remove the second line with static hex code\n const captchaImagePRCLine2 = await replaceColor({\n image: captchaBuffer,\n colors: {\n type: \"hex\",\n targetColor: \"#ffe3d5\",\n replaceColor: \"#ffffff\",\n },\n });\n\n captchaBuffer = await captchaImagePRCLine2.getBufferAsync(Jimp.MIME_PNG);\n\n // Get captcha via OCR\n const captchaContent = (await recognize(captchaBuffer, defaultTesseractConfig)).replaceAll(\"\\n\", \"\").replaceAll(\" \", \"\").slice(0, -1);\n\n // wasm\n if (!this.wasmData) {\n const wasm = await this.client.request({\n method: \"GET\",\n path: \"/assets/wasm/main.wasm\",\n headers: defaultHeaders,\n });\n this.wasmData = Buffer.from(await wasm.body.arrayBuffer());\n }\n\n // Create Data\n const requestData = {\n userId: this.username,\n password: createHash(\"md5\").update(this.password).digest(\"hex\"),\n captcha: captchaContent,\n ibAuthen2faString: FPR,\n sessionId: null,\n refNo: getTimeNow(),\n deviceIdCommon: this.deviceId,\n };\n\n const loginReq = await this.client.request({\n method: \"POST\",\n path: \"/api/retail_web/internetbanking/v2.0/doLogin\",\n headers: defaultHeaders,\n body: JSON.stringify({\n dataEnc: await wasmEnc(this.wasmData, requestData, \"0\"),\n }),\n });\n\n const loginRes = await loginReq.body.json() as any;\n\n if (!loginRes.result) {\n throw new Error(\"Login failed: Unknown data\");\n }\n\n if (loginRes.result.ok) {\n this.sessionId = loginRes.sessionId;\n return true;\n }\n else if (loginRes.result.responseCode === \"GW283\") {\n // Again...\n return this.login();\n }\n else {\n const e = new Error(\"Login failed: (\" + loginRes.result.responseCode + \"): \" + loginRes.result.message) as any;\n e.code = loginRes.result.responseCode;\n throw e;\n }\n }\n\n /**\n * A private function to calculate the reference ID required by MB.\n * @returns The reference ID that is required by MB.\n */\n private getRefNo() {\n return `${this.username}-${getTimeNow()}`;\n }\n\n private async mbRequest(data: { path: string, json?: object, headers?: object }) {\n if (!this.sessionId) {\n await this.login();\n this.mbRequest(data);\n }\n\n const rId = this.getRefNo();\n\n const headers = defaultHeaders as any;\n headers[\"X-Request-Id\"] = rId;\n headers[\"Deviceid\"] = this.deviceId,\n headers[\"Refno\"] = rId;\n\n const defaultBody = {\n \"sessionId\": this.sessionId,\n \"refNo\": rId,\n \"deviceIdCommon\": this.deviceId,\n };\n const body = Object.assign(defaultBody, data.json);\n\n const httpReq = await this.client.request({\n method: \"POST\",\n path: data.path,\n headers,\n body: JSON.stringify(body),\n });\n\n const httpRes = await httpReq.body.json() as any;\n\n if (!httpRes.result) {\n this.getBalance();\n }\n else if (httpRes.result.ok == true) return httpRes;\n else if (httpRes.result.responseCode === \"GW200\") {\n await this.login();\n this.mbRequest(data);\n }\n else {\n throw new Error(\"Request failed (\" + httpRes.result.responseCode + \"): \" + httpRes.result.message);\n }\n }\n\n /**\n * Gets your account's balance info.\n * @returns Your MB account's balance object.\n */\n public async getBalance(): Promise {\n const balanceData = await this.mbRequest({ path: \"/api/retail-web-accountms/getBalance\" });\n\n if (!balanceData) return;\n\n const balance: BalanceList = {\n totalBalance: balanceData.totalBalanceEquivalent,\n currencyEquivalent: balanceData.currencyEquivalent,\n balances: [],\n };\n\n balanceData.acct_list.forEach((acctInfo: unknown) => {\n const acct = acctInfo as any;\n\n const balanceData: BalanceData = {\n number: acct.acctNo,\n name: acct.acctNm,\n currency: acct.ccyCd,\n balance: acct.currentBalance,\n };\n\n balance.balances?.push(balanceData);\n });\n\n balanceData.internationalAcctList.forEach((acctInfo: unknown) => {\n const acct = acctInfo as any;\n\n const balanceData: BalanceData = {\n number: acct.acctNo,\n name: acct.acctNm,\n currency: acct.ccyCd,\n balance: acct.currentBalance,\n };\n\n balance.balances?.push(balanceData);\n });\n\n return balance;\n }\n\n /**\n * Gets all your transactions on MB.\n * @param data The data that function requires.\n * @param data.accountNumber The MB's account number needs to be checked.\n * @param data.fromDate The date you want to start looking up, format dd/mm/yyyy. Make sure this is not smaller than 90 days from the ending date.\n * @param data.toDate The date you want to end the lookup, format dd/mm/yyyy. Make sure this is not bigger than 90 days from the starting date.\n * @returns TransactionInfo object as an array, see TransactionInfo for more details.\n *\n * @example\n * If you want to get transactions history from account \"1234567890\", from 1/12/2023 to 1/1/2024:\n * ```ts\n * .getTransactionsHistory({ accountNumber: \"1234567890\", fromDate: \"1/12/2023\", toDate: \"1/1/2024\" });\n * ```\n */\n public async getTransactionsHistory(data: { accountNumber: string, fromDate: string, toDate: string }): Promise {\n if (moment().day() - moment(data.fromDate, \"D/M/YYYY\").day() > 90 || moment().day() - moment(data.fromDate, \"D/M/YYYY\").day() > 90) throw new Error(\"Date formatting error: Max transaction history must be shorter than 90 days!\");\n if (moment(data.fromDate, \"DD/MM/YYYY\").day() - moment(data.toDate, \"D/M/YYYY\").day() > 90) throw new Error(\"Date formatting error: Max transaction history must be shorter than 90 days!\");\n\n const body = {\n \"accountNo\": data.accountNumber,\n \"fromDate\": moment(data.fromDate, \"D/M/YYYY\").format(\"DD/MM/YYYY\"),\n \"toDate\": moment(data.toDate, \"D/M/YYYY\").format(\"DD/MM/YYYY\"),\n };\n\n const historyData = await this.mbRequest({ path: \"/api/retail-transactionms/transactionms/get-account-transaction-history\", json: body });\n\n if (!historyData || !historyData.transactionHistoryList) return;\n\n const transactionHistories: TransactionInfo[] = [];\n\n historyData.transactionHistoryList.forEach((transactionRaw: unknown) => {\n\n const transaction = transactionRaw as any;\n\n const transactionData: TransactionInfo = {\n postDate: transaction.postingDate,\n transactionDate: transaction.transactionDate,\n accountNumber: transaction.accountNo,\n creditAmount: transaction.creditAmount,\n debitAmount: transaction.debitAmount,\n transactionCurrency: transaction.currency,\n transactionDesc: transaction.description,\n balanceAvailable: transaction.availableBalance,\n refNo: transaction.refNo,\n toAccountName: transaction.benAccountName,\n toBank: transaction.bankName,\n toAccountNumber: transaction.benAccountName,\n type: transaction.transactionType,\n };\n\n transactionHistories.push(transactionData);\n });\n\n return transactionHistories;\n }\n}\n","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\nimport moment from \"moment\";\n\nexport function getTimeNow(): string {\n return moment().format(\"YYYYMMDDHHmmss\" + moment().millisecond().toString().slice(0, -1));\n}\n\nexport function generateDeviceId() {\n return \"s1rmi184-mbib-0000-0000-\" + getTimeNow();\n}\n\nexport const defaultHeaders = {\n 'Cache-Control': 'no-cache',\n 'Accept': 'application/json, text/plain, */*',\n 'Authorization': 'Basic RU1CUkVUQUlMV0VCOlNEMjM0ZGZnMzQlI0BGR0AzNHNmc2RmNDU4NDNm',\n 'User-Agent': \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36\",\n \"Origin\": \"https://online.mbbank.com.vn\",\n \"Referer\": \"https://online.mbbank.com.vn/\",\n \"Content-Type\": \"application/json; charset=UTF-8\",\n app: \"MB_WEB\",\n};\n\nexport const defaultTesseractConfig = {\n lang: \"eng\",\n oem: 1,\n psm: 12,\n};\n\nexport const FPR = \"c7a1beebb9400375bb187daa33de9659\";","/*\n * MIT License\n *\n * Copyright (c) 2024 CookieGMVN and contributors\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n/* eslint-disable */\n// @ts-nocheck\n\nglobalThis.location = new URL(\"https://online.mbbank.com.vn/pl/login\");\n\nconst processAsync = (param1, param2, generatorFunction) =>\n new Promise((resolve, reject) => {\n var handleResult = (result) => {\n try {\n processStep(generatorFunction.next(result));\n } catch (error) {\n reject(error);\n }\n },\n handleError = (error) => {\n try {\n processStep(generatorFunction.throw(error));\n } catch (err) {\n reject(err);\n }\n },\n processStep = (step) =>\n step.done\n ? resolve(step.value)\n : Promise.resolve(step.value).then(handleResult, handleError);\n processStep(\n (generatorFunction = generatorFunction.apply(param1, param2)).next(),\n );\n });\n\n(() => {\n const ErrENOSYS = () => {\n const err = new Error(\"not implemented\");\n err.code = \"ENOSYS\";\n return err;\n };\n if (!globalThis.fs) {\n let data = \"\";\n globalThis.fs = {\n constants: {\n O_WRONLY: -1,\n O_RDWR: -1,\n O_CREAT: -1,\n O_TRUNC: -1,\n O_APPEND: -1,\n O_EXCL: -1,\n },\n writeSync(fd, buffer) {\n data += TextDecoderUnicode.decode(buffer);\n const indexEOL = data.lastIndexOf(\"\\n\");\n if (indexEOL != -1) {\n console.log(data.substring(0x0, indexEOL));\n data = data.substring(indexEOL + 0x1);\n }\n return buffer.length;\n },\n write(fd, buffer, offset, length, position, callback) {\n if (offset === 0 && length === buffer.length && position === null) {\n callback(null, this.writeSync(fd, buffer));\n } else {\n callback(ErrENOSYS());\n }\n },\n fsync(fd, callback) {\n callback(null);\n },\n };\n }\n if (!globalThis.process) {\n globalThis.process = {\n getuid: () => -1,\n getgid: () => -1,\n geteuid: () => -1,\n getegid: () => -1,\n pid: -1,\n ppid: -1,\n };\n }\n if (!globalThis.crypto) {\n throw new Error(\n \"globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)\",\n );\n }\n if (!globalThis.performance) {\n throw new Error(\n \"globalThis.performance is not available, polyfill required (performance.now only)\",\n );\n }\n if (!globalThis.TextEncoder) {\n throw new Error(\n \"globalThis.TextEncoder is not available, polyfill required\",\n );\n }\n if (!globalThis.TextDecoder) {\n throw new Error(\n \"globalThis.TextDecoder is not available, polyfill required\",\n );\n }\n\n const TextEncoderUnicode = new TextEncoder(\"utf-8\");\n const TextDecoderUnicode = new TextDecoder(\"utf-8\");\n\n globalThis.Go = class {\n constructor() {\n this.argv = [\"js\"];\n this.env = {};\n this.exit = (exitCode) => {\n if (exitCode !== 0) {\n console.warn(\"exit code:\", exitCode);\n }\n };\n this._exitPromise = new Promise((resolve) => {\n this._resolveExitPromise = resolve;\n });\n this._pendingEvent = null;\n this._scheduledTimeouts = new Map();\n this._nextCallbackTimeoutID = 1;\n\n const setMemoryValue = (address, value) => {\n this.mem.setUint32(address + 0x0, value, true);\n this.mem.setUint32(\n address + 0x4,\n Math.floor(value / 0x100000000),\n true,\n );\n };\n\n const getValueFromMemory = (address) => {\n const floatValue = this.mem.getFloat64(address, true);\n if (floatValue === 0) {\n return;\n }\n if (!isNaN(floatValue)) {\n return floatValue;\n }\n const intValue = this.mem.getUint32(address, true);\n return this._values[intValue];\n };\n\n const setValueInMemory = (address, value) => {\n if (typeof value === \"number\" && value !== 0) {\n if (isNaN(value)) {\n this.mem.setUint32(address + 0x4, 0x7ff80000, true);\n this.mem.setUint32(address, 0x0, true);\n } else {\n this.mem.setFloat64(address, value, true);\n }\n return;\n }\n\n if (value === undefined) {\n this.mem.setFloat64(address, 0x0, true);\n return;\n }\n\n let id = this._ids.get(value);\n if (id === undefined) {\n id = this._idPool.pop();\n if (id === undefined) {\n id = this._values.length;\n }\n this._values[id] = value;\n this._goRefCounts[id] = 0;\n this._ids.set(value, id);\n }\n this._goRefCounts[id]++;\n\n let typeFlag = 0;\n switch (typeof value) {\n case \"object\":\n if (value !== null) {\n typeFlag = 1;\n }\n break;\n case \"string\":\n typeFlag = 2;\n break;\n case \"symbol\":\n typeFlag = 3;\n break;\n case \"function\":\n typeFlag = 4;\n }\n\n this.mem.setUint32(address + 0x4, 0x7ff80000 | typeFlag, true);\n this.mem.setUint32(address, id, true);\n };\n\n const getByteArrayFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n return new Uint8Array(\n this._inst.exports.mem.buffer,\n startAddress,\n length,\n );\n };\n\n const getArrayFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n const array = new Array(length);\n for (let i = 0; i < length; i++) {\n array[i] = getValueFromMemory(startAddress + 0x8 * i);\n }\n\n return array;\n };\n\n const getStringFromMemory = (address) => {\n const startAddress =\n this.mem.getUint32(address + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x4, true);\n\n const length =\n this.mem.getUint32(address + 0x8, true) +\n 0x100000000 * this.mem.getInt32(address + 0xc, true);\n\n return TextDecoderUnicode.decode(\n new DataView(this._inst.exports.mem.buffer, startAddress, length),\n );\n };\n\n const timeDifference = Date.now() - performance.now();\n\n this.importObject = {\n _gotest: {\n add: (a, b) => a + b,\n },\n gojs: {\n \"runtime.wasmExit\": (input) => {\n const exitCode = this.mem.getInt32(0x8 + (input >>>= 0x0), true);\n this.exited = true;\n delete this._inst;\n delete this._values;\n delete this._goRefCounts;\n delete this._ids;\n delete this._idPool;\n this.exit(exitCode);\n },\n \"runtime.wasmWrite\": (address) => {\n const fileDescriptor =\n this.mem.getUint32(0x8 + (address >>>= 0x0) + 0x0, true) +\n 0x100000000 *\n this.mem.getInt32(0x8 + (address >>>= 0x0) + 0x4, true);\n\n const dataAddress =\n this.mem.getUint32(address + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(address + 0x10 + 0x4, true);\n\n const dataLength = this.mem.getInt32(address + 0x18, true);\n\n fs.writeSync(\n fileDescriptor,\n new Uint8Array(\n this._inst.exports.mem.buffer,\n dataAddress,\n dataLength,\n ),\n );\n },\n \"runtime.resetMemoryDataView\": (_0x1fc0dd) => {\n this.mem = new DataView(this._inst.exports.mem.buffer);\n },\n \"runtime.nanotime1\": (_0x5843c4) => {\n setMemoryValue(\n 0x8 + (_0x5843c4 >>>= 0x0),\n 0xf4240 * (timeDifference + performance.now()),\n );\n },\n \"runtime.walltime\": (_0x431dd5) => {\n _0x431dd5 >>>= 0x0;\n const _0x2d1628 = new Date().getTime();\n setMemoryValue(_0x431dd5 + 0x8, _0x2d1628 / 0x3e8);\n this.mem.setInt32(\n _0x431dd5 + 0x10,\n (_0x2d1628 % 0x3e8) * 0xf4240,\n true,\n );\n },\n \"runtime.scheduleTimeoutEvent\": (_0x40be90) => {\n _0x40be90 >>>= 0x0;\n const _0x4d23db = this._nextCallbackTimeoutID;\n this._nextCallbackTimeoutID++;\n this._scheduledTimeouts.set(\n _0x4d23db,\n setTimeout(() => {\n for (this._resume(); this._scheduledTimeouts.has(_0x4d23db);) {\n console.warn(\"scheduleTimeoutEvent: missed timeout event\");\n this._resume();\n }\n }, this.mem.getUint32(_0x40be90 + 0x8 + 0x0, true) + 0x100000000 * this.mem.getInt32(_0x40be90 + 0x8 + 0x4, true)),\n );\n this.mem.setInt32(_0x40be90 + 0x10, _0x4d23db, true);\n },\n \"runtime.clearTimeoutEvent\": (_0x4d392b) => {\n const _0x157834 = this.mem.getInt32(\n 0x8 + (_0x4d392b >>>= 0x0),\n true,\n );\n clearTimeout(this._scheduledTimeouts.get(_0x157834));\n this._scheduledTimeouts[\"delete\"](_0x157834);\n },\n \"runtime.getRandomData\": (_0xfc09b6) => {\n crypto.getRandomValues(\n getByteArrayFromMemory(0x8 + (_0xfc09b6 >>>= 0x0)),\n );\n },\n \"syscall/js.finalizeRef\": (_0x5edca4) => {\n const _0x57d4fc = this.mem.getUint32(\n 0x8 + (_0x5edca4 >>>= 0x0),\n true,\n );\n this._goRefCounts[_0x57d4fc]--;\n if (this._goRefCounts[_0x57d4fc] === 0x0) {\n const _0x372c88 = this._values[_0x57d4fc];\n this._values[_0x57d4fc] = null;\n this._ids[\"delete\"](_0x372c88);\n this._idPool.push(_0x57d4fc);\n }\n },\n \"syscall/js.stringVal\": (_0x11c7ea) => {\n setValueInMemory(\n 0x18 + (_0x11c7ea >>>= 0x0),\n getStringFromMemory(_0x11c7ea + 0x8),\n );\n },\n \"syscall/js.valueGet\": (_0x3c119c) => {\n _0x3c119c >>>= 0x0;\n const _0x57d3f0 = Reflect.get(\n getValueFromMemory(_0x3c119c + 0x8),\n getStringFromMemory(_0x3c119c + 0x10),\n );\n _0x3c119c = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x3c119c + 0x20, _0x57d3f0);\n },\n \"syscall/js.valueSet\": (_0x2df90d) => {\n _0x2df90d >>>= 0x0;\n Reflect.set(\n getValueFromMemory(_0x2df90d + 0x8),\n getStringFromMemory(_0x2df90d + 0x10),\n getValueFromMemory(_0x2df90d + 0x20),\n );\n },\n \"syscall/js.valueDelete\": (_0x5c6169) => {\n _0x5c6169 >>>= 0x0;\n Reflect.deleteProperty(\n getValueFromMemory(_0x5c6169 + 0x8),\n getStringFromMemory(_0x5c6169 + 0x10),\n );\n },\n \"syscall/js.valueIndex\": (_0xd5cf7e) => {\n setValueInMemory(\n 0x18 + (_0xd5cf7e >>>= 0x0),\n Reflect.get(\n getValueFromMemory(_0xd5cf7e + 0x8),\n this.mem.getUint32(_0xd5cf7e + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(_0xd5cf7e + 0x10 + 0x4, true),\n ),\n );\n },\n \"syscall/js.valueSetIndex\": (_0x1b938f) => {\n _0x1b938f >>>= 0x0;\n Reflect.set(\n getValueFromMemory(_0x1b938f + 0x8),\n this.mem.getUint32(_0x1b938f + 0x10 + 0x0, true) +\n 0x100000000 * this.mem.getInt32(_0x1b938f + 0x10 + 0x4, true),\n getValueFromMemory(_0x1b938f + 0x18),\n );\n },\n \"syscall/js.valueCall\": (_0x38baf6) => {\n _0x38baf6 >>>= 0x0;\n try {\n const _0xb55714 = getValueFromMemory(_0x38baf6 + 0x8);\n const _0x4b45ac = Reflect.get(\n _0xb55714,\n getStringFromMemory(_0x38baf6 + 0x10),\n );\n const _0x929c90 = getArrayFromMemory(_0x38baf6 + 0x20);\n const _0x331ca0 = Reflect.apply(_0x4b45ac, _0xb55714, _0x929c90);\n _0x38baf6 = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x38baf6 + 0x38, _0x331ca0);\n this.mem.setUint8(_0x38baf6 + 0x40, 0x1);\n } catch (_0x3b2cd8) {\n _0x38baf6 = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x38baf6 + 0x38, _0x3b2cd8);\n this.mem.setUint8(_0x38baf6 + 0x40, 0x0);\n }\n },\n \"syscall/js.valueInvoke\": (_0x19f35b) => {\n _0x19f35b >>>= 0x0;\n try {\n const _0xdd2a3 = getValueFromMemory(_0x19f35b + 0x8);\n const _0x330c8f = getArrayFromMemory(_0x19f35b + 0x10);\n const _0x49e23c = Reflect.apply(_0xdd2a3, undefined, _0x330c8f);\n _0x19f35b = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x19f35b + 0x28, _0x49e23c);\n this.mem.setUint8(_0x19f35b + 0x30, 0x1);\n } catch (_0x5bd1fc) {\n _0x19f35b = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x19f35b + 0x28, _0x5bd1fc);\n this.mem.setUint8(_0x19f35b + 0x30, 0x0);\n }\n },\n \"syscall/js.valueNew\": (_0x275c5e) => {\n _0x275c5e >>>= 0x0;\n try {\n const _0x2a547b = getValueFromMemory(_0x275c5e + 0x8);\n const _0x3fcde3 = getArrayFromMemory(_0x275c5e + 0x10);\n const _0x94eb67 = Reflect.construct(_0x2a547b, _0x3fcde3);\n _0x275c5e = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x275c5e + 0x28, _0x94eb67);\n this.mem.setUint8(_0x275c5e + 0x30, 0x1);\n } catch (_0x5b3614) {\n _0x275c5e = this._inst.exports.getsp() >>> 0x0;\n setValueInMemory(_0x275c5e + 0x28, _0x5b3614);\n this.mem.setUint8(_0x275c5e + 0x30, 0x0);\n }\n },\n \"syscall/js.valueLength\": (_0x2cc204) => {\n setMemoryValue(\n 0x10 + (_0x2cc204 >>>= 0x0),\n parseInt(getValueFromMemory(_0x2cc204 + 0x8).length),\n );\n },\n \"syscall/js.valuePrepareString\": (_0x57c513) => {\n _0x57c513 >>>= 0x0;\n const _0xe5ad3d = TextEncoderUnicode.encode(\n String(getValueFromMemory(_0x57c513 + 0x8)),\n );\n setValueInMemory(_0x57c513 + 0x10, _0xe5ad3d);\n setMemoryValue(_0x57c513 + 0x18, _0xe5ad3d.length);\n },\n \"syscall/js.valueLoadString\": (_0xd20694) => {\n const _0x1bcf7e = getValueFromMemory(0x8 + (_0xd20694 >>>= 0x0));\n getByteArrayFromMemory(_0xd20694 + 0x10).set(_0x1bcf7e);\n },\n \"syscall/js.valueInstanceOf\": (_0x515e20) => {\n this.mem.setUint8(\n 0x18 + (_0x515e20 >>>= 0x0),\n getValueFromMemory(_0x515e20 + 0x8) instanceof\n getValueFromMemory(_0x515e20 + 0x10)\n ? 0x1\n : 0x0,\n );\n },\n \"syscall/js.copyBytesToGo\": (_0x3b040d) => {\n const _0xcf50d7 = getByteArrayFromMemory(\n 0x8 + (_0x3b040d >>>= 0x0),\n );\n const _0x502788 = getValueFromMemory(_0x3b040d + 0x20);\n if (\n !(\n _0x502788 instanceof Uint8Array ||\n _0x502788 instanceof Uint8ClampedArray\n )\n ) {\n return void this.mem.setUint8(_0x3b040d + 0x30, 0x0);\n }\n const _0x347884 = _0x502788.subarray(0x0, _0xcf50d7.length);\n _0xcf50d7.set(_0x347884);\n setMemoryValue(_0x3b040d + 0x28, _0x347884.length);\n this.mem.setUint8(_0x3b040d + 0x30, 0x1);\n },\n \"syscall/js.copyBytesToJS\": (_0x2c7dbd) => {\n const _0x3e840b = getValueFromMemory(0x8 + (_0x2c7dbd >>>= 0x0));\n const _0x47be1d = getByteArrayFromMemory(_0x2c7dbd + 0x10);\n if (\n !(\n _0x3e840b instanceof Uint8Array ||\n _0x3e840b instanceof Uint8ClampedArray\n )\n ) {\n return void this.mem.setUint8(_0x2c7dbd + 0x30, 0x0);\n }\n const _0x2d9d42 = _0x47be1d.subarray(0x0, _0x3e840b.length);\n _0x3e840b.set(_0x2d9d42);\n setMemoryValue(_0x2c7dbd + 0x28, _0x2d9d42.length);\n this.mem.setUint8(_0x2c7dbd + 0x30, 0x1);\n },\n debug: (_0x5560e3) => {\n console.log(_0x5560e3);\n },\n },\n };\n }\n run(_0x3a3ab2) {\n return processAsync(this, null, function* () {\n if (!(_0x3a3ab2 instanceof WebAssembly.Instance)) {\n throw new Error(\"Go.run: WebAssembly.Instance expected\");\n }\n this._inst = _0x3a3ab2;\n this.mem = new DataView(this._inst.exports.mem.buffer);\n this._values = [NaN, 0x0, null, true, false, globalThis, this];\n this._goRefCounts = new Array(this._values.length).fill(Infinity);\n this._ids = new Map([\n [0x0, 0x1],\n [null, 0x2],\n [true, 0x3],\n [false, 0x4],\n [globalThis, 0x5],\n [this, 0x6],\n ]);\n this._idPool = [];\n this.exited = false;\n let _0x5c27d6 = 0x1000;\n const _0x17ab00 = (_0x592ac2) => {\n const _0x42047b = _0x5c27d6;\n const _0x169394 = TextEncoderUnicode.encode(_0x592ac2 + \"\\0\");\n new Uint8Array(this.mem.buffer, _0x5c27d6, _0x169394.length).set(\n _0x169394,\n );\n _0x5c27d6 += _0x169394.length;\n if (_0x5c27d6 % 0x8 != 0x0) {\n _0x5c27d6 += 0x8 - (_0x5c27d6 % 0x8);\n }\n return _0x42047b;\n };\n const _0x33ce5b = this.argv.length;\n const _0x1d93e4 = [];\n this.argv.forEach((_0x2b450c) => {\n _0x1d93e4.push(_0x17ab00(_0x2b450c));\n });\n _0x1d93e4.push(0x0);\n Object.keys(this.env)\n .sort()\n .forEach((_0x5793a5) => {\n _0x1d93e4.push(_0x17ab00(_0x5793a5 + \"=\" + this.env[_0x5793a5]));\n });\n _0x1d93e4.push(0x0);\n const _0x1563af = _0x5c27d6;\n _0x1d93e4.forEach((_0x2954fa) => {\n this.mem.setUint32(_0x5c27d6, _0x2954fa, true);\n this.mem.setUint32(_0x5c27d6 + 0x4, 0x0, true);\n _0x5c27d6 += 0x8;\n });\n if (_0x5c27d6 >= 0x3000) {\n throw new Error(\n \"total length of command line and environment variables exceeds limit\",\n );\n }\n this._inst.exports.run(_0x33ce5b, _0x1563af);\n if (this.exited) {\n this._resolveExitPromise();\n }\n yield this._exitPromise;\n });\n }\n _resume() {\n if (this.exited) {\n throw new Error(\"Go program has already exited\");\n }\n this._inst.exports.resume();\n if (this.exited) {\n this._resolveExitPromise();\n }\n }\n _makeFuncWrapper(id) {\n const this_ = this;\n return function() {\n const event = {\n id,\n this: this,\n args: arguments,\n };\n this_._pendingEvent = event;\n this_._resume();\n return event.result;\n };\n }\n };\n})();\n\nexport default function(wasmBytes: Buffer, requestData: any, args1: string): Promise {\n return processAsync(this, null, function* () {\n const go = new Go();\n const instance = (yield WebAssembly.instantiate(wasmBytes, go.importObject))\n .instance;\n go.run(instance);\n return globalThis.bder(JSON.stringify(requestData), args1);\n });\n}"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACwBA,yBAA2B;AAE3B,kBAAiB;AACjB,IAAAA,iBAAmB;AACnB,gCAA0B;AAC1B,2BAAyB;AACzB,oBAAuB;;;ACNvB,oBAAmB;AAEZ,SAAS,aAAqB;AACjC,aAAO,cAAAC,SAAO,EAAE,OAAO,uBAAmB,cAAAA,SAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,GAAG,EAAE,CAAC;AAC5F;AAFgB;AAIT,SAAS,mBAAmB;AAC/B,SAAO,6BAA6B,WAAW;AACnD;AAFgB;AAIT,IAAM,iBAAiB;AAAA,EAC1B,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,UAAU;AAAA,EACV,WAAW;AAAA,EACX,gBAAgB;AAAA,EAChB,KAAK;AACT;AAEO,IAAM,yBAAyB;AAAA,EAClC,MAAM;AAAA,EACN,KAAK;AAAA,EACL,KAAK;AACT;AAEO,IAAM,MAAM;;;ACxBnB,WAAW,WAAW,IAAI,IAAI,uCAAuC;AAErE,IAAM,eAAe,wBAAC,QAAQ,QAAQ,sBAClC,IAAI,QAAQ,CAAC,SAA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,iBAAiB,YAAY;AAAA,QAC7B,eAAe,YAAY;AAAA,QAC3B,cAAc,YAAY;AAAA,QAC1B,aAAa,YAAY;AAAA,QACzB,qBAAqB,YAAY;AAAA,QACjC,iBAAiB,YAAY;AAAA,QAC7B,kBAAkB,YAAY;AAAA,QAC9B,OAAO,YAAY;AAAA,QACnB,eAAe,YAAY;AAAA,QAC3B,QAAQ,YAAY;AAAA,QACpB,iBAAiB,YAAY;AAAA,QAC7B,MAAM,YAAY;AAAA,MACtB;AAEA,2BAAqB,KAAK,eAAe;AAAA,IAC7C,CAAC;AAED,WAAO;AAAA,EACX;AACJ;","names":["import_moment","moment","replaceColor","Jimp","balanceData","moment"]} \ No newline at end of file diff --git a/docs/classes/MB.default.html b/docs/classes/MB.default.html index e351a11..3238d6f 100644 --- a/docs/classes/MB.default.html +++ b/docs/classes/MB.default.html @@ -25,7 +25,7 @@

Hierarchy

  • default
+
  • Defined in MB.ts:41
  • @@ -83,7 +83,7 @@
    passwordReturns default
    +
  • Defined in MB.ts:82
  • Properties

    @@ -93,7 +93,7 @@
    +
  • Defined in MB.ts:46
  • password: string
    @@ -101,7 +101,7 @@
    +
  • Defined in MB.ts:52
  • sessionId: undefined | null | string
    @@ -109,7 +109,7 @@
    +
  • Defined in MB.ts:58
  • deviceId: string = ...
    @@ -117,7 +117,7 @@
    +
  • Defined in MB.ts:64
  • client: Client = ...
    @@ -125,12 +125,15 @@
    +
  • Defined in MB.ts:69
  • -
    wasmData: Buffer
    +
  • Defined in MB.ts:74
  • Methods

    @@ -143,7 +146,7 @@

    Returns Promise<boolean>

    +
  • Defined in MB.ts:92
    • @@ -155,7 +158,7 @@

      Returns string

    +
  • Defined in MB.ts:195
    • @@ -175,7 +178,7 @@
      Optional Optional headers?: object

    Returns Promise<any>

    +
  • Defined in MB.ts:199
    • @@ -187,7 +190,7 @@

      Returns Promise<

    +
  • Defined in MB.ts:245
    • @@ -227,7 +230,7 @@

      Example

      If you want to get transactions history from account "12

    +
  • Defined in MB.ts:299
  • +
  • Defined in typings/ReplaceColor.d.ts:28
  • +
  • Defined in utils/Global.ts:31
  • +
  • Defined in utils/Global.ts:27
  • +
  • Defined in utils/LoadWasm.ts:610
  • +
  • Defined in typings/MBLogin.ts:32
  • +
  • Defined in typings/ReplaceColor.d.ts:39
  • +
  • Defined in typings/MBApi.ts:1
  • Index

    diff --git a/docs/modules/typings_MBLogin.html b/docs/modules/typings_MBLogin.html index cccec02..76b7756 100644 --- a/docs/modules/typings_MBLogin.html +++ b/docs/modules/typings_MBLogin.html @@ -16,7 +16,7 @@
  • typings/MBLogin
  • Module typings/MBLogin

    +
  • Defined in typings/MBLogin.ts:1
  • Index

    diff --git a/docs/modules/typings_ReplaceColor.html b/docs/modules/typings_ReplaceColor.html index 80a4555..a1179b3 100644 --- a/docs/modules/typings_ReplaceColor.html +++ b/docs/modules/typings_ReplaceColor.html @@ -16,7 +16,7 @@
  • typings/ReplaceColor
  • Module typings/ReplaceColor

    +
  • Defined in typings/ReplaceColor.d.ts:25
  • Index

    diff --git a/docs/modules/utils_Global.html b/docs/modules/utils_Global.html index 7d85bb1..0f079b6 100644 --- a/docs/modules/utils_Global.html +++ b/docs/modules/utils_Global.html @@ -16,7 +16,7 @@
  • utils/Global
  • Module utils/Global

    +
  • Defined in utils/Global.ts:1
  • Index

    diff --git a/docs/modules/utils_LoadWasm.html b/docs/modules/utils_LoadWasm.html index d447ec9..866d101 100644 --- a/docs/modules/utils_LoadWasm.html +++ b/docs/modules/utils_LoadWasm.html @@ -16,7 +16,7 @@
  • utils/LoadWasm
  • Module utils/LoadWasm

    +
  • Defined in utils/LoadWasm.ts:1
  • Index

    diff --git a/docs/variables/utils_Global.FPR.html b/docs/variables/utils_Global.FPR.html index 8e86823..762171c 100644 --- a/docs/variables/utils_Global.FPR.html +++ b/docs/variables/utils_Global.FPR.html @@ -18,7 +18,7 @@

    Variable FPRConst

    FPR: "c7a1beebb9400375bb187daa33de9659" = "c7a1beebb9400375bb187daa33de9659"
    +
  • Defined in utils/Global.ts:52
  • +
  • Defined in utils/Global.ts:35
  • +
  • Defined in utils/Global.ts:46