bugs on firefox, chromium is unaffected
we need further investigation, but have no time to do so.
This commit is contained in:
parent
ca521e033f
commit
0cd7ca7f65
2
dist/bundle.js
vendored
2
dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
164
dist/bundle.js.LICENSE.txt
vendored
164
dist/bundle.js.LICENSE.txt
vendored
@ -1 +1,163 @@
|
|||||||
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
/*!****************!*\
|
||||||
|
!*** ./key.js ***!
|
||||||
|
\****************/
|
||||||
|
|
||||||
|
/*!******************!*\
|
||||||
|
!*** ./index.js ***!
|
||||||
|
\******************/
|
||||||
|
|
||||||
|
/*!************************!*\
|
||||||
|
!*** buffer (ignored) ***!
|
||||||
|
\************************/
|
||||||
|
|
||||||
|
/*!************************!*\
|
||||||
|
!*** crypto (ignored) ***!
|
||||||
|
\************************/
|
||||||
|
|
||||||
|
/*!***************************!*\
|
||||||
|
!*** ./key-derivation.js ***!
|
||||||
|
\***************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/bn.js@4.12.0/node_modules/bn.js/lib/bn.js ***!
|
||||||
|
\**********************************************************************/
|
||||||
|
|
||||||
|
/*!************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/brorand@1.1.0/node_modules/brorand/index.js ***!
|
||||||
|
\************************************************************************/
|
||||||
|
|
||||||
|
/*!***************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash.js ***!
|
||||||
|
\***************************************************************************/
|
||||||
|
|
||||||
|
/*!******************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/package.json ***!
|
||||||
|
\******************************************************************************/
|
||||||
|
|
||||||
|
/*!*******************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha.js ***!
|
||||||
|
\*******************************************************************************/
|
||||||
|
|
||||||
|
/*!********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/hmac.js ***!
|
||||||
|
\********************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic.js ***!
|
||||||
|
\*********************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/1.js ***!
|
||||||
|
\*********************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/utils.js ***!
|
||||||
|
\*********************************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/common.js ***!
|
||||||
|
\**********************************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/ripemd.js ***!
|
||||||
|
\**********************************************************************************/
|
||||||
|
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/224.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/256.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/384.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
|
||||||
|
/*!***********************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/512.js ***!
|
||||||
|
\***********************************************************************************/
|
||||||
|
|
||||||
|
/*!************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hmac-drbg@1.0.1/node_modules/hmac-drbg/lib/hmac-drbg.js ***!
|
||||||
|
\************************************************************************************/
|
||||||
|
|
||||||
|
/*!*************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/inherits@2.0.4/node_modules/inherits/inherits_browser.js ***!
|
||||||
|
\*************************************************************************************/
|
||||||
|
|
||||||
|
/*!**************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/hash.js@1.1.7/node_modules/hash.js/lib/hash/sha/common.js ***!
|
||||||
|
\**************************************************************************************/
|
||||||
|
|
||||||
|
/*!***************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/utils.js ***!
|
||||||
|
\***************************************************************************************/
|
||||||
|
|
||||||
|
/*!****************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curves.js ***!
|
||||||
|
\****************************************************************************************/
|
||||||
|
|
||||||
|
/*!****************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/key.js ***!
|
||||||
|
\****************************************************************************************/
|
||||||
|
|
||||||
|
/*!****************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/web-bip39@0.0.3/node_modules/web-bip39/wordlists/english.js ***!
|
||||||
|
\****************************************************************************************/
|
||||||
|
|
||||||
|
/*!*****************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/web-bip39@0.0.3/node_modules/web-bip39/dist/web-bip39.esm.js ***!
|
||||||
|
\*****************************************************************************************/
|
||||||
|
|
||||||
|
/*!******************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/index.js ***!
|
||||||
|
\******************************************************************************************/
|
||||||
|
|
||||||
|
/*!*******************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/key.js ***!
|
||||||
|
\*******************************************************************************************/
|
||||||
|
|
||||||
|
/*!********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/base.js ***!
|
||||||
|
\********************************************************************************************/
|
||||||
|
|
||||||
|
/*!********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/mont.js ***!
|
||||||
|
\********************************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/index.js ***!
|
||||||
|
\*********************************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/short.js ***!
|
||||||
|
\*********************************************************************************************/
|
||||||
|
|
||||||
|
/*!*********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/index.js ***!
|
||||||
|
\*********************************************************************************************/
|
||||||
|
|
||||||
|
/*!**********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/ec/signature.js ***!
|
||||||
|
\**********************************************************************************************/
|
||||||
|
|
||||||
|
/*!***********************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/curve/edwards.js ***!
|
||||||
|
\***********************************************************************************************/
|
||||||
|
|
||||||
|
/*!************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/minimalistic-assert@1.0.1/node_modules/minimalistic-assert/index.js ***!
|
||||||
|
\************************************************************************************************/
|
||||||
|
|
||||||
|
/*!*************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/eddsa/signature.js ***!
|
||||||
|
\*************************************************************************************************/
|
||||||
|
|
||||||
|
/*!*******************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/elliptic@6.5.7/node_modules/elliptic/lib/elliptic/precomputed/secp256k1.js ***!
|
||||||
|
\*******************************************************************************************************/
|
||||||
|
|
||||||
|
/*!****************************************************************************************************************!*\
|
||||||
|
!*** ./node_modules/.pnpm/minimalistic-crypto-utils@1.0.1/node_modules/minimalistic-crypto-utils/lib/utils.js ***!
|
||||||
|
\****************************************************************************************************************/
|
||||||
|
10
index.js
10
index.js
@ -1,18 +1,12 @@
|
|||||||
import {
|
import { generateKeypair } from "./key-derivation.js";
|
||||||
generateKeyPair,
|
|
||||||
generateMnemonic,
|
|
||||||
newGenKeypair
|
|
||||||
} from "./key-derivation.js";
|
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
// const mnemonic = await generateMnemonic();
|
|
||||||
// console.log(mnemonic);
|
|
||||||
console.log("start");
|
console.log("start");
|
||||||
|
|
||||||
const mnemonic =
|
const mnemonic =
|
||||||
"digital radio analyst fine casino have mass blood potato hat web capital prefer debate fee differ spray cloud";
|
"digital radio analyst fine casino have mass blood potato hat web capital prefer debate fee differ spray cloud";
|
||||||
|
|
||||||
const { publicKey, privateKey } = await generateKeyPair(mnemonic);
|
const { publicKey, privateKey } = await generateKeypair(mnemonic);
|
||||||
console.log(publicKey.keyType, privateKey.keyType);
|
console.log(publicKey.keyType, privateKey.keyType);
|
||||||
console.log(publicKey.asHexString, privateKey.asHexString);
|
console.log(publicKey.asHexString, privateKey.asHexString);
|
||||||
console.log(publicKey.asByteArray, privateKey.asByteArray);
|
console.log(publicKey.asByteArray, privateKey.asByteArray);
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
"web-bip39": "^0.0.3"
|
"web-bip39": "^0.0.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"terser-webpack-plugin": "^5.3.10",
|
||||||
"webpack": "^5.93.0",
|
"webpack": "^5.93.0",
|
||||||
"webpack-cli": "^5.1.4"
|
"webpack-cli": "^5.1.4"
|
||||||
}
|
}
|
||||||
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -15,6 +15,9 @@ importers:
|
|||||||
specifier: ^0.0.3
|
specifier: ^0.0.3
|
||||||
version: 0.0.3
|
version: 0.0.3
|
||||||
devDependencies:
|
devDependencies:
|
||||||
|
terser-webpack-plugin:
|
||||||
|
specifier: ^5.3.10
|
||||||
|
version: 5.3.10(webpack@5.93.0(webpack-cli@5.1.4))
|
||||||
webpack:
|
webpack:
|
||||||
specifier: ^5.93.0
|
specifier: ^5.93.0
|
||||||
version: 5.93.0(webpack-cli@5.1.4)
|
version: 5.93.0(webpack-cli@5.1.4)
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
const path = require("path");
|
const path = require("path");
|
||||||
const { experiments } = require("webpack");
|
|
||||||
const { library } = require("webpack");
|
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: "./index.js",
|
entry: "./index.js",
|
||||||
output: {
|
output: {
|
||||||
filename: "bundle.js",
|
filename: "bundle.js",
|
||||||
path: path.resolve(__dirname, "dist"),
|
path: path.resolve(__dirname, "dist")
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new webpack.IgnorePlugin({
|
new webpack.IgnorePlugin({
|
||||||
checkResource(resource) {
|
checkResource(resource) {
|
||||||
return /.*\/wordlists\/(?!english).*\.json/.test(resource);
|
return /.*\/wordlists\/(?!english).*\.json/.test(resource);
|
||||||
},
|
}
|
||||||
}),
|
}),
|
||||||
|
new TerserPlugin({
|
||||||
|
terserOptions: {
|
||||||
|
mangle: {
|
||||||
|
reserved: [
|
||||||
|
"generateKeypair",
|
||||||
|
"generateMnemonic",
|
||||||
|
"getPairFromPrivate",
|
||||||
|
"Key"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
],
|
],
|
||||||
mode: "production",
|
mode: "production"
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user