@prosopo/procaptcha-frictionless 0.3.42 → 1.0.2
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.
|
@@ -122,13 +122,14 @@ const Manager = (configInput, state, onStateUpdate, callbacks) => {
|
|
|
122
122
|
isHuman: true,
|
|
123
123
|
loading: false
|
|
124
124
|
});
|
|
125
|
-
events2.onHuman({
|
|
126
|
-
providerUrl,
|
|
125
|
+
events2.onHuman(types.encodeProcaptchaOutput({
|
|
126
|
+
[types.ApiParams.providerUrl]: providerUrl,
|
|
127
127
|
[types.ApiParams.user]: getAccount().account.address,
|
|
128
128
|
[types.ApiParams.dapp]: getDappAccount(),
|
|
129
129
|
[types.ApiParams.challenge]: challenge.challenge,
|
|
130
|
-
[types.ApiParams.blockNumber]: getRandomProviderResponse.blockNumber
|
|
131
|
-
|
|
130
|
+
[types.ApiParams.blockNumber]: getRandomProviderResponse.blockNumber,
|
|
131
|
+
[types.ApiParams.nonce]: solution
|
|
132
|
+
}));
|
|
132
133
|
setValidChallengeTimeout();
|
|
133
134
|
}
|
|
134
135
|
};
|
|
@@ -37,6 +37,6 @@ const Procaptcha = (props) => {
|
|
|
37
37
|
verticalAlign: "middle"
|
|
38
38
|
}, children: jsxRuntime.jsx("div", { style: {
|
|
39
39
|
display: "flex"
|
|
40
|
-
}, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: state.loading ? jsxRuntime.jsx(webComponents.LoadingSpinner, { themeColor }) : jsxRuntime.jsx(webComponents.Checkbox, { checked: state.isHuman, onChange: manager.start, themeColor, labelText: "I am human" }) }) }) }) }) }), jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: jsxRuntime.jsx("a", { href: webComponents.WIDGET_URL, target: "_blank", "aria-label": webComponents.WIDGET_URL_TEXT, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: jsxRuntime.jsx(webComponents.Logo, { themeColor }) }) }) })] })] }) }) }) }) });
|
|
40
|
+
}, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: state.loading ? jsxRuntime.jsx(webComponents.LoadingSpinner, { themeColor, "aria-label": "Loading spinner" }) : jsxRuntime.jsx(webComponents.Checkbox, { checked: state.isHuman, onChange: manager.start, themeColor, labelText: "I am human", "aria-label": "human checkbox" }) }) }) }) }) }), jsxRuntime.jsx("div", { style: { display: "inline-flex", flexDirection: "column" }, children: jsxRuntime.jsx("a", { href: webComponents.WIDGET_URL, target: "_blank", "aria-label": webComponents.WIDGET_URL_TEXT, children: jsxRuntime.jsx("div", { style: { flex: 1 }, children: jsxRuntime.jsx(webComponents.Logo, { themeColor, "aria-label": "Prosopo logo" }) }) }) })] })] }) }) }) }) });
|
|
41
41
|
};
|
|
42
42
|
module.exports = Procaptcha;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/procaptcha-frictionless",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"sideEffects": false,
|
|
9
9
|
"engines": {
|
|
10
|
-
"node": ">=
|
|
10
|
+
"node": ">=20",
|
|
11
11
|
"npm": ">=9"
|
|
12
12
|
},
|
|
13
13
|
"exports": {
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"clean": "tsc --build --clean",
|
|
24
24
|
"build": "tsc --build --verbose tsconfig.json",
|
|
25
25
|
"build:cjs": "npx vite --config vite.cjs.config.ts build",
|
|
26
|
-
"eslint": "npx eslint . --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore --quiet",
|
|
26
|
+
"eslint": "npx eslint . --cache --cache-location ../../node_modules/.cache/eslint/.eslintcache --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore --quiet",
|
|
27
27
|
"eslint:fix": "npm run eslint -- --fix",
|
|
28
|
-
"prettier": "npx prettier . --check --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
|
|
28
|
+
"prettier": "npx prettier . --cache --cache-location ../../node_modules/.cache/prettier/.prettiercache --check --no-error-on-unmatched-pattern --ignore-path ../../.eslintignore",
|
|
29
29
|
"prettier:fix": "npm run prettier -- --write",
|
|
30
30
|
"lint": "npm run eslint && npm run prettier",
|
|
31
31
|
"lint:fix": "npm run eslint:fix && npm run prettier:fix"
|
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@fingerprintjs/botd": "^1.9.0",
|
|
38
|
-
"@prosopo/procaptcha-pow": "0.
|
|
39
|
-
"@prosopo/procaptcha-react": "0.
|
|
40
|
-
"@prosopo/types": "0.
|
|
41
|
-
"@prosopo/web-components": "0.
|
|
38
|
+
"@prosopo/procaptcha-pow": "1.0.2",
|
|
39
|
+
"@prosopo/procaptcha-react": "1.0.2",
|
|
40
|
+
"@prosopo/types": "1.0.2",
|
|
41
|
+
"@prosopo/web-components": "1.0.2",
|
|
42
42
|
"react": "^18.3.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|