altcha 0.7.0 → 0.8.0
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/README.md +11 -7
- package/dist/altcha.d.ts +14 -2
- package/dist/altcha.js +844 -644
- package/dist/altcha.umd.cjs +2 -2
- package/dist_external/altcha.d.ts +14 -2
- package/dist_external/altcha.js +812 -612
- package/dist_external/altcha.umd.cjs +2 -2
- package/dist_external/worker.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,14 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
ALTCHA uses a proof-of-work mechanism to protect your website, APIs, and online services from spam and abuse. Unlike other solutions, ALTCHA is self-hosted, does not use cookies nor fingerprinting, does not track users, and is fully compliant with GDPR.
|
|
4
4
|
|
|
5
|
-
https://altcha.org
|
|
5
|
+
Visit [ALTCHA](https://altcha.org) for more information.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Features
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
9
|
+
- **Frictionless CAPTCHA Alternative** - Employs proof-of-work (PoW) instead of visual puzzles.
|
|
10
|
+
- **Data Obfuscation** - Safeguards your email address from scraping.
|
|
11
|
+
- **Cookie-less** - Designed to be GDPR compliant by default.
|
|
12
|
+
- **Self-hosted** - Operates independently without relying on external providers.
|
|
13
|
+
- **SaaS Available** - Get started with the SaaS API at [altcha.org/docs/api](https://altcha.org/docs/api).
|
|
13
14
|
|
|
14
15
|
## Examples
|
|
15
16
|
|
|
@@ -28,6 +29,7 @@ https://altcha.org
|
|
|
28
29
|
- [Python](https://github.com/altcha-org/altcha-lib-py)
|
|
29
30
|
- [Java](https://github.com/altcha-org/altcha-lib-java)
|
|
30
31
|
- [Ruby](https://github.com/altcha-org/altcha-lib-rb)
|
|
32
|
+
- [Elixir](https://github.com/altcha-org/altcha-lib-ex)
|
|
31
33
|
|
|
32
34
|
## Plugins
|
|
33
35
|
|
|
@@ -104,8 +106,9 @@ Additional options:
|
|
|
104
106
|
- __hidelogo__ - Hide the ALTCHA logo.
|
|
105
107
|
- __maxnumber__ - The max. number to iterate to (defaults to 1,000,000).
|
|
106
108
|
- __name__ - The name of the hidden field containing the payload (defaults to "altcha").
|
|
109
|
+
- __obfuscated__ - The [obfuscated data](https://altcha.org/docs/obfuscation) provided as a base64-encoded string. Use only without `challengeurl`/`challengejson`.
|
|
107
110
|
- __spamfilter__ - Enable [Spam Filter](#spam-filter).
|
|
108
|
-
- __strings__ - JSON-encoded translation strings. Refer to [customization](/docs/widget-customization).
|
|
111
|
+
- __strings__ - JSON-encoded translation strings. Refer to [customization](https://altcha.org/docs/widget-customization).
|
|
109
112
|
- __refetchonexpire__ - Automatically re-fetch and re-validate when the challenge expires (defaults to true).
|
|
110
113
|
- __verifyurl__ - URL for server-side verification requests. This option is automatically configured when the `spamfilter` option is used. Override this setting only if you are using a custom server implementation.
|
|
111
114
|
- __workers__ - The number of workers to utilize for PoW (defaults to `navigator.hardwareConcurrency || 8`, max. value `16`).
|
|
@@ -162,6 +165,7 @@ export interface Configure {
|
|
|
162
165
|
maxnumber?: number;
|
|
163
166
|
mockerror?: boolean;
|
|
164
167
|
name?: string;
|
|
168
|
+
obfuscated?: string;
|
|
165
169
|
refetchonexpire?: boolean;
|
|
166
170
|
spamfilter?: boolean | 'ipAddress' | SpamFilter;
|
|
167
171
|
strings?: {
|
package/dist/altcha.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ declare global {
|
|
|
16
16
|
|
|
17
17
|
interface AltchaServerVerificationEvent extends CustomEvent<Record<string, unknown>> {}
|
|
18
18
|
|
|
19
|
-
interface
|
|
19
|
+
interface AltchaWidgetOptions {
|
|
20
20
|
analytics?: boolean | string;
|
|
21
21
|
auto?: 'onfocus' | 'onload' | 'onsubmit';
|
|
22
22
|
beaconurl?: string;
|
|
@@ -31,9 +31,10 @@ declare global {
|
|
|
31
31
|
floatingoffset?: number;
|
|
32
32
|
hidefooter?: boolean;
|
|
33
33
|
hidelogo?: boolean;
|
|
34
|
-
name?: string;
|
|
35
34
|
maxnumber?: number;
|
|
36
35
|
mockerror?: boolean;
|
|
36
|
+
name?: string;
|
|
37
|
+
obfuscated?: string;
|
|
37
38
|
refetchonexpire?: boolean;
|
|
38
39
|
spamfilter?: boolean | 'ipAddress';
|
|
39
40
|
strings?: string;
|
|
@@ -43,6 +44,16 @@ declare global {
|
|
|
43
44
|
workerurl?: string;
|
|
44
45
|
}
|
|
45
46
|
|
|
47
|
+
interface AltchaWidgetMethods {
|
|
48
|
+
configure: (options: AltchaWidgetOptions) => void;
|
|
49
|
+
clarify: () => Promise<void>;
|
|
50
|
+
reset: (newState: AltchaState = 'unverified', err: string | null = null) => void;
|
|
51
|
+
verify: () => Promise<void>;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
interface AltchaWidget extends AltchaWidgetOptions extends AltchaWidgetMethods {
|
|
55
|
+
}
|
|
56
|
+
|
|
46
57
|
declare namespace svelteHTML {
|
|
47
58
|
interface IntrinsicElements {
|
|
48
59
|
'altcha-widget': AltchaWidgetSvelte;
|
|
@@ -74,6 +85,7 @@ declare global {
|
|
|
74
85
|
}
|
|
75
86
|
|
|
76
87
|
interface AltchaWidgetReact extends AltchaWidget extends React.HTMLAttributes<HTMLElement> {
|
|
88
|
+
children?: React.ReactNode;
|
|
77
89
|
ref?: React.RefObject<HTMLElement>;
|
|
78
90
|
style?: AltchaWidgetCSSProperties;
|
|
79
91
|
}
|