@prosopo/procaptcha-bundle 4.1.17 → 4.1.19
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 +9 -9
- package/.turbo/turbo-build$colon$tsc.log +29 -29
- package/.turbo/turbo-build.log +10 -10
- package/CHANGELOG.md +47 -0
- package/dist/cjs/index.cjs +13 -4
- package/dist/cjs/util/captcha/captchaRenderer.cjs +3 -1
- package/dist/cjs/util/configCreator.cjs +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -4
- package/dist/index.js.map +1 -1
- package/dist/util/captcha/captchaRenderer.d.ts.map +1 -1
- package/dist/util/captcha/captchaRenderer.js +3 -1
- package/dist/util/captcha/captchaRenderer.js.map +1 -1
- package/dist/util/configCreator.d.ts +1 -1
- package/dist/util/configCreator.d.ts.map +1 -1
- package/dist/util/configCreator.js +4 -2
- package/dist/util/configCreator.js.map +1 -1
- package/package.json +5 -5
- package/src/index.ts +11 -2
- package/src/util/captcha/captchaRenderer.tsx +2 -0
- package/src/util/configCreator.ts +4 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.1.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.1.19 build:cjs
|
|
3
3
|
> NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
|
|
4
4
|
|
|
5
5
|
ViteCommonJSConfig: .
|
|
@@ -13,13 +13,13 @@ ViteCommonJSConfig: .
|
|
|
13
13
|
'/home/runner/work/captcha/captcha/packages/detector/tsconfig.json',
|
|
14
14
|
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
15
15
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
16
|
-
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
17
|
-
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
18
16
|
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
19
17
|
'/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
|
|
18
|
+
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
20
19
|
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
21
20
|
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
22
21
|
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
22
|
+
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
23
23
|
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
24
24
|
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
25
25
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
@@ -39,13 +39,13 @@ ViteCommonJSConfig: .
|
|
|
39
39
|
'@prosopo/detector',
|
|
40
40
|
'@prosopo/types',
|
|
41
41
|
'@prosopo/util-crypto',
|
|
42
|
-
'@prosopo/load-balancer',
|
|
43
|
-
'@prosopo/common',
|
|
44
42
|
'@prosopo/procaptcha-pow',
|
|
45
43
|
'@prosopo/api',
|
|
44
|
+
'@prosopo/common',
|
|
46
45
|
'@prosopo/fingerprint',
|
|
47
46
|
'@prosopo/fingerprintjs',
|
|
48
47
|
'@prosopo/procaptcha-common',
|
|
48
|
+
'@prosopo/load-balancer',
|
|
49
49
|
'@prosopo/widget-skeleton',
|
|
50
50
|
'@prosopo/account',
|
|
51
51
|
'@prosopo/keyring',
|
|
@@ -67,8 +67,8 @@ rendering chunks...
|
|
|
67
67
|
[2mdist/cjs/[22m[36mutil/language.cjs [39m[1m[2m0.67 kB[22m[1m[22m
|
|
68
68
|
[2mdist/cjs/[22m[36mutil/config.cjs [39m[1m[2m0.76 kB[22m[1m[22m
|
|
69
69
|
[2mdist/cjs/[22m[36mutil/captcha/components/bundleCaptcha.cjs [39m[1m[2m0.83 kB[22m[1m[22m
|
|
70
|
-
[2mdist/cjs/[22m[36mutil/configCreator.cjs [39m[1m[2m0.
|
|
71
|
-
[2mdist/cjs/[22m[36mutil/captcha/captchaRenderer.cjs [39m[1m[2m2.
|
|
70
|
+
[2mdist/cjs/[22m[36mutil/configCreator.cjs [39m[1m[2m0.93 kB[22m[1m[22m
|
|
71
|
+
[2mdist/cjs/[22m[36mutil/captcha/captchaRenderer.cjs [39m[1m[2m2.21 kB[22m[1m[22m
|
|
72
72
|
[2mdist/cjs/[22m[36mutil/widgetFactory.cjs [39m[1m[2m2.82 kB[22m[1m[22m
|
|
73
|
-
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m5.
|
|
74
|
-
[32m✓ built in
|
|
73
|
+
[2mdist/cjs/[22m[36mindex.cjs [39m[1m[2m5.79 kB[22m[1m[22m
|
|
74
|
+
[32m✓ built in 202ms[39m
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.1.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.1.19 build:tsc
|
|
3
3
|
> tsc --build --verbose
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
7:02:57 PM - Projects in this build:
|
|
6
6
|
* ../../dev/config/tsconfig.json
|
|
7
7
|
* ../util/tsconfig.json
|
|
8
8
|
* ../logger/tsconfig.json
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
* ../util-crypto/tsconfig.json
|
|
12
12
|
* ../types/tsconfig.json
|
|
13
13
|
* ../detector/tsconfig.json
|
|
14
|
-
* ../common/tsconfig.json
|
|
15
|
-
* ../load-balancer/tsconfig.json
|
|
16
14
|
* ../api/tsconfig.json
|
|
15
|
+
* ../common/tsconfig.json
|
|
17
16
|
* ../fingerprintjs/tsconfig.json
|
|
18
17
|
* ../fingerprint/tsconfig.json
|
|
18
|
+
* ../load-balancer/tsconfig.json
|
|
19
19
|
* ../widget-skeleton/tsconfig.json
|
|
20
20
|
* ../keyring/tsconfig.json
|
|
21
21
|
* ../account/tsconfig.json
|
|
@@ -28,53 +28,53 @@
|
|
|
28
28
|
* ../procaptcha-frictionless/tsconfig.json
|
|
29
29
|
* tsconfig.json
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
7:02:58 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
7:02:58 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/version.ts' is older than output '../util/tsconfig.tsbuildinfo'
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
7:02:58 PM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
7:02:58 PM - Project '../dotenv/tsconfig.json' is up to date because newest input '../dotenv/src/env.ts' is older than output '../dotenv/tsconfig.tsbuildinfo'
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
7:02:58 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
7:02:58 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
7:02:58 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
7:02:58 PM - Project '../detector/tsconfig.json' is up to date because newest input '../detector/src/index.js' is older than output '../detector/tsconfig.tsbuildinfo'
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
7:02:58 PM - Project '../api/tsconfig.json' is up to date because newest input '../api/src/index.ts' is older than output '../api/tsconfig.tsbuildinfo'
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
7:02:58 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
7:02:58 PM - Project '../fingerprintjs/tsconfig.json' is up to date because newest input '../fingerprintjs/src/utils/browser.ts' is older than output '../fingerprintjs/tsconfig.tsbuildinfo'
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
7:02:58 PM - Project '../fingerprint/tsconfig.json' is up to date because newest input '../fingerprint/src/index.ts' is older than output '../fingerprint/tsconfig.tsbuildinfo'
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
7:02:58 PM - Project '../load-balancer/tsconfig.json' is up to date because newest input '../load-balancer/src/balancer.ts' is older than output '../load-balancer/tsconfig.tsbuildinfo'
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
7:02:58 PM - Project '../widget-skeleton/tsconfig.json' is up to date because newest input '../widget-skeleton/src/constants.ts' is older than output '../widget-skeleton/tsconfig.tsbuildinfo'
|
|
58
58
|
|
|
59
|
-
|
|
59
|
+
7:02:58 PM - Project '../keyring/tsconfig.json' is up to date because newest input '../keyring/src/pair/decode.ts' is older than output '../keyring/tsconfig.tsbuildinfo'
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
7:02:58 PM - Project '../account/tsconfig.json' is up to date because newest input '../account/src/workers/cryptoWorker.ts' is older than output '../account/tsconfig.tsbuildinfo'
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
7:02:58 PM - Project '../procaptcha-common/tsconfig.json' is up to date because newest input '../procaptcha-common/src/reactComponents/Honeypot.tsx' is older than output '../procaptcha-common/tsconfig.tsbuildinfo'
|
|
64
64
|
|
|
65
|
-
|
|
65
|
+
7:02:58 PM - Project '../procaptcha-pow/tsconfig.json' is up to date because newest input '../procaptcha-pow/src/index.ts' is older than output '../procaptcha-pow/tsconfig.tsbuildinfo'
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
7:02:58 PM - Project '../procaptcha-puzzle/tsconfig.json' is up to date because newest input '../procaptcha-puzzle/src/index.ts' is older than output '../procaptcha-puzzle/tsconfig.tsbuildinfo'
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
7:02:58 PM - Project '../datasets/tsconfig.json' is up to date because newest input '../datasets/src/tests/dataset.unit.test.ts' is older than output '../datasets/tsconfig.tsbuildinfo'
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
7:02:58 PM - Project '../procaptcha/tsconfig.json' is up to date because newest input '../procaptcha/src/modules/Manager.ts' is older than output '../procaptcha/tsconfig.tsbuildinfo'
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
7:02:58 PM - Project '../procaptcha-react/tsconfig.json' is up to date because newest input '../procaptcha-react/src/index.ts' is older than output '../procaptcha-react/tsconfig.tsbuildinfo'
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
7:02:58 PM - Project '../procaptcha-frictionless/tsconfig.json' is up to date because newest input '../procaptcha-frictionless/src/ProcaptchaFrictionless.tsx' is older than output '../procaptcha-frictionless/tsconfig.tsbuildinfo'
|
|
76
76
|
|
|
77
|
-
|
|
77
|
+
7:02:58 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
7:02:58 PM - Building project '/home/runner/work/captcha/captcha/packages/procaptcha-bundle/tsconfig.json'...
|
|
80
80
|
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
> @prosopo/procaptcha-bundle@4.1.
|
|
2
|
+
> @prosopo/procaptcha-bundle@4.1.19 build
|
|
3
3
|
> npm run build:cross-env -- --mode ${NODE_ENV:-development}
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
> @prosopo/procaptcha-bundle@4.1.
|
|
6
|
+
> @prosopo/procaptcha-bundle@4.1.19 build:cross-env
|
|
7
7
|
> vite build --config vite.esm.config.ts --mode production
|
|
8
8
|
|
|
9
9
|
ViteEsmConfig: .
|
|
@@ -17,13 +17,13 @@ ViteEsmConfig: .
|
|
|
17
17
|
'/home/runner/work/captcha/captcha/packages/detector/tsconfig.json',
|
|
18
18
|
'/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
|
|
19
19
|
'/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json',
|
|
20
|
-
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
21
|
-
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
22
20
|
'/home/runner/work/captcha/captcha/packages/procaptcha-pow/tsconfig.json',
|
|
23
21
|
'/home/runner/work/captcha/captcha/packages/api/tsconfig.json',
|
|
22
|
+
'/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
|
|
24
23
|
'/home/runner/work/captcha/captcha/packages/fingerprint/tsconfig.json',
|
|
25
24
|
'/home/runner/work/captcha/captcha/packages/fingerprintjs/tsconfig.json',
|
|
26
25
|
'/home/runner/work/captcha/captcha/packages/procaptcha-common/tsconfig.json',
|
|
26
|
+
'/home/runner/work/captcha/captcha/packages/load-balancer/tsconfig.json',
|
|
27
27
|
'/home/runner/work/captcha/captcha/packages/widget-skeleton/tsconfig.json',
|
|
28
28
|
'/home/runner/work/captcha/captcha/packages/account/tsconfig.json',
|
|
29
29
|
'/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json',
|
|
@@ -43,13 +43,13 @@ ViteEsmConfig: .
|
|
|
43
43
|
'@prosopo/detector',
|
|
44
44
|
'@prosopo/types',
|
|
45
45
|
'@prosopo/util-crypto',
|
|
46
|
-
'@prosopo/load-balancer',
|
|
47
|
-
'@prosopo/common',
|
|
48
46
|
'@prosopo/procaptcha-pow',
|
|
49
47
|
'@prosopo/api',
|
|
48
|
+
'@prosopo/common',
|
|
50
49
|
'@prosopo/fingerprint',
|
|
51
50
|
'@prosopo/fingerprintjs',
|
|
52
51
|
'@prosopo/procaptcha-common',
|
|
52
|
+
'@prosopo/load-balancer',
|
|
53
53
|
'@prosopo/widget-skeleton',
|
|
54
54
|
'@prosopo/account',
|
|
55
55
|
'@prosopo/keyring',
|
|
@@ -70,8 +70,8 @@ rendering chunks...
|
|
|
70
70
|
[2mdist/[22m[36mutil/language.js [39m[1m[2m0.57 kB[22m[1m[22m
|
|
71
71
|
[2mdist/[22m[36mutil/config.js [39m[1m[2m0.63 kB[22m[1m[22m
|
|
72
72
|
[2mdist/[22m[36mutil/captcha/components/bundleCaptcha.js [39m[1m[2m0.66 kB[22m[1m[22m
|
|
73
|
-
[2mdist/[22m[36mutil/configCreator.js [39m[1m[2m0.
|
|
74
|
-
[2mdist/[22m[36mutil/captcha/captchaRenderer.js [39m[1m[
|
|
73
|
+
[2mdist/[22m[36mutil/configCreator.js [39m[1m[2m0.86 kB[22m[1m[22m
|
|
74
|
+
[2mdist/[22m[36mutil/captcha/captchaRenderer.js [39m[1m[2m2.04 kB[22m[1m[22m
|
|
75
75
|
[2mdist/[22m[36mutil/widgetFactory.js [39m[1m[2m2.65 kB[22m[1m[22m
|
|
76
|
-
[2mdist/[22m[36mindex.js [39m[1m[2m5.
|
|
77
|
-
[32m✓ built in
|
|
76
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m5.55 kB[22m[1m[22m
|
|
77
|
+
[32m✓ built in 190ms[39m
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# @prosopo/procaptcha-bundle
|
|
2
2
|
|
|
3
|
+
## 4.1.19
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 12cd0a6: Add ipv4-only / ipv6-only provider DNS routing via `data-ipv4` / `data-ipv6`.
|
|
7
|
+
|
|
8
|
+
Dapps that need to pin captcha traffic to a single IP stack can now do so:
|
|
9
|
+
|
|
10
|
+
```html
|
|
11
|
+
<div class="procaptcha" data-sitekey="..." data-ipv4="true"></div>
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
What happens under the hood:
|
|
15
|
+
|
|
16
|
+
- The widget reads `data-ipv4` / `data-ipv6` (or the matching `ipv4` / `ipv6`
|
|
17
|
+
booleans on `ProcaptchaRenderOptions` / explicit `render(...)`) and threads
|
|
18
|
+
them through `ProcaptchaConfigSchema`.
|
|
19
|
+
- `pickIpMode(config)` resolves them into an `IpMode` (`"ipv4"` / `"ipv6"` /
|
|
20
|
+
`undefined`); `ipv4` wins if both are set.
|
|
21
|
+
- The frictionless / image / pow / puzzle managers pass the `IpMode` into
|
|
22
|
+
`getProcaptchaRandomActiveProvider`, which calls `/healthz` on the matching
|
|
23
|
+
single-stack global hostname (`ipv4.pronode.prosopo.io` or
|
|
24
|
+
`ipv6.pronode.prosopo.io`) and pins subsequent captcha calls to
|
|
25
|
+
`ipv4.pronodeN.prosopo.io` / `ipv6.pronodeN.prosopo.io`. The dual-stack
|
|
26
|
+
cache and the single-stack caches are kept separate.
|
|
27
|
+
- `convertHostedProvider` now accepts an optional `IpMode` and, when set,
|
|
28
|
+
selects the matching `ipv4` / `ipv6` sub-object from the provider-list JSON.
|
|
29
|
+
Top-level `ipv4` / `ipv6` keys are skipped by default so existing dual-stack
|
|
30
|
+
callers keep working.
|
|
31
|
+
- New helpers in `@prosopo/load-balancer`: `IpMode`, `stripIpModeLabel`,
|
|
32
|
+
`getProviderHostname`.
|
|
33
|
+
|
|
34
|
+
Coordinated with the matching `captcha-private` change that publishes the
|
|
35
|
+
`ipv4` / `ipv6` sub-objects to S3.
|
|
36
|
+
- Updated dependencies [12cd0a6]
|
|
37
|
+
- Updated dependencies [12cd0a6]
|
|
38
|
+
- @prosopo/procaptcha-common@2.11.0
|
|
39
|
+
- @prosopo/procaptcha-frictionless@2.12.0
|
|
40
|
+
- @prosopo/types@4.8.0
|
|
41
|
+
|
|
42
|
+
## 4.1.18
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- Updated dependencies [bb98af1]
|
|
46
|
+
- @prosopo/types@4.7.4
|
|
47
|
+
- @prosopo/procaptcha-common@2.10.28
|
|
48
|
+
- @prosopo/procaptcha-frictionless@2.11.11
|
|
49
|
+
|
|
3
50
|
## 4.1.17
|
|
4
51
|
### Patch Changes
|
|
5
52
|
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -15,8 +15,11 @@ const implicitRender = async () => {
|
|
|
15
15
|
document.getElementsByClassName("procaptcha")
|
|
16
16
|
).filter((element) => element.tagName.toLowerCase() !== "button");
|
|
17
17
|
if (elements.length) {
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const firstElement = util.at(elements, 0);
|
|
19
|
+
const siteKey = firstElement.getAttribute("data-sitekey");
|
|
20
|
+
const web3 = firstElement.getAttribute("data-web3");
|
|
21
|
+
const ipv4 = firstElement.getAttribute("data-ipv4") === "true";
|
|
22
|
+
const ipv6 = firstElement.getAttribute("data-ipv6") === "true";
|
|
20
23
|
if (!siteKey) {
|
|
21
24
|
console.error("No site key found");
|
|
22
25
|
return;
|
|
@@ -24,7 +27,9 @@ const implicitRender = async () => {
|
|
|
24
27
|
const root = await widgetFactory.createWidgets(
|
|
25
28
|
elements,
|
|
26
29
|
{
|
|
27
|
-
siteKey
|
|
30
|
+
siteKey,
|
|
31
|
+
ipv4,
|
|
32
|
+
ipv6
|
|
28
33
|
},
|
|
29
34
|
!(web3 === "true")
|
|
30
35
|
);
|
|
@@ -37,11 +42,15 @@ const implicitRender = async () => {
|
|
|
37
42
|
for (const button of invisibleButtons) {
|
|
38
43
|
const siteKey = button.getAttribute("data-sitekey") || "";
|
|
39
44
|
const callback = button.getAttribute("data-callback") || "";
|
|
45
|
+
const ipv4 = button.getAttribute("data-ipv4") === "true";
|
|
46
|
+
const ipv6 = button.getAttribute("data-ipv6") === "true";
|
|
40
47
|
const root = await widgetFactory.createWidgets(
|
|
41
48
|
[button],
|
|
42
49
|
{
|
|
43
50
|
siteKey,
|
|
44
|
-
callback
|
|
51
|
+
callback,
|
|
52
|
+
ipv4,
|
|
53
|
+
ipv6
|
|
45
54
|
},
|
|
46
55
|
true,
|
|
47
56
|
true
|
|
@@ -16,7 +16,9 @@ class CaptchaRenderer {
|
|
|
16
16
|
renderOptions.language,
|
|
17
17
|
isWeb2,
|
|
18
18
|
invisible,
|
|
19
|
-
renderOptions.userAccountAddress
|
|
19
|
+
renderOptions.userAccountAddress,
|
|
20
|
+
renderOptions.ipv4,
|
|
21
|
+
renderOptions.ipv6
|
|
20
22
|
);
|
|
21
23
|
this.readAndValidateSettings(
|
|
22
24
|
sourceElement || container,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const types = require("@prosopo/types");
|
|
4
|
-
function createConfig(siteKey, theme = "light", language, web2 = true, invisible = false, userAccountAddress) {
|
|
4
|
+
function createConfig(siteKey, theme = "light", language, web2 = true, invisible = false, userAccountAddress, ipv4 = false, ipv6 = false) {
|
|
5
5
|
if (!siteKey) {
|
|
6
6
|
siteKey = process.env.PROSOPO_SITE_KEY || "";
|
|
7
7
|
}
|
|
@@ -16,7 +16,9 @@ function createConfig(siteKey, theme = "light", language, web2 = true, invisible
|
|
|
16
16
|
web2,
|
|
17
17
|
mode: invisible ? "invisible" : "visible",
|
|
18
18
|
theme,
|
|
19
|
-
language
|
|
19
|
+
language,
|
|
20
|
+
ipv4,
|
|
21
|
+
ipv6
|
|
20
22
|
});
|
|
21
23
|
}
|
|
22
24
|
exports.createConfig = createConfig;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAsF9D,eAAO,MAAM,MAAM,YACT,OAAO,iBACD,uBAAuB,kBA2BtC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,KAAK,CAAC,EAAE,EAAE,MAAM,IAAI,QAY3C;AAED,eAAO,MAAM,OAAO,YAqBnB,CAAC;AAkCF,OAAO,CAAC,MAAM,CAAC;IACd,UAAU,MAAM;QACf,UAAU,EAAE;YACX,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,MAAM,EAAE,OAAO,MAAM,CAAC;YACtB,KAAK,EAAE,OAAO,KAAK,CAAC;YACpB,OAAO,EAAE,OAAO,OAAO,CAAC;SACxB,CAAC;KACF;CACD;AAmCD,eAAO,MAAM,KAAK,YAOjB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,8 +13,11 @@ const implicitRender = async () => {
|
|
|
13
13
|
document.getElementsByClassName("procaptcha")
|
|
14
14
|
).filter((element) => element.tagName.toLowerCase() !== "button");
|
|
15
15
|
if (elements.length) {
|
|
16
|
-
const
|
|
17
|
-
const
|
|
16
|
+
const firstElement = at(elements, 0);
|
|
17
|
+
const siteKey = firstElement.getAttribute("data-sitekey");
|
|
18
|
+
const web3 = firstElement.getAttribute("data-web3");
|
|
19
|
+
const ipv4 = firstElement.getAttribute("data-ipv4") === "true";
|
|
20
|
+
const ipv6 = firstElement.getAttribute("data-ipv6") === "true";
|
|
18
21
|
if (!siteKey) {
|
|
19
22
|
console.error("No site key found");
|
|
20
23
|
return;
|
|
@@ -22,7 +25,9 @@ const implicitRender = async () => {
|
|
|
22
25
|
const root = await widgetFactory.createWidgets(
|
|
23
26
|
elements,
|
|
24
27
|
{
|
|
25
|
-
siteKey
|
|
28
|
+
siteKey,
|
|
29
|
+
ipv4,
|
|
30
|
+
ipv6
|
|
26
31
|
},
|
|
27
32
|
!(web3 === "true")
|
|
28
33
|
);
|
|
@@ -35,11 +40,15 @@ const implicitRender = async () => {
|
|
|
35
40
|
for (const button of invisibleButtons) {
|
|
36
41
|
const siteKey = button.getAttribute("data-sitekey") || "";
|
|
37
42
|
const callback = button.getAttribute("data-callback") || "";
|
|
43
|
+
const ipv4 = button.getAttribute("data-ipv4") === "true";
|
|
44
|
+
const ipv6 = button.getAttribute("data-ipv6") === "true";
|
|
38
45
|
const root = await widgetFactory.createWidgets(
|
|
39
46
|
[button],
|
|
40
47
|
{
|
|
41
48
|
siteKey,
|
|
42
|
-
callback
|
|
49
|
+
callback,
|
|
50
|
+
ipv4,
|
|
51
|
+
ipv6
|
|
43
52
|
},
|
|
44
53
|
true,
|
|
45
54
|
true
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE/D,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,2BAA2B,EAAE,sBAAsB,CAAC,CAAC;AAC3E,IAAI,eAAe,GAAW,EAAE,CAAC;AAEjC,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,IAAI,mBAAmB,EAAE,CAAC,CAAC;AAGnE,MAAM,wBAAwB,GAAG,oBAAoB,CAAC;AAGtD,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAGlD,MAAM,cAAc,GAAG,KAAK,IAAI,EAAE;IAEjC,MAAM,QAAQ,GAAc,KAAK,CAAC,IAAI,CACrC,QAAQ,CAAC,sBAAsB,CAAC,YAAY,CAAC,CAC7C,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,C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CACnB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,WAAW,EACtB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,OAAO,EAClB,eAAe,EAAE,WAAW,EAC5B,aAAa,CAAC,EAAE,OAAO,GACrB,IAAI;
|
|
1
|
+
{"version":3,"file":"captchaRenderer.d.ts","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":"AAcA,OAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEhE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,KAAK,EACX,SAAS,EACT,4BAA4B,EAC5B,uBAAuB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,kBAAkB,CAAC;AAMzD,UAAU,cAAc;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACxB;AAED,cAAM,eAAe;IACb,aAAa,CACnB,QAAQ,EAAE,cAAc,EACxB,SAAS,EAAE,WAAW,EACtB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,OAAO,EACf,IAAI,EAAE,KAAK,EACX,SAAS,EAAE,OAAO,EAClB,eAAe,EAAE,WAAW,EAC5B,aAAa,CAAC,EAAE,OAAO,GACrB,IAAI;IAyCP,SAAS,CAAC,uBAAuB,CAChC,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,4BAA4B,EACpC,aAAa,EAAE,uBAAuB,GACpC,IAAI;IAKP,SAAS,CAAC,gBAAgB,CACzB,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,WAAW,GACpB,YAAY;IAQf,SAAS,CAAC,eAAe,CACxB,SAAS,EAAE,WAAW,EACtB,gBAAgB,EAAE,MAAM,GACtB,IAAI;IAMP,SAAS,CAAC,sBAAsB,CAC/B,SAAS,EAAE,IAAI,EACf,YAAY,EAAE,YAAY,EAC1B,gBAAgB,EAAE,SAAS,GACzB,IAAI;CAKP;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -14,7 +14,9 @@ class CaptchaRenderer {
|
|
|
14
14
|
renderOptions.language,
|
|
15
15
|
isWeb2,
|
|
16
16
|
invisible,
|
|
17
|
-
renderOptions.userAccountAddress
|
|
17
|
+
renderOptions.userAccountAddress,
|
|
18
|
+
renderOptions.ipv4,
|
|
19
|
+
renderOptions.ipv6
|
|
18
20
|
);
|
|
19
21
|
this.readAndValidateSettings(
|
|
20
22
|
sourceElement || container,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"captchaRenderer.js","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":";AAcA,OAAO,WAAkC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAQ9D,MAAM,eAAe;IACb,aAAa,CACnB,QAAwB,EACxB,SAAsB,EACtB,aAAsC,EACtC,SAAoB,EACpB,MAAe,EACf,IAAW,EACX,SAAkB,EAClB,eAA4B,EAC5B,aAAuB;QAEvB,MAAM,MAAM,GAAG,YAAY,CAC1B,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,QAAQ,EACtB,MAAM,EACN,SAAS,EACT,aAAa,CAAC,kBAAkB,
|
|
1
|
+
{"version":3,"file":"captchaRenderer.js","sourceRoot":"","sources":["../../../src/util/captcha/captchaRenderer.tsx"],"names":[],"mappings":";AAcA,OAAO,WAAkC,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAQ/C,OAAO,EAAa,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAQ9D,MAAM,eAAe;IACb,aAAa,CACnB,QAAwB,EACxB,SAAsB,EACtB,aAAsC,EACtC,SAAoB,EACpB,MAAe,EACf,IAAW,EACX,SAAkB,EAClB,eAA4B,EAC5B,aAAuB;QAEvB,MAAM,MAAM,GAAG,YAAY,CAC1B,aAAa,CAAC,OAAO,EACrB,aAAa,CAAC,KAAK,EACnB,aAAa,CAAC,QAAQ,EACtB,MAAM,EACN,SAAS,EACT,aAAa,CAAC,kBAAkB,EAChC,aAAa,CAAC,IAAI,EAClB,aAAa,CAAC,IAAI,CAClB,CAAC;QACF,IAAI,CAAC,uBAAuB,CAC3B,aAAa,IAAI,SAAS,EAC1B,MAAM,EACN,aAAa,CACb,CAAC;QAEF,MAAM,SAAS,GAAG,IAAI,CAAC,eAAe,CACrC,SAAS,EACT,QAAQ,CAAC,gBAAgB,CACzB,CAAC;QAEF,MAAM,YAAY,GAAG,IAAI,CAAC,gBAAgB,CACzC,QAAQ,CAAC,eAAe,EACxB,SAAS,CACT,CAAC;QAEF,MAAM,gBAAgB,GAAG,CACxB,KAAC,aAAa,IACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,eAAe,GACzB,CACF,CAAC;QAEF,IAAI,CAAC,sBAAsB,CAAC,SAAS,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;QAEvE,OAAO,SAAS,CAAC;IAClB,CAAC;IAES,uBAAuB,CAChC,OAAgB,EAChB,MAAoC,EACpC,aAAsC;QAEtC,uBAAuB,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;QACxD,WAAW,CAAC,aAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7C,CAAC;IAES,gBAAgB,CACzB,QAAgB,EAChB,SAAsB;QAEtB,OAAO,WAAW,CAAC;YAClB,GAAG,EAAE,QAAQ;YACb,OAAO,EAAE,IAAI;YACb,SAAS,EAAE,SAAS;SACpB,CAAC,CAAC;IACJ,CAAC;IAES,eAAe,CACxB,SAAsB,EACtB,gBAAwB;QAExB,OAAO,UAAU,CAAC,SAAS,EAAE;YAC5B,gBAAgB,EAAE,gBAAgB;SAClC,CAAC,CAAC;IACJ,CAAC;IAES,sBAAsB,CAC/B,SAAe,EACf,YAA0B,EAC1B,gBAA2B;QAE3B,SAAS,CAAC,MAAM,CACf,KAAC,aAAa,IAAC,KAAK,EAAE,YAAY,YAAG,gBAAgB,GAAiB,CACtE,CAAC;IACH,CAAC;CACD;AAED,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Languages } from "@prosopo/locale";
|
|
2
2
|
import { type ProcaptchaClientConfigOutput } from "@prosopo/types";
|
|
3
|
-
declare function createConfig(siteKey?: string, theme?: "light" | "dark", language?: (typeof Languages)[keyof typeof Languages], web2?: boolean, invisible?: boolean, userAccountAddress?: string): ProcaptchaClientConfigOutput;
|
|
3
|
+
declare function createConfig(siteKey?: string, theme?: "light" | "dark", language?: (typeof Languages)[keyof typeof Languages], web2?: boolean, invisible?: boolean, userAccountAddress?: string, ipv4?: boolean, ipv6?: boolean): ProcaptchaClientConfigOutput;
|
|
4
4
|
export { createConfig };
|
|
5
5
|
//# sourceMappingURL=configCreator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configCreator.d.ts","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,iBAAS,YAAY,CACpB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,OAAO,GAAG,MAAgB,EACjC,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,EACrD,IAAI,UAAO,EACX,SAAS,UAAQ,EACjB,kBAAkB,CAAC,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"configCreator.d.ts","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAEN,KAAK,4BAA4B,EAEjC,MAAM,gBAAgB,CAAC;AAExB,iBAAS,YAAY,CACpB,OAAO,CAAC,EAAE,MAAM,EAChB,KAAK,GAAE,OAAO,GAAG,MAAgB,EACjC,QAAQ,CAAC,EAAE,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,EACrD,IAAI,UAAO,EACX,SAAS,UAAQ,EACjB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,IAAI,UAAQ,EACZ,IAAI,UAAQ,GACV,4BAA4B,CAsB9B;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProcaptchaConfigSchema, EnvironmentTypesSchema } from "@prosopo/types";
|
|
2
|
-
function createConfig(siteKey, theme = "light", language, web2 = true, invisible = false, userAccountAddress) {
|
|
2
|
+
function createConfig(siteKey, theme = "light", language, web2 = true, invisible = false, userAccountAddress, ipv4 = false, ipv6 = false) {
|
|
3
3
|
if (!siteKey) {
|
|
4
4
|
siteKey = process.env.PROSOPO_SITE_KEY || "";
|
|
5
5
|
}
|
|
@@ -14,7 +14,9 @@ function createConfig(siteKey, theme = "light", language, web2 = true, invisible
|
|
|
14
14
|
web2,
|
|
15
15
|
mode: invisible ? "invisible" : "visible",
|
|
16
16
|
theme,
|
|
17
|
-
language
|
|
17
|
+
language,
|
|
18
|
+
ipv4,
|
|
19
|
+
ipv6
|
|
18
20
|
});
|
|
19
21
|
}
|
|
20
22
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configCreator.js","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,SAAS,YAAY,CACpB,OAAgB,EAChB,QAA0B,OAAO,EACjC,QAAqD,EACrD,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,KAAK,EACjB,kBAA2B;
|
|
1
|
+
{"version":3,"file":"configCreator.js","sourceRoot":"","sources":["../../src/util/configCreator.ts"],"names":[],"mappings":"AAeA,OAAO,EACN,sBAAsB,EAEtB,sBAAsB,GACtB,MAAM,gBAAgB,CAAC;AAExB,SAAS,YAAY,CACpB,OAAgB,EAChB,QAA0B,OAAO,EACjC,QAAqD,EACrD,IAAI,GAAG,IAAI,EACX,SAAS,GAAG,KAAK,EACjB,kBAA2B,EAC3B,IAAI,GAAG,KAAK,EACZ,IAAI,GAAG,KAAK;IAEZ,IAAI,CAAC,OAAO,EAAE,CAAC;QACd,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,gBAAgB,IAAI,EAAE,CAAC;IAC9C,CAAC;IAED,OAAO,sBAAsB,CAAC,KAAK,CAAC;QACnC,kBAAkB,EAAE,OAAO,CAAC,GAAG,CAAC,2BAA2B;YAC1D,CAAC,CAAC,sBAAsB,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC;YACvE,CAAC,CAAC,sBAAsB,CAAC,IAAI,CAAC,WAAW;QAC1C,kBAAkB,EAAE,kBAAkB,IAAI,EAAE;QAC5C,OAAO,EAAE;YACR,OAAO,EAAE,OAAO;SAChB;QACD,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,kBAAkB,IAAI,EAAE;QAC/C,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE;QACzD,IAAI;QACJ,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS;QACzC,KAAK;QACL,QAAQ;QACR,IAAI;QACJ,IAAI;KACJ,CAAC,CAAC;AACJ,CAAC;AAED,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-bundle",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.19",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -41,9 +41,9 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@prosopo/dotenv": "3.0.45",
|
|
43
43
|
"@prosopo/locale": "3.2.5",
|
|
44
|
-
"@prosopo/procaptcha-common": "2.
|
|
45
|
-
"@prosopo/procaptcha-frictionless": "2.
|
|
46
|
-
"@prosopo/types": "4.
|
|
44
|
+
"@prosopo/procaptcha-common": "2.11.0",
|
|
45
|
+
"@prosopo/procaptcha-frictionless": "2.12.0",
|
|
46
|
+
"@prosopo/types": "4.8.0",
|
|
47
47
|
"@prosopo/util": "3.3.1",
|
|
48
48
|
"@prosopo/widget-skeleton": "2.8.3",
|
|
49
49
|
"dotenv": "16.4.5",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"registry": "https://registry.npmjs.org"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@prosopo/config": "3.3.
|
|
71
|
+
"@prosopo/config": "3.3.3",
|
|
72
72
|
"@types/jsdom": "21.1.7",
|
|
73
73
|
"@types/node": "22.10.2",
|
|
74
74
|
"@types/react": "18.3.1",
|
package/src/index.ts
CHANGED
|
@@ -40,8 +40,11 @@ const implicitRender = async () => {
|
|
|
40
40
|
|
|
41
41
|
// Set siteKey from renderOptions or from the first element's data-sitekey attribute
|
|
42
42
|
if (elements.length) {
|
|
43
|
-
const
|
|
44
|
-
const
|
|
43
|
+
const firstElement = at(elements, 0);
|
|
44
|
+
const siteKey = firstElement.getAttribute("data-sitekey");
|
|
45
|
+
const web3 = firstElement.getAttribute("data-web3");
|
|
46
|
+
const ipv4 = firstElement.getAttribute("data-ipv4") === "true";
|
|
47
|
+
const ipv6 = firstElement.getAttribute("data-ipv6") === "true";
|
|
45
48
|
if (!siteKey) {
|
|
46
49
|
console.error("No site key found");
|
|
47
50
|
return;
|
|
@@ -51,6 +54,8 @@ const implicitRender = async () => {
|
|
|
51
54
|
elements,
|
|
52
55
|
{
|
|
53
56
|
siteKey: siteKey,
|
|
57
|
+
ipv4,
|
|
58
|
+
ipv6,
|
|
54
59
|
},
|
|
55
60
|
!(web3 === "true"),
|
|
56
61
|
);
|
|
@@ -67,12 +72,16 @@ const implicitRender = async () => {
|
|
|
67
72
|
for (const button of invisibleButtons) {
|
|
68
73
|
const siteKey = button.getAttribute("data-sitekey") || "";
|
|
69
74
|
const callback = button.getAttribute("data-callback") || "";
|
|
75
|
+
const ipv4 = button.getAttribute("data-ipv4") === "true";
|
|
76
|
+
const ipv6 = button.getAttribute("data-ipv6") === "true";
|
|
70
77
|
|
|
71
78
|
const root = await widgetFactory.createWidgets(
|
|
72
79
|
[button],
|
|
73
80
|
{
|
|
74
81
|
siteKey: siteKey,
|
|
75
82
|
callback: callback,
|
|
83
|
+
ipv4,
|
|
84
|
+
ipv6,
|
|
76
85
|
},
|
|
77
86
|
true,
|
|
78
87
|
true,
|
|
@@ -26,6 +26,8 @@ function createConfig(
|
|
|
26
26
|
web2 = true,
|
|
27
27
|
invisible = false,
|
|
28
28
|
userAccountAddress?: string,
|
|
29
|
+
ipv4 = false,
|
|
30
|
+
ipv6 = false,
|
|
29
31
|
): ProcaptchaClientConfigOutput {
|
|
30
32
|
if (!siteKey) {
|
|
31
33
|
siteKey = process.env.PROSOPO_SITE_KEY || "";
|
|
@@ -45,6 +47,8 @@ function createConfig(
|
|
|
45
47
|
mode: invisible ? "invisible" : "visible",
|
|
46
48
|
theme,
|
|
47
49
|
language,
|
|
50
|
+
ipv4,
|
|
51
|
+
ipv6,
|
|
48
52
|
});
|
|
49
53
|
}
|
|
50
54
|
|