@prosopo/account 2.8.0 → 2.8.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build$colon$cjs.log +14 -10
- package/.turbo/turbo-build$colon$tsc.log +18 -14
- package/.turbo/turbo-build.log +11 -7
- package/CHANGELOG.md +337 -0
- package/dist/cjs/extension/ExtensionWeb2.cjs +5 -4
- package/dist/cjs/workers/CryptoWorkerManager.cjs +9 -0
- package/dist/extension/ExtensionWeb2.d.ts.map +1 -1
- package/dist/extension/ExtensionWeb2.js +6 -5
- package/dist/extension/ExtensionWeb2.js.map +1 -1
- package/dist/workers/CryptoWorkerManager.d.ts +1 -0
- package/dist/workers/CryptoWorkerManager.d.ts.map +1 -1
- package/dist/workers/CryptoWorkerManager.js +9 -0
- package/dist/workers/CryptoWorkerManager.js.map +1 -1
- package/package.json +9 -8
- package/src/custom.d.ts +44 -0
- package/src/extension/Extension.ts +29 -0
- package/src/extension/ExtensionWeb2.ts +121 -0
- package/src/extension/ExtensionWeb3.ts +60 -0
- package/src/index.ts +16 -0
- package/src/workers/CryptoWorkerManager.ts +225 -0
- package/src/workers/cryptoWorker.ts +79 -0
- package/src/workers/index.ts +18 -0
- package/tsconfig.cjs.json +37 -0
- package/tsconfig.json +40 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsconfig.types.json +9 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.35 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -7,10 +7,12 @@ ViteCommonJSConfig: .
|
|
|
7
7
|
tsConfigPaths: [
|
|
8
8
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
9
9
|
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
10
|
-
'/home/runner/work/captcha/captcha/packages/
|
|
10
|
+
'/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
|
|
11
11
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
12
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
12
13
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
13
14
|
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
15
|
+
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
14
16
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'
|
|
15
17
|
]
|
|
16
18
|
}
|
|
@@ -18,10 +20,12 @@ ViteCommonJSConfig: .
|
|
|
18
20
|
externals: [
|
|
19
21
|
'@prosopo/common',
|
|
20
22
|
'@prosopo/locale',
|
|
21
|
-
'@prosopo/
|
|
23
|
+
'@prosopo/logger',
|
|
22
24
|
'@prosopo/util',
|
|
25
|
+
'@prosopo/types',
|
|
23
26
|
'@prosopo/util-crypto',
|
|
24
27
|
'@prosopo/fingerprint',
|
|
28
|
+
'@prosopo/fingerprintjs',
|
|
25
29
|
'@prosopo/keyring'
|
|
26
30
|
]
|
|
27
31
|
}
|
|
@@ -38,16 +42,16 @@ in "../../node_modules/@polkadot/x-randomvalues/node_modules/@polkadot/x-global/
|
|
|
38
42
|
"/*#__PURE__*/"
|
|
39
43
|
|
|
40
44
|
in "../../node_modules/@polkadot/x-textdecoder/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
41
|
-
[33m../../node_modules/@polkadot/
|
|
45
|
+
[33m../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js (9:23): A comment
|
|
42
46
|
|
|
43
47
|
"/*#__PURE__*/"
|
|
44
48
|
|
|
45
|
-
in "../../node_modules/@polkadot/
|
|
46
|
-
[33m../../node_modules/@polkadot/
|
|
49
|
+
in "../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
50
|
+
[33m../../node_modules/@polkadot/x-textencoder/node_modules/@polkadot/x-global/index.js (9:23): A comment
|
|
47
51
|
|
|
48
52
|
"/*#__PURE__*/"
|
|
49
53
|
|
|
50
|
-
in "../../node_modules/@polkadot/
|
|
54
|
+
in "../../node_modules/@polkadot/x-textencoder/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
51
55
|
Build end
|
|
52
56
|
[32m✓[39m 6 modules transformed.
|
|
53
57
|
[33mEntry module "src/extension/ExtensionWeb2.ts" is using named and default exports together. Consumers of your bundle will have to use `..default` to access the default export, which may not be what you want. Use `output.exports: "named"` to disable this warning.[39m
|
|
@@ -56,7 +60,7 @@ rendering chunks...
|
|
|
56
60
|
[2mdist/cjs/[22m[36mextension/Extension.cjs [39m[1m[2m 0.14 kB[22m[1m[22m
|
|
57
61
|
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m 0.42 kB[22m[1m[22m
|
|
58
62
|
[2mdist/cjs/[22m[36mextension/ExtensionWeb3.cjs [39m[1m[2m 1.31 kB[22m[1m[22m
|
|
59
|
-
[2mdist/cjs/[22m[36mextension/ExtensionWeb2.cjs [39m[1m[2m 3.
|
|
60
|
-
[2mdist/cjs/[22m[36mworkers/CryptoWorkerManager.cjs [39m[1m[2m 4.
|
|
63
|
+
[2mdist/cjs/[22m[36mextension/ExtensionWeb2.cjs [39m[1m[2m 3.78 kB[22m[1m[22m
|
|
64
|
+
[2mdist/cjs/[22m[36mworkers/CryptoWorkerManager.cjs [39m[1m[2m 4.77 kB[22m[1m[22m
|
|
61
65
|
[2mdist/cjs/[22m[36mworkers/cryptoWorker.cjs [39m[1m[2m19.63 kB[22m[1m[22m
|
|
62
|
-
[32m✓ built in 1.
|
|
66
|
+
[32m✓ built in 1.37s[39m
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.35 build:tsc
|
|
3
3
|
> npm run typecheck && npm run build
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/account@2.8.
|
|
6
|
+
> @prosopo/account@2.8.35 typecheck
|
|
7
7
|
> tsc --project tsconfig.types.json
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
> @prosopo/account@2.8.
|
|
10
|
+
> @prosopo/account@2.8.35 build
|
|
11
11
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
> @prosopo/account@2.8.
|
|
14
|
+
> @prosopo/account@2.8.35 build:cross-env
|
|
15
15
|
> vite build --config vite.esm.config.ts --mode production
|
|
16
16
|
|
|
17
17
|
ViteEsmConfig: .
|
|
@@ -19,10 +19,12 @@ ViteEsmConfig: .
|
|
|
19
19
|
tsConfigPaths: [
|
|
20
20
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
21
21
|
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
22
|
-
'/home/runner/work/captcha/captcha/packages/
|
|
22
|
+
'/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
|
|
23
23
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
24
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
24
25
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
25
26
|
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
27
|
+
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
26
28
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'
|
|
27
29
|
]
|
|
28
30
|
}
|
|
@@ -30,10 +32,12 @@ ViteEsmConfig: .
|
|
|
30
32
|
externals: [
|
|
31
33
|
'@prosopo/common',
|
|
32
34
|
'@prosopo/locale',
|
|
33
|
-
'@prosopo/
|
|
35
|
+
'@prosopo/logger',
|
|
34
36
|
'@prosopo/util',
|
|
37
|
+
'@prosopo/types',
|
|
35
38
|
'@prosopo/util-crypto',
|
|
36
39
|
'@prosopo/fingerprint',
|
|
40
|
+
'@prosopo/fingerprintjs',
|
|
37
41
|
'@prosopo/keyring'
|
|
38
42
|
]
|
|
39
43
|
}
|
|
@@ -45,6 +49,11 @@ transforming...
|
|
|
45
49
|
"/*#__PURE__*/"
|
|
46
50
|
|
|
47
51
|
in "../../node_modules/@polkadot/x-randomvalues/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
52
|
+
[33m../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js (9:23): A comment
|
|
53
|
+
|
|
54
|
+
"/*#__PURE__*/"
|
|
55
|
+
|
|
56
|
+
in "../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
48
57
|
[33m../../node_modules/@polkadot/x-textdecoder/node_modules/@polkadot/x-global/index.js (9:23): A comment
|
|
49
58
|
|
|
50
59
|
"/*#__PURE__*/"
|
|
@@ -55,18 +64,13 @@ in "../../node_modules/@polkadot/x-textdecoder/node_modules/@polkadot/x-global/i
|
|
|
55
64
|
"/*#__PURE__*/"
|
|
56
65
|
|
|
57
66
|
in "../../node_modules/@polkadot/x-textencoder/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
58
|
-
[33m../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js (9:23): A comment
|
|
59
|
-
|
|
60
|
-
"/*#__PURE__*/"
|
|
61
|
-
|
|
62
|
-
in "../../node_modules/@polkadot/util/node_modules/@polkadot/x-global/index.js" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.[39m
|
|
63
67
|
Build end
|
|
64
68
|
[32m✓[39m 6 modules transformed.
|
|
65
69
|
rendering chunks...
|
|
66
70
|
[2mdist/[22m[36mextension/Extension.js [39m[1m[2m 0.04 kB[22m[1m[22m
|
|
67
71
|
[2mdist/[22m[36mindex.js [39m[1m[2m 0.24 kB[22m[1m[22m
|
|
68
72
|
[2mdist/[22m[36mextension/ExtensionWeb3.js [39m[1m[2m 1.11 kB[22m[1m[22m
|
|
69
|
-
[2mdist/[22m[36mextension/ExtensionWeb2.js [39m[1m[2m 2.
|
|
70
|
-
[2mdist/[22m[36mworkers/CryptoWorkerManager.js [39m[1m[2m 4.
|
|
73
|
+
[2mdist/[22m[36mextension/ExtensionWeb2.js [39m[1m[2m 2.38 kB[22m[1m[22m
|
|
74
|
+
[2mdist/[22m[36mworkers/CryptoWorkerManager.js [39m[1m[2m 4.63 kB[22m[1m[22m
|
|
71
75
|
[2mdist/[22m[36mworkers/cryptoWorker.js [39m[1m[2m19.64 kB[22m[1m[22m
|
|
72
|
-
[32m✓ built in 1.
|
|
76
|
+
[32m✓ built in 1.28s[39m
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/account@2.8.
|
|
2
|
+
> @prosopo/account@2.8.35 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/account@2.8.
|
|
6
|
+
> @prosopo/account@2.8.35 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -11,10 +11,12 @@ ViteEsmConfig: .
|
|
|
11
11
|
tsConfigPaths: [
|
|
12
12
|
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
13
13
|
'/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
|
|
14
|
-
'/home/runner/work/captcha/captcha/packages/
|
|
14
|
+
'/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
|
|
15
15
|
'/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
|
|
16
|
+
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
16
17
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
17
18
|
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
19
|
+
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
18
20
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'
|
|
19
21
|
]
|
|
20
22
|
}
|
|
@@ -22,10 +24,12 @@ ViteEsmConfig: .
|
|
|
22
24
|
externals: [
|
|
23
25
|
'@prosopo/common',
|
|
24
26
|
'@prosopo/locale',
|
|
25
|
-
'@prosopo/
|
|
27
|
+
'@prosopo/logger',
|
|
26
28
|
'@prosopo/util',
|
|
29
|
+
'@prosopo/types',
|
|
27
30
|
'@prosopo/util-crypto',
|
|
28
31
|
'@prosopo/fingerprint',
|
|
32
|
+
'@prosopo/fingerprintjs',
|
|
29
33
|
'@prosopo/keyring'
|
|
30
34
|
]
|
|
31
35
|
}
|
|
@@ -58,7 +62,7 @@ rendering chunks...
|
|
|
58
62
|
[2mdist/[22m[36mextension/Extension.js [39m[1m[2m 0.04 kB[22m[1m[22m
|
|
59
63
|
[2mdist/[22m[36mindex.js [39m[1m[2m 0.24 kB[22m[1m[22m
|
|
60
64
|
[2mdist/[22m[36mextension/ExtensionWeb3.js [39m[1m[2m 1.11 kB[22m[1m[22m
|
|
61
|
-
[2mdist/[22m[36mextension/ExtensionWeb2.js [39m[1m[2m 2.
|
|
62
|
-
[2mdist/[22m[36mworkers/CryptoWorkerManager.js [39m[1m[2m 4.
|
|
65
|
+
[2mdist/[22m[36mextension/ExtensionWeb2.js [39m[1m[2m 2.38 kB[22m[1m[22m
|
|
66
|
+
[2mdist/[22m[36mworkers/CryptoWorkerManager.js [39m[1m[2m 4.63 kB[22m[1m[22m
|
|
63
67
|
[2mdist/[22m[36mworkers/cryptoWorker.js [39m[1m[2m19.63 kB[22m[1m[22m
|
|
64
|
-
[32m✓ built in 1.
|
|
68
|
+
[32m✓ built in 1.38s[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,342 @@
|
|
|
1
1
|
# @prosopo/account
|
|
2
2
|
|
|
3
|
+
## 2.8.35
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- Updated dependencies [a1d60db]
|
|
7
|
+
- Updated dependencies [2392aaf]
|
|
8
|
+
- Updated dependencies [6ca1125]
|
|
9
|
+
- @prosopo/types@4.3.0
|
|
10
|
+
- @prosopo/util@3.2.15
|
|
11
|
+
- @prosopo/common@3.1.38
|
|
12
|
+
- @prosopo/keyring@2.9.34
|
|
13
|
+
|
|
14
|
+
## 2.8.34
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [6c26669]
|
|
18
|
+
- Updated dependencies [f7f9ec5]
|
|
19
|
+
- @prosopo/types@4.2.1
|
|
20
|
+
- @prosopo/keyring@2.9.33
|
|
21
|
+
|
|
22
|
+
## 2.8.33
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Updated dependencies [0fd81af]
|
|
26
|
+
- @prosopo/common@3.1.37
|
|
27
|
+
- @prosopo/keyring@2.9.32
|
|
28
|
+
|
|
29
|
+
## 2.8.32
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [20cae63]
|
|
33
|
+
- Updated dependencies [4d9923e]
|
|
34
|
+
- @prosopo/types@4.2.0
|
|
35
|
+
- @prosopo/keyring@2.9.31
|
|
36
|
+
|
|
37
|
+
## 2.8.31
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Updated dependencies [d351362]
|
|
41
|
+
- @prosopo/types@4.1.4
|
|
42
|
+
- @prosopo/keyring@2.9.30
|
|
43
|
+
|
|
44
|
+
## 2.8.30
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [6567ce0]
|
|
48
|
+
- Updated dependencies [e2711ae]
|
|
49
|
+
- Updated dependencies [5786629]
|
|
50
|
+
- @prosopo/util@3.2.14
|
|
51
|
+
- @prosopo/types@4.1.3
|
|
52
|
+
- @prosopo/keyring@2.9.29
|
|
53
|
+
- @prosopo/common@3.1.36
|
|
54
|
+
|
|
55
|
+
## 2.8.29
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [72a1218]
|
|
59
|
+
- @prosopo/util@3.2.13
|
|
60
|
+
- @prosopo/keyring@2.9.28
|
|
61
|
+
- @prosopo/types@4.1.2
|
|
62
|
+
|
|
63
|
+
## 2.8.28
|
|
64
|
+
### Patch Changes
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [91958da]
|
|
67
|
+
- @prosopo/types@4.1.1
|
|
68
|
+
- @prosopo/common@3.1.35
|
|
69
|
+
- @prosopo/keyring@2.9.27
|
|
70
|
+
|
|
71
|
+
## 2.8.27
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [6a741ce]
|
|
75
|
+
- @prosopo/types@4.1.0
|
|
76
|
+
- @prosopo/keyring@2.9.26
|
|
77
|
+
|
|
78
|
+
## 2.8.26
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- 642d064: Fix `CryptoWorkerManager` import path so downstream Vite bundles resolve
|
|
82
|
+
the inlined worker. The import was `./cryptoWorker.ts?worker&inline`,
|
|
83
|
+
which kept the `.ts` extension through TypeScript compilation; the
|
|
84
|
+
emitted `dist/workers/CryptoWorkerManager.js` then referenced a
|
|
85
|
+
non-existent `.ts` file when consumed by `procaptcha-bundle`'s Rollup
|
|
86
|
+
build, breaking the cypress workflow with
|
|
87
|
+
`Could not resolve "./cryptoWorker.ts?worker&inline"`. Aligning with
|
|
88
|
+
the catcher pattern (`*.js?worker&inline`).
|
|
89
|
+
- Updated dependencies [642d064]
|
|
90
|
+
- @prosopo/fingerprint@2.6.31
|
|
91
|
+
|
|
92
|
+
## 2.8.25
|
|
93
|
+
### Patch Changes
|
|
94
|
+
|
|
95
|
+
- 4aae4e6: Pull the frictionless POST critical path down by ~340ms on the test
|
|
96
|
+
hardware via four focused changes:
|
|
97
|
+
|
|
98
|
+
- **Inline Signer.** `@polkadot/extension-base/page/Signer` is now a
|
|
99
|
+
static import in `ExtensionWeb2`. It's 0.5KB on disk but its dynamic
|
|
100
|
+
import was costing ~190ms of network round-trip; inlining removes
|
|
101
|
+
one separate chunk fetch + parse from the critical path.
|
|
102
|
+
|
|
103
|
+
- **Pre-warm the CryptoWorker.** `CryptoWorkerManager` gains a public
|
|
104
|
+
`prewarm()` that actually spawns the Worker and lets its script
|
|
105
|
+
parse during chunk-load time. Previously the call at module load
|
|
106
|
+
only instantiated the manager class; the worker itself spun up
|
|
107
|
+
lazily on the first `runTask`, putting the ~500ms worker module-eval
|
|
108
|
+
inside the first `createAccount()` call. Now it overlaps with chunk
|
|
109
|
+
loading and is hot by the time it's needed.
|
|
110
|
+
|
|
111
|
+
- **Prefetch providers at module load with an env-keyed cache.**
|
|
112
|
+
`prefetchProviders` and `getRandomActiveProvider` share an in-flight
|
|
113
|
+
`Promise<HardcodedProvider[]>` keyed by environment, so a module-load
|
|
114
|
+
prefetch and the later `customDetectBot` Promise.all reuse the same
|
|
115
|
+
network call. `procaptcha-frictionless` triggers the prefetch from
|
|
116
|
+
module-import time using `PROSOPO_DEFAULT_ENVIRONMENT` (browser-safe
|
|
117
|
+
`typeof process` guard + `EnvironmentTypesSchema.safeParse`), so the
|
|
118
|
+
HTTP fetch overlaps with chunk download instead of running as part
|
|
119
|
+
of the detection Promise.all.
|
|
120
|
+
|
|
121
|
+
- **Lazy-load the three captcha solvers.** `ProcaptchaFrictionless`
|
|
122
|
+
no longer statically imports `Procaptcha`, `ProcaptchaPuzzle`, and
|
|
123
|
+
`ProcaptchaPow`; each is `await import(...)` at the point the
|
|
124
|
+
frictionless response picks a type. Two of the three wrappers used
|
|
125
|
+
to be dead weight in the initial bundle; now only the chosen solver
|
|
126
|
+
is downloaded, after the frictionless POST has fired. Pulls ~64KB
|
|
127
|
+
of solver UI (chosen wrapper + Emotion dev runtime + builder + lazy
|
|
128
|
+
shim) out of the initial captchaRenderer chunk.
|
|
129
|
+
|
|
130
|
+
Combined with the earlier worker-related changes, the frictionless POST
|
|
131
|
+
on the puzzle-implicit test page is now ~1290ms vs ~1630ms before this
|
|
132
|
+
batch, and ~6500ms in the original baseline. The remaining floor is
|
|
133
|
+
dominated by the BotScoreWorker's obfuscated bundle parse + run.
|
|
134
|
+
- Updated dependencies [3c0be68]
|
|
135
|
+
- Updated dependencies [4aae4e6]
|
|
136
|
+
- Updated dependencies [f9ea09d]
|
|
137
|
+
- Updated dependencies [4aae4e6]
|
|
138
|
+
- Updated dependencies [d865319]
|
|
139
|
+
- Updated dependencies [753304b]
|
|
140
|
+
- Updated dependencies [8bb7286]
|
|
141
|
+
- Updated dependencies [f9ea09d]
|
|
142
|
+
- Updated dependencies [4aae4e6]
|
|
143
|
+
- Updated dependencies [4993813]
|
|
144
|
+
- @prosopo/types@4.0.0
|
|
145
|
+
- @prosopo/fingerprint@2.6.30
|
|
146
|
+
- @prosopo/util@3.2.12
|
|
147
|
+
- @prosopo/keyring@2.9.25
|
|
148
|
+
- @prosopo/common@3.1.34
|
|
149
|
+
|
|
150
|
+
## 2.8.24
|
|
151
|
+
### Patch Changes
|
|
152
|
+
|
|
153
|
+
- Updated dependencies [819ed95]
|
|
154
|
+
- @prosopo/types@3.16.1
|
|
155
|
+
- @prosopo/keyring@2.9.24
|
|
156
|
+
|
|
157
|
+
## 2.8.23
|
|
158
|
+
### Patch Changes
|
|
159
|
+
|
|
160
|
+
- Updated dependencies [f6a4402]
|
|
161
|
+
- Updated dependencies [99dfb44]
|
|
162
|
+
- @prosopo/types@3.16.0
|
|
163
|
+
- @prosopo/keyring@2.9.23
|
|
164
|
+
|
|
165
|
+
## 2.8.22
|
|
166
|
+
### Patch Changes
|
|
167
|
+
|
|
168
|
+
- Updated dependencies [3e54c0a]
|
|
169
|
+
- @prosopo/types@3.15.0
|
|
170
|
+
- @prosopo/keyring@2.9.22
|
|
171
|
+
|
|
172
|
+
## 2.8.21
|
|
173
|
+
### Patch Changes
|
|
174
|
+
|
|
175
|
+
- Updated dependencies [946a8ba]
|
|
176
|
+
- Updated dependencies [5614814]
|
|
177
|
+
- @prosopo/types@3.14.1
|
|
178
|
+
- @prosopo/common@3.1.33
|
|
179
|
+
- @prosopo/keyring@2.9.21
|
|
180
|
+
|
|
181
|
+
## 2.8.20
|
|
182
|
+
### Patch Changes
|
|
183
|
+
|
|
184
|
+
- Updated dependencies [fc514dd]
|
|
185
|
+
- Updated dependencies [42650db]
|
|
186
|
+
- @prosopo/types@3.14.0
|
|
187
|
+
- @prosopo/common@3.1.32
|
|
188
|
+
- @prosopo/keyring@2.9.20
|
|
189
|
+
|
|
190
|
+
## 2.8.19
|
|
191
|
+
### Patch Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies [4a9c518]
|
|
194
|
+
- @prosopo/common@3.1.31
|
|
195
|
+
- @prosopo/keyring@2.9.19
|
|
196
|
+
|
|
197
|
+
## 2.8.18
|
|
198
|
+
### Patch Changes
|
|
199
|
+
|
|
200
|
+
- Updated dependencies [a25dffa]
|
|
201
|
+
- @prosopo/util@3.2.11
|
|
202
|
+
- @prosopo/keyring@2.9.18
|
|
203
|
+
- @prosopo/types@3.13.3
|
|
204
|
+
|
|
205
|
+
## 2.8.17
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Updated dependencies [346edd7]
|
|
209
|
+
- @prosopo/util@3.2.10
|
|
210
|
+
- @prosopo/keyring@2.9.17
|
|
211
|
+
- @prosopo/types@3.13.2
|
|
212
|
+
|
|
213
|
+
## 2.8.16
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- Updated dependencies [22bfee7]
|
|
217
|
+
- @prosopo/util@3.2.9
|
|
218
|
+
- @prosopo/keyring@2.9.16
|
|
219
|
+
- @prosopo/types@3.13.1
|
|
220
|
+
|
|
221
|
+
## 2.8.15
|
|
222
|
+
### Patch Changes
|
|
223
|
+
|
|
224
|
+
- Updated dependencies [e0fb3d6]
|
|
225
|
+
- Updated dependencies [e6d9553]
|
|
226
|
+
- Updated dependencies [f3f23e3]
|
|
227
|
+
- @prosopo/util@3.2.8
|
|
228
|
+
- @prosopo/types@3.13.0
|
|
229
|
+
- @prosopo/keyring@2.9.15
|
|
230
|
+
|
|
231
|
+
## 2.8.14
|
|
232
|
+
### Patch Changes
|
|
233
|
+
|
|
234
|
+
- 730c61e: Speed up captcha
|
|
235
|
+
- Updated dependencies [730c61e]
|
|
236
|
+
- Updated dependencies [d5082a9]
|
|
237
|
+
- Updated dependencies [e1ea65f]
|
|
238
|
+
- Updated dependencies [c316257]
|
|
239
|
+
- @prosopo/fingerprint@2.6.29
|
|
240
|
+
- @prosopo/types@3.12.3
|
|
241
|
+
- @prosopo/util@3.2.7
|
|
242
|
+
- @prosopo/keyring@2.9.14
|
|
243
|
+
|
|
244
|
+
## 2.8.13
|
|
245
|
+
### Patch Changes
|
|
246
|
+
|
|
247
|
+
- Updated dependencies [adb89a6]
|
|
248
|
+
- @prosopo/types@3.12.2
|
|
249
|
+
- @prosopo/util@3.2.6
|
|
250
|
+
- @prosopo/common@3.1.30
|
|
251
|
+
- @prosopo/keyring@2.9.13
|
|
252
|
+
|
|
253
|
+
## 2.8.12
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- Updated dependencies [c5ee492]
|
|
257
|
+
- Updated dependencies [a90eb54]
|
|
258
|
+
- @prosopo/common@3.1.29
|
|
259
|
+
- @prosopo/types@3.12.1
|
|
260
|
+
- @prosopo/keyring@2.9.12
|
|
261
|
+
|
|
262
|
+
## 2.8.11
|
|
263
|
+
### Patch Changes
|
|
264
|
+
|
|
265
|
+
- Updated dependencies [676c5f2]
|
|
266
|
+
- Updated dependencies [feaca02]
|
|
267
|
+
- @prosopo/keyring@2.9.11
|
|
268
|
+
- @prosopo/types@3.12.0
|
|
269
|
+
|
|
270
|
+
## 2.8.10
|
|
271
|
+
### Patch Changes
|
|
272
|
+
|
|
273
|
+
- Updated dependencies [8148587]
|
|
274
|
+
- @prosopo/types@3.11.1
|
|
275
|
+
- @prosopo/keyring@2.9.10
|
|
276
|
+
|
|
277
|
+
## 2.8.9
|
|
278
|
+
### Patch Changes
|
|
279
|
+
|
|
280
|
+
- Updated dependencies [7f6ffc5]
|
|
281
|
+
- @prosopo/types@3.11.0
|
|
282
|
+
- @prosopo/keyring@2.9.9
|
|
283
|
+
|
|
284
|
+
## 2.8.8
|
|
285
|
+
### Patch Changes
|
|
286
|
+
|
|
287
|
+
- Updated dependencies [93fa086]
|
|
288
|
+
- @prosopo/types@3.10.2
|
|
289
|
+
- @prosopo/keyring@2.9.8
|
|
290
|
+
|
|
291
|
+
## 2.8.7
|
|
292
|
+
### Patch Changes
|
|
293
|
+
|
|
294
|
+
- Updated dependencies [cde7550]
|
|
295
|
+
- @prosopo/types@3.10.1
|
|
296
|
+
- @prosopo/keyring@2.9.7
|
|
297
|
+
|
|
298
|
+
## 2.8.6
|
|
299
|
+
### Patch Changes
|
|
300
|
+
|
|
301
|
+
- Updated dependencies [ad6d622]
|
|
302
|
+
- @prosopo/types@3.10.0
|
|
303
|
+
- @prosopo/keyring@2.9.6
|
|
304
|
+
|
|
305
|
+
## 2.8.5
|
|
306
|
+
### Patch Changes
|
|
307
|
+
|
|
308
|
+
- Updated dependencies [ff58a70]
|
|
309
|
+
- @prosopo/types@3.9.0
|
|
310
|
+
- @prosopo/keyring@2.9.5
|
|
311
|
+
|
|
312
|
+
## 2.8.4
|
|
313
|
+
### Patch Changes
|
|
314
|
+
|
|
315
|
+
- Updated dependencies [d2431cd]
|
|
316
|
+
- @prosopo/types@3.8.4
|
|
317
|
+
- @prosopo/keyring@2.9.4
|
|
318
|
+
|
|
319
|
+
## 2.8.3
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- Updated dependencies [bd6995b]
|
|
323
|
+
- @prosopo/types@3.8.3
|
|
324
|
+
- @prosopo/keyring@2.9.3
|
|
325
|
+
|
|
326
|
+
## 2.8.2
|
|
327
|
+
### Patch Changes
|
|
328
|
+
|
|
329
|
+
- Updated dependencies [9633e58]
|
|
330
|
+
- @prosopo/types@3.8.2
|
|
331
|
+
- @prosopo/keyring@2.9.2
|
|
332
|
+
|
|
333
|
+
## 2.8.1
|
|
334
|
+
### Patch Changes
|
|
335
|
+
|
|
336
|
+
- Updated dependencies [f52a5c1]
|
|
337
|
+
- @prosopo/types@3.8.1
|
|
338
|
+
- @prosopo/keyring@2.9.1
|
|
339
|
+
|
|
3
340
|
## 2.8.0
|
|
4
341
|
### Minor Changes
|
|
5
342
|
|
|
@@ -22,6 +22,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
22
22
|
mod
|
|
23
23
|
));
|
|
24
24
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
25
|
+
const Signer = require("@polkadot/extension-base/page/Signer");
|
|
25
26
|
const util$1 = require("@polkadot/util");
|
|
26
27
|
const fingerprint = require("@prosopo/fingerprint");
|
|
27
28
|
const keyring = require("@prosopo/keyring");
|
|
@@ -29,19 +30,19 @@ const util = require("@prosopo/util");
|
|
|
29
30
|
const utilCrypto = require("@prosopo/util-crypto");
|
|
30
31
|
const CryptoWorkerManager = require("../workers/CryptoWorkerManager.cjs");
|
|
31
32
|
const Extension = require("./Extension.cjs");
|
|
32
|
-
|
|
33
|
+
fingerprint.prefetchFingerprint();
|
|
34
|
+
CryptoWorkerManager.getCryptoWorkerManager().prewarm();
|
|
33
35
|
const EntropyToMnemonicLoader = async () => (await import("@prosopo/util-crypto")).entropyToMnemonic;
|
|
34
36
|
class ExtensionWeb2 extends Extension.Extension {
|
|
35
37
|
async getAccount(config) {
|
|
36
38
|
const account = await this.createAccount(config);
|
|
37
|
-
const extension =
|
|
39
|
+
const extension = this.createExtension(account);
|
|
38
40
|
return {
|
|
39
41
|
account,
|
|
40
42
|
extension
|
|
41
43
|
};
|
|
42
44
|
}
|
|
43
|
-
|
|
44
|
-
const Signer = await SignerLoader();
|
|
45
|
+
createExtension(account) {
|
|
45
46
|
const signer = new Signer(async () => {
|
|
46
47
|
return;
|
|
47
48
|
});
|
|
@@ -73,6 +73,15 @@ class CryptoWorkerManager {
|
|
|
73
73
|
worker.postMessage({ taskId: "test", task: "test", data: {} });
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Eagerly spawn the worker so the first runTask() doesn't pay the
|
|
78
|
+
* worker-spawn + module-parse cost. Failures are swallowed because
|
|
79
|
+
* runTask() will reattempt initWorker() on demand.
|
|
80
|
+
*/
|
|
81
|
+
prewarm() {
|
|
82
|
+
this.initWorker().catch(() => {
|
|
83
|
+
});
|
|
84
|
+
}
|
|
76
85
|
/**
|
|
77
86
|
* Run a task in the Web Worker
|
|
78
87
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAK5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAa3C,qBAAa,aAAc,SAAQ,SAAS;IAC9B,UAAU,CACtB,MAAM,EAAE,4BAA4B,GAClC,OAAO,CAAC,OAAO,CAAC;IAUnB,OAAO,CAAC,eAAe;YAiCT,aAAa;CAiC3B;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
+
import Signer from "@polkadot/extension-base/page/Signer";
|
|
1
2
|
import { stringToU8a } from "@polkadot/util";
|
|
2
|
-
import { getFingerprint } from "@prosopo/fingerprint";
|
|
3
|
+
import { prefetchFingerprint, getFingerprint } from "@prosopo/fingerprint";
|
|
3
4
|
import { Keyring } from "@prosopo/keyring";
|
|
4
5
|
import { u8aToHex, version } from "@prosopo/util";
|
|
5
6
|
import { hexHash } from "@prosopo/util-crypto";
|
|
6
7
|
import { getCryptoWorkerManager } from "../workers/CryptoWorkerManager.js";
|
|
7
8
|
import { Extension } from "./Extension.js";
|
|
8
|
-
|
|
9
|
+
prefetchFingerprint();
|
|
10
|
+
getCryptoWorkerManager().prewarm();
|
|
9
11
|
const EntropyToMnemonicLoader = async () => (await import("@prosopo/util-crypto")).entropyToMnemonic;
|
|
10
12
|
class ExtensionWeb2 extends Extension {
|
|
11
13
|
async getAccount(config) {
|
|
12
14
|
const account = await this.createAccount(config);
|
|
13
|
-
const extension =
|
|
15
|
+
const extension = this.createExtension(account);
|
|
14
16
|
return {
|
|
15
17
|
account,
|
|
16
18
|
extension
|
|
17
19
|
};
|
|
18
20
|
}
|
|
19
|
-
|
|
20
|
-
const Signer = await SignerLoader();
|
|
21
|
+
createExtension(account) {
|
|
21
22
|
const signer = new Signer(async () => {
|
|
22
23
|
return;
|
|
23
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExtensionWeb2.js","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ExtensionWeb2.js","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"AAcA,OAAO,MAAM,MAAM,sCAAsC,CAAC;AAG1D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,m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|
|
6
7
|
runTask<T>(task: string, data: Record<string, string | Uint8Array>): Promise<T>;
|
|
7
8
|
entropyToMnemonic(entropy: Uint8Array): Promise<string>;
|
|
8
9
|
private cleanup;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CryptoWorkerManager.d.ts","sourceRoot":"","sources":["../../src/workers/CryptoWorkerManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CryptoWorkerManager.d.ts","sourceRoot":"","sources":["../../src/workers/CryptoWorkerManager.ts"],"names":[],"mappings":"AA+BA,qBAAa,mBAAmB;IAC/B,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,cAAc,CAAS;YAKjB,UAAU;YAkCV,UAAU;IAwDxB,OAAO,IAAI,IAAI;IAOT,OAAO,CAAC,CAAC,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,UAAU,CAAC,GACvC,OAAO,CAAC,CAAC,CAAC;IAoDP,iBAAiB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAO7D,OAAO,CAAC,OAAO;IAWR,OAAO,IAAI,IAAI;CAGtB;AAQD,wBAAgB,sBAAsB,IAAI,mBAAmB,CAK5D"}
|
|
@@ -71,6 +71,15 @@ class CryptoWorkerManager {
|
|
|
71
71
|
worker.postMessage({ taskId: "test", task: "test", data: {} });
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
+
/**
|
|
75
|
+
* Eagerly spawn the worker so the first runTask() doesn't pay the
|
|
76
|
+
* worker-spawn + module-parse cost. Failures are swallowed because
|
|
77
|
+
* runTask() will reattempt initWorker() on demand.
|
|
78
|
+
*/
|
|
79
|
+
prewarm() {
|
|
80
|
+
this.initWorker().catch(() => {
|
|
81
|
+
});
|
|
82
|
+
}
|
|
74
83
|
/**
|
|
75
84
|
* Run a task in the Web Worker
|
|
76
85
|
*/
|