diff --git a/demos/client-bundle-example/package.json b/demos/client-bundle-example/package.json index 456e25aa9d..62625244ac 100644 --- a/demos/client-bundle-example/package.json +++ b/demos/client-bundle-example/package.json @@ -13,9 +13,9 @@ "start": "vite serve ./src --port 9232 --config vite.config.ts", "clean": "echo 'nothing to clean'" }, - "version": "2.1.9", + "version": "2.1.10", "devDependencies": { - "@prosopo/dotenv": "2.1.9", + "@prosopo/dotenv": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/demos/client-example-server/package.json b/demos/client-example-server/package.json index 54ae18b0e8..9908a32221 100644 --- a/demos/client-example-server/package.json +++ b/demos/client-example-server/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/client-example-server", - "version": "2.1.9", + "version": "2.1.10", "description": "Backend for client-example", "main": "dist/app.js", "type": "module", @@ -32,12 +32,12 @@ "@noble/hashes": "1.5.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/server": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/server": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "@typegoose/auto-increment": "4.6.0", "cors": "2.8.5", "express": "4.21.0", @@ -47,7 +47,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/jsonwebtoken": "9.0.6", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/demos/client-example/package.json b/demos/client-example/package.json index 0a2e50294e..ca2bdcbf36 100644 --- a/demos/client-example/package.json +++ b/demos/client-example/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/client-example", - "version": "2.1.9", + "version": "2.1.10", "private": true, "type": "module", "engines": { @@ -13,14 +13,14 @@ "@mui/material": "5.9.1", "@polkadot/extension-dapp": "0.46.9", "@polkadot/extension-inject": "0.46.9", - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha-frictionless": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/server": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/vite-plugin-watch-workspace": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha-frictionless": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/server": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/vite-plugin-watch-workspace": "2.1.10", "@types/react-dom": "18.3.0", "@vitejs/plugin-react": "4.3.1", "react": "18.3.1", @@ -40,8 +40,8 @@ } }, "devDependencies": { - "@prosopo/config": "2.1.9", - "@prosopo/dotenv": "2.1.9", + "@prosopo/config": "2.1.10", + "@prosopo/dotenv": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/demos/cypress-shared/package.json b/demos/cypress-shared/package.json index 2c4f13d4d3..933ae680cb 100644 --- a/demos/cypress-shared/package.json +++ b/demos/cypress-shared/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/cypress-shared", - "version": "2.1.9", + "version": "2.1.10", "private": true, "type": "module", "engines": { @@ -8,14 +8,14 @@ "npm": ">=9" }, "dependencies": { - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { "@cypress/xpath": "2.0.3", - "@prosopo/common": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/types-database": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/types-database": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/demos/provider-mock/package.json b/demos/provider-mock/package.json index 556f9eb045..10d444948a 100644 --- a/demos/provider-mock/package.json +++ b/demos/provider-mock/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/provider-mock", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -16,9 +16,9 @@ "build:cjs": "echo 'no cjs build'" }, "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", "cors": "2.8.5", "express": "4.21.0" }, diff --git a/dev/config/package.json b/dev/config/package.json index f2e43209e0..4f8f6a50ae 100644 --- a/dev/config/package.json +++ b/dev/config/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/config", - "version": "2.1.9", + "version": "2.1.10", "description": "Prosopo config library", "main": "./dist/index.js", "type": "module", @@ -36,9 +36,9 @@ "@babel/plugin-transform-react-jsx": "7.25.2", "@babel/plugin-transform-runtime": "7.25.4", "@babel/preset-env": "7.25.4", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "@rollup/plugin-alias": "5.1.0", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-commonjs": "26.0.1", diff --git a/dev/flux/package.json b/dev/flux/package.json index 5b49f2ed68..d6f2321768 100644 --- a/dev/flux/package.json +++ b/dev/flux/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/flux", - "version": "2.1.9", + "version": "2.1.10", "description": "Tools for managing Flux deployment", "main": "dist/index.js", "bin": { @@ -24,10 +24,10 @@ "@noble/curves": "1.6.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/util": "2.1.10", "openpgp": "5.11.2", "qs": "6.13.0", "socket.io-client": "4.7.5", diff --git a/dev/gh-actions/package.json b/dev/gh-actions/package.json index 48fb0dea8f..ad41c7f711 100644 --- a/dev/gh-actions/package.json +++ b/dev/gh-actions/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/gh-actions", - "version": "2.1.9", + "version": "2.1.10", "description": "", "private": true, "scripts": { diff --git a/dev/lint/package.json b/dev/lint/package.json index 5be98d2124..0525f2bc56 100644 --- a/dev/lint/package.json +++ b/dev/lint/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/lint", - "version": "2.1.9", + "version": "2.1.10", "description": "", "private": true, "scripts": { @@ -37,7 +37,7 @@ "npm": ">=9" }, "dependencies": { - "@prosopo/util": "2.1.9", + "@prosopo/util": "2.1.10", "fast-glob": "3.3.2", "zod": "3.23.8" } diff --git a/dev/prosoponator-bot/package.json b/dev/prosoponator-bot/package.json index f71adb41c6..b72321cbd7 100644 --- a/dev/prosoponator-bot/package.json +++ b/dev/prosoponator-bot/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/prosoponator-bot", - "version": "2.1.9", + "version": "2.1.10", "description": "", "private": true, "scripts": { diff --git a/dev/scripts/env.development b/dev/scripts/env.development index 45f3f01f94..7af01f12ca 100644 --- a/dev/scripts/env.development +++ b/dev/scripts/env.development @@ -18,7 +18,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=development PROSOPO_LOG_LEVEL=debug PROSOPO_MONGO_CAPTCHA_URI= PROSOPO_MONGO_EVENTS_URI=mongodb+srv:///frictionless_events -PROSOPO_PACKAGE_VERSION=2.1.9 +PROSOPO_PACKAGE_VERSION=2.1.10 PROSOPO_PROVIDER_ACCOUNT_PASSWORD= PROSOPO_PROVIDER_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV PROSOPO_PROVIDER_JSON= diff --git a/dev/scripts/env.production b/dev/scripts/env.production index 72ab501a40..fb8957a55e 100644 --- a/dev/scripts/env.production +++ b/dev/scripts/env.production @@ -16,7 +16,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=production PROSOPO_LOG_LEVEL=info PROSOPO_MONGO_CAPTCHA_URI= PROSOPO_MONGO_EVENTS_URI=mongodb+srv:///frictionless_events -PROSOPO_PACKAGE_VERSION=2.1.9 +PROSOPO_PACKAGE_VERSION=2.1.10 PROSOPO_PROVIDER_ACCOUNT_PASSWORD= PROSOPO_PROVIDER_ADDRESS= PROSOPO_PROVIDER_JSON= diff --git a/dev/scripts/env.staging b/dev/scripts/env.staging index 3ca37919b6..f64c081e1c 100644 --- a/dev/scripts/env.staging +++ b/dev/scripts/env.staging @@ -21,7 +21,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=staging PROSOPO_LOG_LEVEL=info PROSOPO_MONGO_CAPTCHA_URI= PROSOPO_MONGO_EVENTS_URI=mongodb+srv:///frictionless_events -PROSOPO_PACKAGE_VERSION=2.1.9 +PROSOPO_PACKAGE_VERSION=2.1.10 PROSOPO_PROVIDER_ACCOUNT_PASSWORD= PROSOPO_PROVIDER_ADDRESS= PROSOPO_PROVIDER_JSON= diff --git a/dev/scripts/env.test b/dev/scripts/env.test index 334a047feb..043b737a5b 100644 --- a/dev/scripts/env.test +++ b/dev/scripts/env.test @@ -21,7 +21,7 @@ PROSOPO_DEFAULT_ENVIRONMENT=development PROSOPO_LOG_LEVEL=info PROSOPO_MONGO_CAPTCHA_URI=mongodb://root:root@localhost:27017/captchastorage?authSource=admin PROSOPO_MONGO_EVENTS_URI=mongodb+srv:///frictionless_events -PROSOPO_PACKAGE_VERSION=2.1.9 +PROSOPO_PACKAGE_VERSION=2.1.10 PROSOPO_PROVIDER_ACCOUNT_PASSWORD= PROSOPO_PROVIDER_ADDRESS=5EjTA28bKSbFPPyMbUjNtArxyqjwq38r1BapVmLZShaqEedV PROSOPO_PROVIDER_JSON= diff --git a/dev/scripts/package.json b/dev/scripts/package.json index 5d7824d8c3..d519623a30 100644 --- a/dev/scripts/package.json +++ b/dev/scripts/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/scripts", - "version": "2.1.9", + "version": "2.1.10", "description": "Dev scripts for working with prosopo packages", "main": "dist/index.js", "type": "module", @@ -26,18 +26,18 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/cli": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/cli": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10", "dotenv": "16.4.5", "fast-glob": "3.3.2", "fs-extra": "11.2.0", diff --git a/dev/ts-brand/package.json b/dev/ts-brand/package.json index cfb89cfc7d..21677bab6b 100644 --- a/dev/ts-brand/package.json +++ b/dev/ts-brand/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/ts-brand", - "version": "2.1.9", + "version": "2.1.10", "description": "Brand your TypeScript types", "main": "./dist/index.js", "type": "module", @@ -24,7 +24,7 @@ "author": "Prosopo Limited", "license": "Apache-2.0", "dependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5" }, "devDependencies": { diff --git a/dev/vite-plugin-watch-workspace/package.json b/dev/vite-plugin-watch-workspace/package.json index 3b208f094d..3fda96f865 100644 --- a/dev/vite-plugin-watch-workspace/package.json +++ b/dev/vite-plugin-watch-workspace/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/vite-plugin-watch-workspace", - "version": "2.1.9", + "version": "2.1.10", "description": "Vite plugin for watching and rebuilding external files", "main": "./dist/index.js", "type": "module", @@ -23,7 +23,7 @@ "author": "Prosopo Limited", "license": "Apache-2.0", "dependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "debug": "4.3.7", "esbuild": "0.23.1", "fast-glob": "3.3.2" diff --git a/docker/images/provider/package.json b/docker/images/provider/package.json index 2b50a2d5b7..534dbb3b37 100644 --- a/docker/images/provider/package.json +++ b/docker/images/provider/package.json @@ -5,5 +5,5 @@ "node": ">=20", "npm": ">=9" }, - "version": "2.1.9" + "version": "2.1.10" } diff --git a/docker/local.Caddyfile b/docker/local.Caddyfile new file mode 100644 index 0000000000..cfe8c744a9 --- /dev/null +++ b/docker/local.Caddyfile @@ -0,0 +1,95 @@ +# usage: `caddy run --config ./docker/provider.Caddyfile --envfile docker/env.development` +{ + http_port 4000 + auto_https disable_redirects + admin :2020 + servers { + timeouts { + read_body 10s + read_header 10s + write 10s + idle 2m + } + + max_header_size 1MB + } +} + +local.prosopo.io:4001 { + reverse_proxy localhost:9229 { + + header_up x-tls-version "{tls_version}" + header_up x-tls-version "^{tls_version}$" "" + + header_up x-tls-client-subject "{tls_client_subject}" + header_up x-tls-client-subject "^{tls_client_subject}$" "" + + header_up x-tls-client-serial "{tls_client_serial}" + header_up x-tls-client-serial "^{tls_client_serial}$" "" + + header_up x-tls-client-issuer "{tls_client_issuer}" + header_up x-tls-client-issuer "^{tls_client_issuer}$" "" + + header_up x-tls-client-fingerprint "{tls_client_fingerprint}" + header_up x-tls-client-fingerprint "^{tls_client_fingerprint}$" "" + + header_up x-tls-client-certificate-pem "{tls_client_certificate_pem}" + header_up x-tls-client-certificate-pem "^{tls_client_certificate_pem}$" "" + + header_up x-tls-client-certificate-der-base64 "{tls_client_certificate_der_base64}" + header_up x-tls-client-certificate-der-base64 "^{tls_client_certificate_der_base64}$" "" + + header_up x-tls-cipher "{tls_cipher}" + header_up x-tls-cipher "^{tls_cipher}$" "" + + header_up x-remote-port "{remote_port}" + header_up x-remote-port "^{remote_port}$" "" + + header_up x-remote-host "{remote_host}" + header_up x-remote-host "^{remote_host}$" "" + + header_up x-method "{method}" + header_up x-method "^{method}$" "" + + header_up x-client-ip "{client_ip}" + header_up x-client-ip "^{client_ip}$" "" + + header_up x-duration-ms {http.request.duration} + header_up x-duration-ms "^{http.request.duration}$" "" + + header_up x-tls-resumed "{http.request.tls.resumed}" + header_up x-tls-resumed "^{http.request.tls.resumed}$" "" + + header_up x-tls-proto "{http.request.tls.proto}" + header_up x-tls-proto "^{http.request.tls.proto}$" "" + + header_up x-tls-proto-mutual "{http.request.tls.proto_mutual}" + header_up x-tls-proto-mutual "^{http.request.tls.proto_mutual}$" "" + + header_up x-tls-server-name "{http.request.tls.server_name}" + header_up x-tls-server-name "^{http.request.tls.server_name}$" "" + + header_up x-tls-public-key "{http.request.tls.public_key}" + header_up x-tls-public-key "^{http.request.tls.public_key}$" "" + + header_up x-tls-public-key-sha256 "{http.request.tls.public_key_sha256}" + header_up x-tls-public-key-sha256 "^{http.request.tls.public_key_sha256}$" "" + + header_up x-tls-client-san-dns-names "{http.request.tls.client.san.dns_names}" + header_up x-tls-client-san-dns-names "^{http.request.tls.client.san.dns_names}$" "" + + header_up x-tls-client-san-emails "{http.request.tls.client.san.emails}" + header_up x-tls-client-san-emails "^{http.request.tls.client.san.emails}$" "" + + header_up x-tls-client-san-ips "{http.request.tls.client.san.ips}" + header_up x-tls-client-san-ips "^{http.request.tls.client.san.ips}$" "" + + header_up x-tls-client-san-uris "{http.request.tls.client.san.uris}" + header_up x-tls-client-san-uris "^{http.request.tls.client.san.uris}$" "" + } + + log { + format json + } + +} diff --git a/docker/provider.Caddyfile b/docker/provider.Caddyfile index 7871838148..83a0702f3d 100644 --- a/docker/provider.Caddyfile +++ b/docker/provider.Caddyfile @@ -3,6 +3,15 @@ http_port {$CADDY_HTTP_PORT:80} auto_https {$CADDY_AUTO_HTTPS:disable_redirects} admin {$CADDY_ADMIN_API::2020} # set the admin api to run on localhost:2020 (default is 2019 which can conflict with caddy daemon) + + servers { + timeouts { + read_body 15s + read_header 10s + write 15s + idle 5m + } + } } {$CADDY_DOMAIN} { @@ -17,39 +26,80 @@ # reverse proxy to the provider container reverse_proxy {$CADDY_PROVIDER_CONTAINER_NAME:provider}:{$CADDY_PROVIDER_PORT:9229} { - header_up X-TLS-Version "{tls_version:-none}" - header_up X-TLS-Cipher "{tls_cipher:-none}" - header_up X-TLS-Client-SNI "{tls_client_sni:-none}" - header_up X-TLS-Client-Verified "{tls_client_verified:-none}" - header_up X-TLS-Client-Cert-Subject "{tls_client_subject:-none}" - header_up X-TLS-Client-Cert-Issuer "{tls_client_issuer:-none}" - header_up X-TLS-Client-Cert-Serial "{tls_client_serial:-none}" - header_up X-TLS-Client-Cert-Fingerprint "{tls_client_fingerprint:-none}" - header_up X-Request-Start-Time "{start_time:-none}" - header_up X-Request-ID "{request_id:-none}" - header_up X-Scheme "{scheme:-none}" - header_up X-Remote-Address "{remote:-none}" - header_up X-Remote-IP "{remote_host:-none}" - header_up X-Remote-Port "{remote_port:-none}" - header_up X-Server-IP "{server_ip:-none}" - header_up X-Server-Port "{server_port:-none}" - header_up X-Elapsed-Time "{elapsed:-none}" - header_up X-Request-Protocol "{proto:-none}" - header_up X-Client-IP "{client_ip:-none}" - header_up X-Host "{host:-none}" - header_up X-HostPort "{hostport:-none}" - header_up X-tls_client_certificate_der_base64 "{tls_client_certificate_der_base64:-none}" - header_up X-tls_client_certificate_pem "{tls_client_certificate_pem:-none}" - header_up X-upstream_hostport "{upstream_hostport:-none}" - header_up X-http.request.uuid "{http.request.uuid:-none}" - header_up X-http.request.tls.resumed "{http.request.tls.resumed:-none}" - header_up X-http.request.tls.proto_mutual "{http.request.tls.proto_mutual:-none}" - header_up X-http.request.tls.client.fingerprint "{http.request.tls.client.fingerprint:-none}" - header_up X-http.request.tls.client.public_key "{http.request.tls.client.public_key:-none}" + # https://caddyserver.com/docs/caddyfile/concepts#placeholders + # https://caddyserver.com/docs/json/apps/http/#docs + + header_up x-tls-version "{tls_version}" + header_up x-tls-version "^{tls_version}$" "" + + header_up x-tls-client-subject "{tls_client_subject}" + header_up x-tls-client-subject "^{tls_client_subject}$" "" + + header_up x-tls-client-serial "{tls_client_serial}" + header_up x-tls-client-serial "^{tls_client_serial}$" "" + + header_up x-tls-client-issuer "{tls_client_issuer}" + header_up x-tls-client-issuer "^{tls_client_issuer}$" "" + + header_up x-tls-client-fingerprint "{tls_client_fingerprint}" + header_up x-tls-client-fingerprint "^{tls_client_fingerprint}$" "" + + header_up x-tls-client-certificate-pem "{tls_client_certificate_pem}" + header_up x-tls-client-certificate-pem "^{tls_client_certificate_pem}$" "" + + header_up x-tls-client-certificate-der-base64 "{tls_client_certificate_der_base64}" + header_up x-tls-client-certificate-der-base64 "^{tls_client_certificate_der_base64}$" "" + + header_up x-tls-cipher "{tls_cipher}" + header_up x-tls-cipher "^{tls_cipher}$" "" + + header_up x-remote-port "{remote_port}" + header_up x-remote-port "^{remote_port}$" "" + + header_up x-remote-host "{remote_host}" + header_up x-remote-host "^{remote_host}$" "" + + header_up x-method "{method}" + header_up x-method "^{method}$" "" + + header_up x-client-ip "{client_ip}" + header_up x-client-ip "^{client_ip}$" "" + + header_up x-duration-ms {http.request.duration} + header_up x-duration-ms "^{http.request.duration}$" "" + + header_up x-tls-resumed "{http.request.tls.resumed}" + header_up x-tls-resumed "^{http.request.tls.resumed}$" "" + + header_up x-tls-proto "{http.request.tls.proto}" + header_up x-tls-proto "^{http.request.tls.proto}$" "" + + header_up x-tls-proto-mutual "{http.request.tls.proto_mutual}" + header_up x-tls-proto-mutual "^{http.request.tls.proto_mutual}$" "" + + header_up x-tls-server-name "{http.request.tls.server_name}" + header_up x-tls-server-name "^{http.request.tls.server_name}$" "" + + header_up x-tls-public-key "{http.request.tls.public_key}" + header_up x-tls-public-key "^{http.request.tls.public_key}$" "" + + header_up x-tls-public-key-sha256 "{http.request.tls.public_key_sha256}" + header_up x-tls-public-key-sha256 "^{http.request.tls.public_key_sha256}$" "" + + header_up x-tls-client-san-dns-names "{http.request.tls.client.san.dns_names}" + header_up x-tls-client-san-dns-names "^{http.request.tls.client.san.dns_names}$" "" + + header_up x-tls-client-san-emails "{http.request.tls.client.san.emails}" + header_up x-tls-client-san-emails "^{http.request.tls.client.san.emails}$" "" + + header_up x-tls-client-san-ips "{http.request.tls.client.san.ips}" + header_up x-tls-client-san-ips "^{http.request.tls.client.san.ips}$" "" + + header_up x-tls-client-san-uris "{http.request.tls.client.san.uris}" + header_up x-tls-client-san-uris "^{http.request.tls.client.san.uris}$" "" } - # logs. Note this is not limited, truncated or rotated whatsoever, so it grows over time! log { - output file /var/log/caddy/{$CADDY_DOMAIN}.log + format json } } diff --git a/package-lock.json b/package-lock.json index 974d9ec2d4..d48f9a6128 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@prosopo/captcha", - "version": "2.1.9", + "version": "2.1.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@prosopo/captcha", - "version": "2.1.9", + "version": "2.1.10", "hasInstallScript": true, "license": "Apache-2.0", "workspaces": [ @@ -40,9 +40,9 @@ }, "demos/client-bundle-example": { "name": "@prosopo/client-bundle-example", - "version": "2.1.9", + "version": "2.1.10", "devDependencies": { - "@prosopo/dotenv": "2.1.9", + "@prosopo/dotenv": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -61,21 +61,21 @@ }, "demos/client-example": { "name": "@prosopo/client-example", - "version": "2.1.9", + "version": "2.1.10", "dependencies": { "@emotion/react": "11.13.3", "@emotion/styled": "11.13.0", "@mui/material": "5.9.1", "@polkadot/extension-dapp": "0.46.9", "@polkadot/extension-inject": "0.46.9", - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha-frictionless": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/server": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/vite-plugin-watch-workspace": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha-frictionless": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/server": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/vite-plugin-watch-workspace": "2.1.10", "@types/react-dom": "18.3.0", "@vitejs/plugin-react": "4.3.1", "react": "18.3.1", @@ -83,8 +83,8 @@ "react-router-dom": "6.26.2" }, "devDependencies": { - "@prosopo/config": "2.1.9", - "@prosopo/dotenv": "2.1.9", + "@prosopo/config": "2.1.10", + "@prosopo/dotenv": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -103,18 +103,18 @@ }, "demos/client-example-server": { "name": "@prosopo/client-example-server", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@noble/hashes": "1.5.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/server": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/server": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "@typegoose/auto-increment": "4.6.0", "cors": "2.8.5", "express": "4.21.0", @@ -124,7 +124,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/jsonwebtoken": "9.0.6", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -143,16 +143,16 @@ }, "demos/cypress-shared": { "name": "@prosopo/cypress-shared", - "version": "2.1.9", + "version": "2.1.10", "dependencies": { - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { "@cypress/xpath": "2.0.3", - "@prosopo/common": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/types-database": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/types-database": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -174,12 +174,12 @@ }, "demos/provider-mock": { "name": "@prosopo/provider-mock", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", "cors": "2.8.5", "express": "4.21.0" }, @@ -201,7 +201,7 @@ }, "dev/config": { "name": "@prosopo/config", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@babel/core": "7.25.2", @@ -209,9 +209,9 @@ "@babel/plugin-transform-react-jsx": "7.25.2", "@babel/plugin-transform-runtime": "7.25.4", "@babel/preset-env": "7.25.4", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "@rollup/plugin-alias": "5.1.0", "@rollup/plugin-babel": "6.0.4", "@rollup/plugin-commonjs": "26.0.1", @@ -267,16 +267,16 @@ }, "dev/flux": { "name": "@prosopo/flux", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@noble/curves": "1.6.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/util": "2.1.10", "openpgp": "5.11.2", "qs": "6.13.0", "socket.io-client": "4.7.5", @@ -305,7 +305,7 @@ }, "dev/gh-actions": { "name": "@prosopo/gh-actions", - "version": "2.1.9", + "version": "2.1.10", "license": "ISC", "dependencies": { "@octokit/graphql": "8.1.1", @@ -381,10 +381,10 @@ }, "dev/lint": { "name": "@prosopo/lint", - "version": "2.1.9", + "version": "2.1.10", "license": "ISC", "dependencies": { - "@prosopo/util": "2.1.9", + "@prosopo/util": "2.1.10", "fast-glob": "3.3.2", "zod": "3.23.8" }, @@ -407,7 +407,7 @@ }, "dev/prosoponator-bot": { "name": "@prosopo/prosoponator-bot", - "version": "2.1.9", + "version": "2.1.10", "license": "ISC", "dependencies": { "@actions/core": "1.10.1", @@ -439,7 +439,7 @@ }, "dev/scripts": { "name": "@prosopo/scripts", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@iarna/toml": "2.2.5", @@ -448,18 +448,18 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/cli": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/cli": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10", "dotenv": "16.4.5", "fast-glob": "3.3.2", "fs-extra": "11.2.0", @@ -513,10 +513,10 @@ }, "dev/ts-brand": { "name": "@prosopo/ts-brand", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5" }, "devDependencies": { @@ -537,10 +537,10 @@ }, "dev/vite-plugin-watch-workspace": { "name": "@prosopo/vite-plugin-watch-workspace", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "debug": "4.3.7", "esbuild": "0.23.1", "fast-glob": "3.3.2" @@ -21025,7 +21025,7 @@ }, "packages/account": { "name": "@prosopo/account", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/extension-base": "0.46.9", @@ -21034,14 +21034,14 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/fingerprint": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/fingerprint": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21059,13 +21059,13 @@ }, "packages/api": { "name": "@prosopo/api", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/types": "2.1.9" + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21083,21 +21083,21 @@ }, "packages/cli": { "name": "@prosopo/cli", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/keyring": "12.6.2", "@polkadot/types-codec": "10.13.1", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/locale": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/locale": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "cors": "2.8.5", "cron-parser": "4.9.0", "dotenv": "16.4.5", @@ -21106,7 +21106,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/cors": "2.8.17", "@types/yargs": "17.0.33", "@vitest/coverage-v8": "2.1.1", @@ -21127,16 +21127,16 @@ }, "packages/common": { "name": "@prosopo/common", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/util-crypto": "12.6.2", - "@prosopo/locale": "2.1.9", + "@prosopo/locale": "2.1.10", "consola": "3.2.3", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21155,7 +21155,7 @@ }, "packages/contract": { "name": "@prosopo/contract", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "10.13.1", @@ -21165,15 +21165,15 @@ "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/tx": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/tx": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "rxjs": "7.8.1" }, "devDependencies": { "@polkadot/api-augment": "10.13.1", - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21219,13 +21219,13 @@ }, "packages/database": { "name": "@prosopo/database", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", "mongodb": "6.9.0", "mongodb-memory-server": "10.0.0", "mongoose": "8.6.2" @@ -21248,16 +21248,16 @@ }, "packages/datasets": { "name": "@prosopo/datasets", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21276,15 +21276,15 @@ }, "packages/datasets-fs": { "name": "@prosopo/datasets-fs", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@noble/hashes": "1.5.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "bcrypt": "5.1.1", "cli-progress": "3.12.0", "sharp": "0.33.5", @@ -21292,7 +21292,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/bcrypt": "5.0.2", "@types/cli-progress": "3.11.6", "@vitest/coverage-v8": "2.1.1", @@ -21313,7 +21313,7 @@ }, "packages/detector": { "name": "@prosopo/detector", - "version": "2.1.9", + "version": "2.1.10", "devDependencies": { "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -21332,11 +21332,11 @@ }, "packages/dotenv": { "name": "@prosopo/dotenv", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5" }, "devDependencies": { @@ -21357,21 +21357,21 @@ }, "packages/env": { "name": "@prosopo/env", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/database": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/database": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21389,17 +21389,17 @@ }, "packages/file-server": { "name": "@prosopo/file-server", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/util": "2.1.9", + "@prosopo/util": "2.1.10", "dotenv": "16.4.5", "express": "4.21.0", "node-fetch": "3.3.2", "sharp": "0.33.5" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/express": "4.17.21", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", @@ -21437,7 +21437,7 @@ }, "packages/fingerprint": { "name": "@prosopo/fingerprint", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@fingerprintjs/fingerprintjs": "3.4.2" @@ -21518,12 +21518,12 @@ }, "packages/load-balancer": { "name": "@prosopo/load-balancer", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { "@vitest/coverage-v8": "2.1.1", @@ -21543,7 +21543,7 @@ }, "packages/locale": { "name": "@prosopo/locale", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "i18next": "21.9.2", @@ -21552,7 +21552,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "del-cli": "6.0.0", "dotenv": "16.4.5", @@ -21570,16 +21570,16 @@ }, "packages/locale-browser": { "name": "@prosopo/locale-browser", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/locale": "2.1.9", + "@prosopo/locale": "2.1.10", "i18next-browser-languagedetector": "7.2.1", "react-i18next": "11.18.6", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "del-cli": "6.0.0", "dotenv": "16.4.5", @@ -21597,25 +21597,25 @@ }, "packages/procaptcha": { "name": "@prosopo/procaptcha", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "10.13.1", "@polkadot/api-contract": "10.13.1", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/account": "2.1.9", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/load-balancer": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/account": "2.1.10", + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/load-balancer": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "jsdom": "25.0.0" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21634,21 +21634,21 @@ }, "packages/procaptcha-bundle": { "name": "@prosopo/procaptcha-bundle", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/dotenv": "2.1.9", - "@prosopo/locale": "2.1.9", - "@prosopo/procaptcha-frictionless": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/dotenv": "2.1.10", + "@prosopo/locale": "2.1.10", + "@prosopo/procaptcha-frictionless": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "react": "18.3.1", "react-dom": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/jsdom": "21.1.7", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -21667,16 +21667,16 @@ }, "packages/procaptcha-common": { "name": "@prosopo/procaptcha-common", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/load-balancer": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/load-balancer": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21694,19 +21694,19 @@ }, "packages/procaptcha-frictionless": { "name": "@prosopo/procaptcha-frictionless", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/detector": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/detector": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/web-components": "2.1.10", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21724,23 +21724,23 @@ }, "packages/procaptcha-pow": { "name": "@prosopo/procaptcha-pow", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/util": "12.6.2", - "@prosopo/account": "2.1.9", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/account": "2.1.10", + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", + "@prosopo/web-components": "2.1.10", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21758,21 +21758,21 @@ }, "packages/procaptcha-react": { "name": "@prosopo/procaptcha-react", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", + "@prosopo/web-components": "2.1.10", "csstype": "3.1.3", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21818,23 +21818,23 @@ }, "packages/provider": { "name": "@prosopo/provider", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@noble/hashes": "1.5.0", "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/database": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/database": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10", "cron": "3.1.7", "express": "4.21.0", "ip-address": "10.0.1", @@ -21892,18 +21892,18 @@ }, "packages/server": { "name": "@prosopo/server", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21921,7 +21921,7 @@ }, "packages/tx": { "name": "@prosopo/tx", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "10.13.1", @@ -21931,11 +21931,11 @@ "@polkadot/types": "10.13.1", "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -21981,7 +21981,7 @@ }, "packages/types": { "name": "@prosopo/types", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/api": "10.13.1", @@ -21991,14 +21991,14 @@ "@polkadot/types": "10.13.1", "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/locale": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale": "2.1.10", "ip-address": "10.0.1", "scale-ts": "1.6.0", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", @@ -22017,17 +22017,17 @@ }, "packages/types-database": { "name": "@prosopo/types-database", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", "mongodb": "6.9.0", "mongoose": "8.6.2", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -22045,16 +22045,16 @@ }, "packages/types-env": { "name": "@prosopo/types-env", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@polkadot/keyring": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", @@ -22100,11 +22100,11 @@ }, "packages/util": { "name": "@prosopo/util", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@noble/hashes": "1.5.0", - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5", "lodash": "4.17.21", "seedrandom": "3.0.5" @@ -22134,7 +22134,7 @@ }, "packages/web-components": { "name": "@prosopo/web-components", - "version": "2.1.9", + "version": "2.1.10", "license": "Apache-2.0", "dependencies": { "@emotion/react": "11.13.3", @@ -22142,7 +22142,7 @@ "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "del-cli": "6.0.0", diff --git a/package.json b/package.json index 0e19af8472..627a4dc272 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/captcha", - "version": "2.1.9", + "version": "2.1.10", "author": "Prosopo", "type": "module", "repository": { diff --git a/packages/account/package.json b/packages/account/package.json index ca0e55ad5a..66b497df80 100644 --- a/packages/account/package.json +++ b/packages/account/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/account", - "version": "2.1.9", + "version": "2.1.10", "description": "Services and Utils for Prosopo account gen and management", "main": "dist/index.js", "type": "module", @@ -37,14 +37,14 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/fingerprint": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/fingerprint": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/api/package.json b/packages/api/package.json index e8e8dff0e4..5cbedddd97 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/api", - "version": "2.1.9", + "version": "2.1.10", "description": "Wrapper for the provider API", "main": "dist/index.js", "type": "module", @@ -31,10 +31,10 @@ }, "homepage": "https://github.com/prosopo/captcha#readme", "dependencies": { - "@prosopo/types": "2.1.9" + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/api/src/api/HttpClientBase.ts b/packages/api/src/api/HttpClientBase.ts index 57031dc52c..49dafcccc0 100644 --- a/packages/api/src/api/HttpClientBase.ts +++ b/packages/api/src/api/HttpClientBase.ts @@ -50,8 +50,8 @@ export class HttpClientBase { const response = await fetch(this.baseURL + input, { method: "POST", body: JSON.stringify(body), - headers, ...init, + headers, }); if ( !response.ok && diff --git a/packages/api/src/api/ProviderApi.ts b/packages/api/src/api/ProviderApi.ts index 9fd6800f03..196081a6ea 100644 --- a/packages/api/src/api/ProviderApi.ts +++ b/packages/api/src/api/ProviderApi.ts @@ -61,7 +61,12 @@ export default class ProviderApi const url: TGetImageCaptchaChallengePathAndParams = `${ApiPaths.GetImageCaptchaChallenge}/${ provider.datasetId }/${userAccount}/${dappAccount}`; - return this.fetch(url); + return this.fetch(url, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": userAccount, + }, + }); } public submitCaptchaSolution( @@ -87,12 +92,18 @@ export default class ProviderApi }, }, }; - return this.post(ApiPaths.SubmitImageCaptchaSolution, body); + return this.post(ApiPaths.SubmitImageCaptchaSolution, body, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": userAccount, + }, + }); } public verifyDappUser( token: ProcaptchaToken, signature: string, + userAccount: string, maxVerifiedTime?: number, ): Promise { const payload: VerifySolutionBodyTypeInput = { @@ -103,7 +114,12 @@ export default class ProviderApi payload[ApiParams.maxVerifiedTime] = maxVerifiedTime; } - return this.post(ApiPaths.VerifyImageCaptchaSolutionDapp, payload); + return this.post(ApiPaths.VerifyImageCaptchaSolutionDapp, payload, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": userAccount, + }, + }); } public getPowCaptchaChallenge( @@ -116,7 +132,12 @@ export default class ProviderApi [ApiParams.dapp]: dapp.toString(), ...(sessionId && { [ApiParams.sessionId]: sessionId }), }; - return this.post(ApiPaths.GetPowCaptchaChallenge, body); + return this.post(ApiPaths.GetPowCaptchaChallenge, body, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": user, + }, + }); } public submitPowCaptchaSolution( @@ -143,7 +164,12 @@ export default class ProviderApi }, }, }); - return this.post(ApiPaths.SubmitPowCaptchaSolution, body); + return this.post(ApiPaths.SubmitPowCaptchaSolution, body, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": userAccount, + }, + }); } public getFrictionlessCaptcha( @@ -156,22 +182,43 @@ export default class ProviderApi [ApiParams.dapp]: dapp, [ApiParams.user]: user, }; - return this.post(ApiPaths.GetFrictionlessCaptchaChallenge, body); + return this.post(ApiPaths.GetFrictionlessCaptchaChallenge, body, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": user, + }, + }); } public submitUserEvents( events: StoredEvents, string: string, ): Promise { - return this.post(ApiPaths.SubmitUserEvents, { events, string }); + return this.post( + ApiPaths.SubmitUserEvents, + { events, string }, + { + headers: { + "Prosopo-Site-Key": this.account, + }, + }, + ); } public getProviderStatus(): Promise { - return this.fetch(ApiPaths.GetProviderStatus); + return this.fetch(ApiPaths.GetProviderStatus, { + headers: { + "Prosopo-Site-Key": this.account, + }, + }); } public getProviderDetails(): Promise { - return this.fetch(ApiPaths.GetProviderDetails); + return this.fetch(ApiPaths.GetProviderDetails, { + headers: { + "Prosopo-Site-Key": this.account, + }, + }); } public updateProviderClients(): Promise { @@ -182,12 +229,18 @@ export default class ProviderApi token: string, signatureHex: string, recencyLimit: number, + user: string, ): Promise { const body: ServerPowCaptchaVerifyRequestBodyType = { [ApiParams.token]: token, [ApiParams.dappSignature]: signatureHex, [ApiParams.verifiedTimeout]: recencyLimit, }; - return this.post(ApiPaths.VerifyPowCaptchaSolution, body); + return this.post(ApiPaths.VerifyPowCaptchaSolution, body, { + headers: { + "Prosopo-Site-Key": this.account, + "Prosopo-User": user, + }, + }); } } diff --git a/packages/cli/package.json b/packages/cli/package.json index 8ec9220c79..13c96cf87c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/cli", - "version": "2.1.9", + "version": "2.1.10", "description": "CLI for Prosopo Provider", "main": "dist/index.js", "type": "module", @@ -29,15 +29,15 @@ "@polkadot/keyring": "12.6.2", "@polkadot/types-codec": "10.13.1", "@polkadot/util-crypto": "12.6.2", - "@prosopo/config": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/dotenv": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/locale": "2.1.9", - "@prosopo/provider": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/config": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/dotenv": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/locale": "2.1.10", + "@prosopo/provider": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "cors": "2.8.5", "cron-parser": "4.9.0", "dotenv": "16.4.5", @@ -46,7 +46,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/cors": "2.8.17", "@types/yargs": "17.0.33", "@vitest/coverage-v8": "2.1.1", diff --git a/packages/common/package.json b/packages/common/package.json index fe9414a2c4..33ef383b28 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/common", - "version": "2.1.9", + "version": "2.1.10", "description": "Prosopo common library", "main": "./dist/index.js", "type": "module", @@ -25,12 +25,12 @@ "license": "Apache-2.0", "dependencies": { "@polkadot/util-crypto": "12.6.2", - "@prosopo/locale": "2.1.9", + "@prosopo/locale": "2.1.10", "consola": "3.2.3", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "dotenv": "16.4.5", diff --git a/packages/contract/package.json b/packages/contract/package.json index 5bf579f9bc..caa320b905 100644 --- a/packages/contract/package.json +++ b/packages/contract/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/contract", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "scripts": { @@ -43,15 +43,15 @@ "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/tx": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/tx": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "rxjs": "7.8.1" }, "devDependencies": { "@polkadot/api-augment": "10.13.1", - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/database/package.json b/packages/database/package.json index 726810759d..91dc1ec552 100644 --- a/packages/database/package.json +++ b/packages/database/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/database", - "version": "2.1.9", + "version": "2.1.10", "description": "Prosopo database plugins for provider", "main": "dist/index.js", "type": "module", @@ -31,10 +31,10 @@ }, "homepage": "https://github.com/prosopo/captcha#readme", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", "mongodb": "6.9.0", "mongodb-memory-server": "10.0.0", "mongoose": "8.6.2" diff --git a/packages/datasets-fs/package.json b/packages/datasets-fs/package.json index 123285b9fc..baa265563a 100644 --- a/packages/datasets-fs/package.json +++ b/packages/datasets-fs/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/datasets-fs", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "private": false, @@ -28,9 +28,9 @@ "@noble/hashes": "1.5.0", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "bcrypt": "5.1.1", "cli-progress": "3.12.0", "sharp": "0.33.5", @@ -38,7 +38,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/bcrypt": "5.0.2", "@types/cli-progress": "3.11.6", "@vitest/coverage-v8": "2.1.1", diff --git a/packages/datasets/package.json b/packages/datasets/package.json index 2d0fa50160..2545db578a 100644 --- a/packages/datasets/package.json +++ b/packages/datasets/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/datasets", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "private": false, @@ -38,12 +38,12 @@ }, "dependencies": { "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "dotenv": "16.4.5", diff --git a/packages/detector/package.json b/packages/detector/package.json index 6cd8605334..058599b09e 100644 --- a/packages/detector/package.json +++ b/packages/detector/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/detector", - "version": "2.1.9", + "version": "2.1.10", "main": "src/index.js", "engines": { "node": ">=20", diff --git a/packages/dotenv/package.json b/packages/dotenv/package.json index 59f8b11f0b..a5f1ef6ed9 100644 --- a/packages/dotenv/package.json +++ b/packages/dotenv/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/dotenv", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "private": false, @@ -25,8 +25,8 @@ }, "types": "./dist/index.d.ts", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5" }, "devDependencies": { diff --git a/packages/env/package.json b/packages/env/package.json index d845716257..69bd67d6fb 100644 --- a/packages/env/package.json +++ b/packages/env/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/env", - "version": "2.1.9", + "version": "2.1.10", "description": "Path env prosopo environment", "main": "dist/index.js", "type": "module", @@ -24,18 +24,18 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/database": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/database": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10" }, "overrides": { "@polkadot/keyring": "12.6.2" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/file-server/package.json b/packages/file-server/package.json index a69707f913..4a37339bdc 100644 --- a/packages/file-server/package.json +++ b/packages/file-server/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/file-server", - "version": "2.1.9", + "version": "2.1.10", "description": "Simple static file server", "main": "dist/index.js", "type": "module", @@ -22,14 +22,14 @@ "start": "node ./dist/index.js" }, "dependencies": { - "@prosopo/util": "2.1.9", + "@prosopo/util": "2.1.10", "dotenv": "16.4.5", "express": "4.21.0", "node-fetch": "3.3.2", "sharp": "0.33.5" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/express": "4.17.21", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", diff --git a/packages/fingerprint/package.json b/packages/fingerprint/package.json index 6e97162d9a..777a265d04 100644 --- a/packages/fingerprint/package.json +++ b/packages/fingerprint/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/fingerprint", - "version": "2.1.9", + "version": "2.1.10", "description": "Provider fingerprint", "main": "dist/index.js", "type": "module", diff --git a/packages/load-balancer/package.json b/packages/load-balancer/package.json index 5d229b6d39..532b29427d 100644 --- a/packages/load-balancer/package.json +++ b/packages/load-balancer/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/load-balancer", - "version": "2.1.9", + "version": "2.1.10", "description": "Provider load balancer", "main": "dist/index.js", "type": "module", @@ -31,9 +31,9 @@ }, "homepage": "https://github.com/prosopo/captcha#readme", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { "@vitest/coverage-v8": "2.1.1", diff --git a/packages/locale-browser/package.json b/packages/locale-browser/package.json index a976aa205c..b4c45ff187 100644 --- a/packages/locale-browser/package.json +++ b/packages/locale-browser/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/locale-browser", - "version": "2.1.9", + "version": "2.1.10", "description": "Prosopo browser locale", "main": "./dist/index.js", "type": "module", @@ -24,13 +24,13 @@ "author": "Prosopo Limited", "license": "Apache-2.0", "dependencies": { - "@prosopo/locale": "2.1.9", + "@prosopo/locale": "2.1.10", "i18next-browser-languagedetector": "7.2.1", "react-i18next": "11.18.6", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "dotenv": "16.4.5", "npm-run-all": "4.1.5", diff --git a/packages/locale/package.json b/packages/locale/package.json index fb4c9316bf..c53a8e8296 100644 --- a/packages/locale/package.json +++ b/packages/locale/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/locale", - "version": "2.1.9", + "version": "2.1.10", "description": "Prosopo locale library", "main": "./dist/index.js", "type": "module", @@ -30,7 +30,7 @@ "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "dotenv": "16.4.5", "npm-run-all": "4.1.5", diff --git a/packages/procaptcha-bundle/package.json b/packages/procaptcha-bundle/package.json index 0246052281..fd5866e99e 100644 --- a/packages/procaptcha-bundle/package.json +++ b/packages/procaptcha-bundle/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha-bundle", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -29,13 +29,13 @@ }, "browserslist": ["> 0.5%, last 2 versions, not dead"], "dependencies": { - "@prosopo/dotenv": "2.1.9", - "@prosopo/locale": "2.1.9", - "@prosopo/procaptcha-frictionless": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/dotenv": "2.1.10", + "@prosopo/locale": "2.1.10", + "@prosopo/procaptcha-frictionless": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "react": "18.3.1", "react-dom": "18.3.1" }, @@ -52,7 +52,7 @@ "registry": "https://registry.npmjs.org" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/jsdom": "21.1.7", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/packages/procaptcha-common/package.json b/packages/procaptcha-common/package.json index 02921a78e7..43932a7dfd 100644 --- a/packages/procaptcha-common/package.json +++ b/packages/procaptcha-common/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha-common", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -26,13 +26,13 @@ }, "browserslist": ["> 0.5%, last 2 versions, not dead"], "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/load-balancer": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/load-balancer": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/procaptcha-frictionless/package.json b/packages/procaptcha-frictionless/package.json index bdee2c1b66..c8fb5ac4ed 100644 --- a/packages/procaptcha-frictionless/package.json +++ b/packages/procaptcha-frictionless/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha-frictionless", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -26,16 +26,16 @@ }, "browserslist": ["> 0.5%, last 2 versions, not dead"], "dependencies": { - "@prosopo/detector": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha-pow": "2.1.9", - "@prosopo/procaptcha-react": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/detector": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha-pow": "2.1.10", + "@prosopo/procaptcha-react": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/web-components": "2.1.10", "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/procaptcha-pow/package.json b/packages/procaptcha-pow/package.json index 92a0fb744a..67bf4a8f4c 100644 --- a/packages/procaptcha-pow/package.json +++ b/packages/procaptcha-pow/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha-pow", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -27,15 +27,15 @@ "browserslist": ["> 0.5%, last 2 versions, not dead"], "dependencies": { "@polkadot/util": "12.6.2", - "@prosopo/account": "2.1.9", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/account": "2.1.10", + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", + "@prosopo/web-components": "2.1.10", "react": "18.3.1" }, "overrides": { @@ -46,7 +46,7 @@ } }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/procaptcha-react/package.json b/packages/procaptcha-react/package.json index 93de109b14..a18273f6f3 100644 --- a/packages/procaptcha-react/package.json +++ b/packages/procaptcha-react/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha-react", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -26,13 +26,13 @@ }, "browserslist": ["> 0.5%, last 2 versions, not dead"], "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/locale-browser": "2.1.9", - "@prosopo/procaptcha": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", - "@prosopo/web-components": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale-browser": "2.1.10", + "@prosopo/procaptcha": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", + "@prosopo/web-components": "2.1.10", "csstype": "3.1.3", "react": "18.3.1" }, @@ -49,7 +49,7 @@ } }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/procaptcha/package.json b/packages/procaptcha/package.json index b50ab13792..03f2c5c13d 100644 --- a/packages/procaptcha/package.json +++ b/packages/procaptcha/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/procaptcha", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -33,14 +33,14 @@ "@polkadot/api-contract": "10.13.1", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/account": "2.1.9", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/load-balancer": "2.1.9", - "@prosopo/procaptcha-common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/account": "2.1.10", + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/load-balancer": "2.1.10", + "@prosopo/procaptcha-common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/util": "2.1.10", "jsdom": "25.0.0" }, "overrides": { @@ -56,7 +56,7 @@ } }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "dotenv": "16.4.5", diff --git a/packages/provider/package.json b/packages/provider/package.json index 8b559e158f..c77a8babe5 100644 --- a/packages/provider/package.json +++ b/packages/provider/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/provider", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "main": "./dist/index.js", @@ -27,16 +27,16 @@ "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", "@polkadot/util-crypto": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/config": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/database": "2.1.9", - "@prosopo/datasets": "2.1.9", - "@prosopo/env": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9", - "@prosopo/types-env": "2.1.9", - "@prosopo/util": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/config": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/database": "2.1.10", + "@prosopo/datasets": "2.1.10", + "@prosopo/env": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10", + "@prosopo/types-env": "2.1.10", + "@prosopo/util": "2.1.10", "cron": "3.1.7", "express": "4.21.0", "ip-address": "10.0.1", diff --git a/packages/provider/src/api/block.ts b/packages/provider/src/api/block.ts index ad54d563d0..b586e6b252 100644 --- a/packages/provider/src/api/block.ts +++ b/packages/provider/src/api/block.ts @@ -39,8 +39,8 @@ export const blockMiddleware = (env: ProviderEnvironment) => { await env.isReady(); const ipAddress = getIPAddress(req.ip || ""); - const userAccount = req.body.user; - const dappAccount = req.body.dapp; + const userAccount = req.headers["Prosopo-User"] || req.body.user; + const dappAccount = req.headers["Prosopo-Site-Key"] || req.body.dapp; const rule = await env.getDb().getIPBlockRuleRecord(ipAddress.bigInt()); if (rule && BigInt(rule.ip) === ipAddress.bigInt()) { // block by IP address globally diff --git a/packages/provider/src/tasks/powCaptcha/powTasks.ts b/packages/provider/src/tasks/powCaptcha/powTasks.ts index 6b5dad9492..ad0e3618ed 100644 --- a/packages/provider/src/tasks/powCaptcha/powTasks.ts +++ b/packages/provider/src/tasks/powCaptcha/powTasks.ts @@ -13,7 +13,11 @@ // limitations under the License. import type { KeyringPair } from "@polkadot/keyring/types"; import { stringToHex, u8aToHex } from "@polkadot/util"; -import { ProsopoEnvError, getLoggerDefault } from "@prosopo/common"; +import { + ProsopoApiError, + ProsopoEnvError, + getLoggerDefault, +} from "@prosopo/common"; import { ApiParams, type CaptchaResult, @@ -127,8 +131,8 @@ export class PowCaptchaManager { status: CaptchaStatus.disapproved, reason: "CAPTCHA.INVALID_TIMESTAMP", }, - false, - true, + false, //serverchecked + true, // usersubmitted userTimestampSignature, ); return false; @@ -179,6 +183,15 @@ export class PowCaptchaManager { }); } + if (challengeRecord.result.status !== CaptchaStatus.approved) { + throw new ProsopoApiError("CAPTCHA.INVALID_SOLUTION", { + context: { + failedFuncName: this.serverVerifyPowCaptchaSolution.name, + challenge, + }, + }); + } + if (challengeRecord.serverChecked) return false; const challengeDappAccount = challengeRecord.dappAccount; diff --git a/packages/provider/src/tests/unit/tasks/powCaptcha/powTasks.unit.test.ts b/packages/provider/src/tests/unit/tasks/powCaptcha/powTasks.unit.test.ts index 1c39dc7f9e..ad3673fa70 100644 --- a/packages/provider/src/tests/unit/tasks/powCaptcha/powTasks.unit.test.ts +++ b/packages/provider/src/tests/unit/tasks/powCaptcha/powTasks.unit.test.ts @@ -291,6 +291,7 @@ describe("PowCaptchaManager", () => { userAccount, timestamp, checked: false, + result: { status: CaptchaStatus.approved }, }; // biome-ignore lint/suspicious/noExplicitAny: TODO fix (db.getPowCaptchaRecordByChallenge as any).mockResolvedValue( diff --git a/packages/server/package.json b/packages/server/package.json index 2129570460..d86c191c43 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/server", - "version": "2.1.9", + "version": "2.1.10", "description": "NodeJS package for server side communication with the prosopo captcha client", "main": "./dist/index.js", "type": "module", @@ -34,13 +34,13 @@ "dependencies": { "@polkadot/keyring": "12.6.2", "@polkadot/util": "12.6.2", - "@prosopo/api": "2.1.9", - "@prosopo/common": "2.1.9", - "@prosopo/contract": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/api": "2.1.10", + "@prosopo/common": "2.1.10", + "@prosopo/contract": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/server/src/server.ts b/packages/server/src/server.ts index a20ad5b1c2..dd0fc0b26a 100644 --- a/packages/server/src/server.ts +++ b/packages/server/src/server.ts @@ -65,6 +65,7 @@ export class ProsopoServer { * @param timeouts * @param providerUrl * @param timestamp + * @param user * @param challenge */ public async verifyProvider( @@ -72,6 +73,7 @@ export class ProsopoServer { timeouts: CaptchaTimeoutOutput, providerUrl: string, timestamp: number, + user: string, challenge?: string, ): Promise { this.logger.info("Verifying with provider."); @@ -98,6 +100,7 @@ export class ProsopoServer { token, signatureHex, timeouts.pow.cachedTimeout, + user, ); } const imageTimeout = this.config.timeouts.image.cachedTimeout; @@ -112,6 +115,7 @@ export class ProsopoServer { return await providerApi.verifyDappUser( token, signatureHex, + user, timeouts.image.cachedTimeout, ); } @@ -127,7 +131,7 @@ export class ProsopoServer { try { const payload = decodeProcaptchaOutput(token); - const { providerUrl, challenge, timestamp } = + const { providerUrl, challenge, timestamp, user } = ProcaptchaOutputSchema.parse(payload); if (providerUrl) { @@ -136,6 +140,7 @@ export class ProsopoServer { this.config.timeouts, providerUrl, Number(timestamp), + user, challenge, ); } diff --git a/packages/tx/package.json b/packages/tx/package.json index fc4ef632e3..ea819786f5 100644 --- a/packages/tx/package.json +++ b/packages/tx/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/tx", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "scripts": { @@ -37,11 +37,11 @@ "@polkadot/types": "10.13.1", "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/types-database/package.json b/packages/types-database/package.json index d121cf610c..da1f863ccf 100644 --- a/packages/types-database/package.json +++ b/packages/types-database/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/types-database", - "version": "2.1.9", + "version": "2.1.10", "description": "Types for prosopo database", "main": "dist/index.js", "type": "module", @@ -31,14 +31,14 @@ }, "homepage": "https://github.com/prosopo/captcha#readme", "dependencies": { - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", "mongodb": "6.9.0", "mongoose": "8.6.2", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/types-env/package.json b/packages/types-env/package.json index 224ed2e2a7..50fc7ab16e 100644 --- a/packages/types-env/package.json +++ b/packages/types-env/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/types-env", - "version": "2.1.9", + "version": "2.1.10", "description": "Types for prosopo environment", "main": "dist/index.js", "type": "module", @@ -32,12 +32,12 @@ "homepage": "https://github.com/prosopo/captcha#readme", "dependencies": { "@polkadot/keyring": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/types": "2.1.9", - "@prosopo/types-database": "2.1.9" + "@prosopo/common": "2.1.10", + "@prosopo/types": "2.1.10", + "@prosopo/types-database": "2.1.10" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5", diff --git a/packages/types/package.json b/packages/types/package.json index ed0d086ba9..c5b12a6d9c 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/types", - "version": "2.1.9", + "version": "2.1.10", "description": "Types for prosopo TypeScript packages", "main": "dist/index.js", "type": "module", @@ -38,14 +38,14 @@ "@polkadot/types": "10.13.1", "@polkadot/types-codec": "10.13.1", "@polkadot/util": "12.6.2", - "@prosopo/common": "2.1.9", - "@prosopo/locale": "2.1.9", + "@prosopo/common": "2.1.10", + "@prosopo/locale": "2.1.10", "ip-address": "10.0.1", "scale-ts": "1.6.0", "zod": "3.23.8" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@types/node": "22.5.5", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", diff --git a/packages/types/src/api/api.ts b/packages/types/src/api/api.ts index 95ae1518e8..7e5a2ddb74 100644 --- a/packages/types/src/api/api.ts +++ b/packages/types/src/api/api.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. import type { CaptchaSolution } from "../datasets/index.js"; -import type { StoredEvents } from "../procaptcha/index.js"; +import type { ProcaptchaToken, StoredEvents } from "../procaptcha/index.js"; import type { CaptchaResponseBody, CaptchaSolutionResponse, @@ -39,11 +39,9 @@ export interface ProviderApiInterface { userRequestHashSignature: string, ): Promise; verifyDappUser( - dapp: string, + token: ProcaptchaToken, + signature: string, userAccount: string, - blockNumber: number, - dappUserSignature: string, - commitmentId?: string, maxVerifiedTime?: number, ): Promise; getPowCaptchaChallenge( diff --git a/packages/util/package.json b/packages/util/package.json index c4b7a3937e..842680342d 100644 --- a/packages/util/package.json +++ b/packages/util/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/util", - "version": "2.1.9", + "version": "2.1.10", "author": "PROSOPO LIMITED ", "license": "Apache-2.0", "private": false, @@ -32,7 +32,7 @@ "types": "./dist/index.d.ts", "dependencies": { "@noble/hashes": "1.5.0", - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "dotenv": "16.4.5", "lodash": "4.17.21", "seedrandom": "3.0.5" diff --git a/packages/web-components/package.json b/packages/web-components/package.json index a777e2eda1..573e7b0bee 100644 --- a/packages/web-components/package.json +++ b/packages/web-components/package.json @@ -1,6 +1,6 @@ { "name": "@prosopo/web-components", - "version": "2.1.9", + "version": "2.1.10", "description": "Non business logic utilities for web applications", "main": "dist/index.js", "type": "module", @@ -36,7 +36,7 @@ "react": "18.3.1" }, "devDependencies": { - "@prosopo/config": "2.1.9", + "@prosopo/config": "2.1.10", "@vitest/coverage-v8": "2.1.1", "concurrently": "9.0.1", "npm-run-all": "4.1.5",