From 7027f4344c5ebebacd883990bf2ead3d3012558e Mon Sep 17 00:00:00 2001 From: Duddino Date: Mon, 13 May 2024 15:16:37 +0200 Subject: [PATCH 1/3] Polyfill the other secp256k1 libs --- package-lock.json | 26 ++++++++++++++++++++++++++ package.json | 2 ++ webpack.common.js | 4 ++++ 3 files changed, 32 insertions(+) diff --git a/package-lock.json b/package-lock.json index 26e7a6762..71f16070b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "@bitcoinerlab/secp256k1": "^1.1.1", "@fontsource/chivo": "^4.5.11", "@fontsource/montserrat": "^4.5.14", "@fortawesome/fontawesome-free": "^6.2.1", @@ -40,6 +41,7 @@ "pivx-shield-rust-multicore": "^1.1.3", "qr-scanner": "^1.4.2", "qrcode-generator": "^1.4.4", + "secp256k1-noble": "github:PIVX-Labs/secp256k1-noble", "vue": "^3.3.4", "vue-router": "^4.2.4" }, @@ -482,6 +484,15 @@ "node": ">=6.9.0" } }, + "node_modules/@bitcoinerlab/secp256k1": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@bitcoinerlab/secp256k1/-/secp256k1-1.1.1.tgz", + "integrity": "sha512-uhjW51WfVLpnHN7+G0saDcM/k9IqcyTbZ+bDgLF3AX8V/a3KXSE9vn7UPBrcdU72tp0J4YPR7BHp2m7MLAZ/1Q==", + "dependencies": { + "@noble/hashes": "^1.1.5", + "@noble/secp256k1": "^1.7.1" + } + }, "node_modules/@discoveryjs/json-ext": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz", @@ -9320,6 +9331,21 @@ "node": ">=10.0.0" } }, + "node_modules/secp256k1-noble": { + "version": "1.0.0", + "resolved": "git+ssh://git@github.com/PIVX-Labs/secp256k1-noble.git#cd988bd6d7f626bccea3bca9c5914dfa826a2227", + "dependencies": { + "@noble/secp256k1": "^2.1.0" + } + }, + "node_modules/secp256k1-noble/node_modules/@noble/secp256k1": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-2.1.0.tgz", + "integrity": "sha512-XLEQQNdablO0XZOIniFQimiXsZDNwaYgL96dZwC54Q30imSbAOFf3NKtepc+cXyuZf5Q1HCgbqgZ2UFFuHVcEw==", + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/select-hose": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/select-hose/-/select-hose-2.0.0.tgz", diff --git a/package.json b/package.json index 2b331803c..2eeecd4e5 100644 --- a/package.json +++ b/package.json @@ -63,6 +63,7 @@ "webpack-merge": "^5.8.0" }, "dependencies": { + "@bitcoinerlab/secp256k1": "^1.1.1", "@fontsource/chivo": "^4.5.11", "@fontsource/montserrat": "^4.5.14", "@fortawesome/fontawesome-free": "^6.2.1", @@ -93,6 +94,7 @@ "pivx-shield-rust-multicore": "^1.1.3", "qr-scanner": "^1.4.2", "qrcode-generator": "^1.4.4", + "secp256k1-noble": "github:PIVX-Labs/secp256k1-noble", "vue": "^3.3.4", "vue-router": "^4.2.4" }, diff --git a/webpack.common.js b/webpack.common.js index 9f2dede11..486979cc1 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -92,6 +92,10 @@ export default { fs: false, crypto: path.resolve(__dirname, 'scripts/polyfills/crypto.js'), }, + alias: { + 'tiny-secp256k1': '@bitcoinerlab/secp256k1', + secp256k1: 'secp256k1-noble' + }, }, plugins: [ new HtmlWebpackPlugin({ From fddb774d950b7290293cfcb38b63b52b6fd19574 Mon Sep 17 00:00:00 2001 From: Duddino Date: Mon, 13 May 2024 15:34:24 +0200 Subject: [PATCH 2/3] Prettier --- webpack.common.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index 486979cc1..55fe2dc08 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -92,9 +92,9 @@ export default { fs: false, crypto: path.resolve(__dirname, 'scripts/polyfills/crypto.js'), }, - alias: { + alias: { 'tiny-secp256k1': '@bitcoinerlab/secp256k1', - secp256k1: 'secp256k1-noble' + secp256k1: 'secp256k1-noble', }, }, plugins: [ From 0958355acacbc906e7efe2351a5d40f9b5578a82 Mon Sep 17 00:00:00 2001 From: Duddino Date: Tue, 16 Jul 2024 15:12:33 +0200 Subject: [PATCH 3/3] Update package-lock --- package-lock.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 71f16070b..4cbd36ca1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9333,7 +9333,8 @@ }, "node_modules/secp256k1-noble": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/PIVX-Labs/secp256k1-noble.git#cd988bd6d7f626bccea3bca9c5914dfa826a2227", + "resolved": "git+ssh://git@github.com/PIVX-Labs/secp256k1-noble.git#3c280ea834010f7a3c1b4b3c151ea399ffb5eb8f", + "license": "MIT", "dependencies": { "@noble/secp256k1": "^2.1.0" }