diff --git a/adamant-wallets b/adamant-wallets index c81f215b2..6742dab5c 160000 --- a/adamant-wallets +++ b/adamant-wallets @@ -1 +1 @@ -Subproject commit c81f215b290da5279b3cbf5b7266d354f628a776 +Subproject commit 6742dab5ce9b08f6e85d6d21351f954d89f7b68e diff --git a/package-lock.json b/package-lock.json index f08a71fd3..740b8fa27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,8 +11,10 @@ "license": "GPLv3", "dependencies": { "@emoji-mart/data": "^1.1.2", - "@liskhq/lisk-cryptography": "3.2.1", - "@liskhq/lisk-transactions": "5.2.2", + "@liskhq/lisk-codec": "^0.4.0", + "@liskhq/lisk-cryptography": "4.0.0", + "@liskhq/lisk-transactions": "6.0.0", + "@liskhq/lisk-validator": "^0.8.0", "@mdi/font": "^7.3.67", "@stablelib/utf8": "^1.0.1", "@zxing/browser": "^0.1.4", @@ -92,6 +94,8 @@ "@types/emoji-mart": "^3.0.12", "@types/eslint": "^8.44.7", "@types/marked": "^5.0.2", + "@types/pbkdf2": "^3.1.2", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "@vitejs/plugin-vue": "^4.5.0", @@ -3489,83 +3493,121 @@ } }, "node_modules/@liskhq/lisk-codec": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-codec/-/lisk-codec-0.2.2.tgz", - "integrity": "sha512-TrjZYBrhKLNBuPIG0hIKVzb2UddzmhjWNvQE3RQWuBcLK1BbnSr7Zz7r0B1Ta2Rrd1+gJNjF1U6SkXAcqEkw1A==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-codec/-/lisk-codec-0.4.0.tgz", + "integrity": "sha512-03mgvftrWK5KfjBl/VSceEBtcr2wA4NLGnuBsoxKiwL/Bolfd1f3rdXbQgUKzeY4UJEoDGHN6jRPbXLHH/yUnw==", "dependencies": { - "@liskhq/lisk-utils": "^0.2.1", - "@liskhq/lisk-validator": "^0.6.2" + "@liskhq/lisk-cryptography": "^4.0.0", + "@liskhq/lisk-utils": "^0.4.0", + "@liskhq/lisk-validator": "^0.8.0" }, "engines": { - "node": ">=16.14.1 <=16", + "node": ">=18.12.0 <=18", "npm": ">=8.1.0" } }, "node_modules/@liskhq/lisk-cryptography": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-cryptography/-/lisk-cryptography-3.2.1.tgz", - "integrity": "sha512-n1yoVXSzKj9ZeVMvOmVkpZwyRBcvInu0sXBB7Z7d1bsgAiTSGKJDz6TVGWTwpEkfn0kk79Sie2QBbulaON57YQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-cryptography/-/lisk-cryptography-4.0.0.tgz", + "integrity": "sha512-246hoey+sKx0/2GrECXfsjTmhv5PaD0z/vYpV1zTL4qPOHaDNqbKsSLg/uAt2OfM7et1KoG76jpYzaiifqCJiw==", "dependencies": { + "@liskhq/lisk-passphrase": "^4.0.0", "buffer-reverse": "1.0.1", - "ed2curve": "0.3.0", - "tweetnacl": "1.0.3", - "varuint-bitcoin": "1.1.2" + "hash-wasm": "4.9.0", + "tweetnacl": "1.0.3" }, "engines": { - "node": ">=16.14.1 <=16", + "node": ">=18.12.0 <=18", "npm": ">=8.1.0" }, - "optionalDependencies": { + "peerDependencies": { + "@chainsafe/blst": "0.2.9", "sodium-native": "3.2.1" + }, + "peerDependenciesMeta": { + "@chainsafe/blst": { + "optional": true + }, + "sodium-native": { + "optional": true + } + } + }, + "node_modules/@liskhq/lisk-passphrase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-passphrase/-/lisk-passphrase-4.1.0.tgz", + "integrity": "sha512-1VdpEp+OGiyCF0Fjtgcc+SLlHeIflzya49GzIXcXjFNf19VgkUu/eIDM8XHxSdj/5KzpL+yD07OYCh+LdoAkfA==", + "dependencies": { + "bip39": "3.0.3" + }, + "engines": { + "node": ">=18.12.0 <=18", + "npm": ">=8.1.0" + } + }, + "node_modules/@liskhq/lisk-passphrase/node_modules/@types/node": { + "version": "11.11.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.11.6.tgz", + "integrity": "sha512-Exw4yUWMBXM3X+8oqzJNRqZSwUAaS4+7NdvHqQuFi/d+synz++xmX3QIf+BFqneW8N31R8Ky+sikfZUXq07ggQ==" + }, + "node_modules/@liskhq/lisk-passphrase/node_modules/bip39": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/bip39/-/bip39-3.0.3.tgz", + "integrity": "sha512-P0dKrz4g0V0BjXfx7d9QNkJ/Txcz/k+hM9TnjqjUaXtuOfAvxXSw2rJw8DX0e3ZPwnK/IgDxoRqf0bvoVCqbMg==", + "dependencies": { + "@types/node": "11.11.6", + "create-hash": "^1.1.0", + "pbkdf2": "^3.0.9", + "randombytes": "^2.0.1" } }, "node_modules/@liskhq/lisk-transactions": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-transactions/-/lisk-transactions-5.2.2.tgz", - "integrity": "sha512-jmwTK15y/RjMQCHSJqbDECTZUR/UKxpp4xYiQTqtoxy7TAztrphurnVZXSwtW52/vEVNCSGA8GCHfgCjtBqgAA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-transactions/-/lisk-transactions-6.0.0.tgz", + "integrity": "sha512-HnvPxtoglIR1qHohIXg7K9HCiU0naMcz2+wZUH1jwgDwugCNaypLSTNat1dI7/5MHn8MpohHun0a1tWmJZYH/A==", "dependencies": { - "@liskhq/lisk-codec": "^0.2.2", - "@liskhq/lisk-cryptography": "^3.2.1", - "@liskhq/lisk-validator": "^0.6.2" + "@liskhq/lisk-codec": "^0.4.0", + "@liskhq/lisk-cryptography": "^4.0.0", + "@liskhq/lisk-validator": "^0.8.0" }, "engines": { - "node": ">=16.14.1 <=16", + "node": ">=18.12.0 <=18", "npm": ">=8.1.0" } }, "node_modules/@liskhq/lisk-utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-utils/-/lisk-utils-0.2.1.tgz", - "integrity": "sha512-2vPLoCRVJVYEh8KUePBj/qBrD3i9aM5g3lhimn+RiEweKQSpBBe+BGcBIuNeKtCJtm2A0ChVjSXJV39t7nNh+A==", + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-utils/-/lisk-utils-0.4.0.tgz", + "integrity": "sha512-rzZZrh36GVSqB65Y4LjaZIe2AVLUH8zXNDNBX0MXM7pI5BhBesDmDpVS2qVLoF7lhyBmUPk9SrARI0wK9/+z9g==", "dependencies": { "lodash.clonedeep": "4.5.0" }, "engines": { - "node": ">=16.14.1 <=16", + "node": ">=18.12.0 <=18", "npm": ">=8.1.0" } }, "node_modules/@liskhq/lisk-validator": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/@liskhq/lisk-validator/-/lisk-validator-0.6.2.tgz", - "integrity": "sha512-BUqi74EqnrTtpVsjGVgD4et8/nJdA/Oau9tK+SeD2vCrzwA09+AI8Eow5d4arJMcvtjOeNbgX7FApJs8MQ38Xw==", + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/@liskhq/lisk-validator/-/lisk-validator-0.8.0.tgz", + "integrity": "sha512-aChkjwuwBBzvDIQhyCRozOvQ0fTWjzAOLZJi3i53+1op6J3f6LZYG6ffA6q/x6W1/tQbApSoc2GJWrSCjmFpFw==", "dependencies": { - "@liskhq/lisk-cryptography": "^3.2.1", + "@liskhq/lisk-cryptography": "^4.0.0", "ajv": "8.1.0", - "ajv-formats": "2.0.2", + "ajv-formats": "2.1.1", "debug": "4.3.4", - "semver": "7.3.5", + "semver": "7.5.2", "validator": "13.7.0" }, "engines": { - "node": ">=16.14.1 <=16", + "node": ">=18.12.0 <=18", "npm": ">=8.1.0" } }, "node_modules/@liskhq/lisk-validator/node_modules/semver": { - "version": "7.3.5", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", - "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "version": "7.5.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.2.tgz", + "integrity": "sha512-SoftuTROv/cRjCze/scjGyiDtcUyxw1rgYQSZY7XTmtR5hX+dm76iDbTH8TkLPHCQmlbQVSSbNZCPM2hb0knnQ==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -4599,6 +4641,15 @@ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, + "node_modules/@types/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@types/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/plist": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/@types/plist/-/plist-3.0.2.tgz", @@ -4669,6 +4720,12 @@ "integrity": "sha512-NfQ4gyz38SL8sDNrSixxU2Os1a5xcdFxipAFxYEuLUlvU2uDwS4NUpsImcf1//SlWItCVMMLiylsxbmNMToV/g==", "dev": true }, + "node_modules/@types/uuid": { + "version": "9.0.7", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.7.tgz", + "integrity": "sha512-WUtIVRUZ9i5dYXefDEAI7sh9/O7jGvHg7Df/5O/gtH3Yabe5odI3UWopVR1qbPXQtvOxWu3mM4XxlYeZtMWF4g==", + "dev": true + }, "node_modules/@types/verror": { "version": "1.10.6", "resolved": "https://registry.npmjs.org/@types/verror/-/verror-1.10.6.tgz", @@ -5528,9 +5585,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.0.2.tgz", - "integrity": "sha512-Brah4Uo5/U8v76c6euTwtjVFFaVishwnJrQBYpev1JRh4vjA1F4HY3UzQez41YUCszUCXKagG8v6eVRBHV1gkw==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-2.1.1.tgz", + "integrity": "sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==", "dependencies": { "ajv": "^8.0.0" }, @@ -10334,6 +10391,11 @@ "node": ">=4" } }, + "node_modules/hash-wasm": { + "version": "4.9.0", + "resolved": "https://registry.npmjs.org/hash-wasm/-/hash-wasm-4.9.0.tgz", + "integrity": "sha512-7SW7ejyfnRxuOc7ptQHSf4LDoZaWOivfzqw+5rpcQku0nHfmicPKE51ra9BiRLAmT8+gGLestr1XroUkqdjL6w==" + }, "node_modules/hash.js": { "version": "1.1.7", "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", @@ -15111,6 +15173,7 @@ "integrity": "sha512-EgDZ/Z7PxL2kCasKk7wnRkV8W9kvwuIlHuHXAxkQm3FF0MgVsjyLBXGjSRGhjE6u7rhSpk3KaMfFM23bfMysIQ==", "hasInstallScript": true, "optional": true, + "peer": true, "dependencies": { "ini": "^1.3.5", "node-gyp-build": "^4.2.0" diff --git a/package.json b/package.json index 4bb5e1cb2..dc67bcd8c 100644 --- a/package.json +++ b/package.json @@ -27,8 +27,10 @@ }, "dependencies": { "@emoji-mart/data": "^1.1.2", - "@liskhq/lisk-cryptography": "3.2.1", - "@liskhq/lisk-transactions": "5.2.2", + "@liskhq/lisk-codec": "^0.4.0", + "@liskhq/lisk-cryptography": "4.0.0", + "@liskhq/lisk-transactions": "6.0.0", + "@liskhq/lisk-validator": "^0.8.0", "@mdi/font": "^7.3.67", "@stablelib/utf8": "^1.0.1", "@zxing/browser": "^0.1.4", @@ -108,6 +110,8 @@ "@types/emoji-mart": "^3.0.12", "@types/eslint": "^8.44.7", "@types/marked": "^5.0.2", + "@types/pbkdf2": "^3.1.2", + "@types/uuid": "^9.0.7", "@typescript-eslint/eslint-plugin": "^6.11.0", "@typescript-eslint/parser": "^6.11.0", "@vitejs/plugin-vue": "^4.5.0", diff --git a/src/components/ExportKeysForm.vue b/src/components/ExportKeysForm.vue index 34d5d15df..188ea5952 100644 --- a/src/components/ExportKeysForm.vue +++ b/src/components/ExportKeysForm.vue @@ -103,7 +103,7 @@ import { validateMnemonic } from 'bip39' import copyToClipboard from 'copy-to-clipboard' import { getAccountFromPassphrase as getEthAccount } from '@/lib/eth-utils' import { getAccount as getBtcAccount } from '@/lib/bitcoin/btc-base-api' -import { getAccount as getLskAccount } from '@/lib/lisk/lisk-api' +import { getAccount as getLskAccount } from '@/lib/lisk/lisk-utils' import { Cryptos, CryptosInfo } from '@/lib/constants' import QrcodeCapture from '@/components/QrcodeCapture.vue' import QrcodeScannerDialog from '@/components/QrcodeScannerDialog.vue' diff --git a/src/components/LoginForm.vue b/src/components/LoginForm.vue index 90c08603f..90ed4842d 100644 --- a/src/components/LoginForm.vue +++ b/src/components/LoginForm.vue @@ -97,7 +97,8 @@ export default defineComponent({ .then(() => { emit('login') }) - .catch(() => { + .catch((err) => { + console.log(err) emit('error', 'login.invalid_passphrase') }) .finally(() => { diff --git a/src/components/SendFundsForm.vue b/src/components/SendFundsForm.vue index 43efc43f1..d722e2363 100644 --- a/src/components/SendFundsForm.vue +++ b/src/components/SendFundsForm.vue @@ -136,6 +136,7 @@ :label="$t('transfer.increase_fee')" color="grey darken-1" /> +
@@ -185,6 +186,8 @@