@capbypass/sdk 1.0.9 → 1.0.10

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 CHANGED
@@ -4,7 +4,7 @@
4
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.3-blue.svg)](https://www.typescriptlang.org/)
6
6
 
7
- Official TypeScript/JavaScript SDK for the [CapBypass](https://capbypass.pro) CAPTCHA solving service. Supports reCAPTCHA v2, reCAPTCHA v3, and AWS WAF challenges.
7
+ Official TypeScript/JavaScript SDK for the [CapBypass](https://capbypass.pro) CAPTCHA solving service. Supports reCAPTCHA v2, reCAPTCHA v3, AWS WAF challenges, and Cloudflare Turnstile.
8
8
 
9
9
  Works in both Node.js and browser environments.
10
10
 
@@ -184,6 +184,32 @@ const solution = await client.solve({
184
184
  }, 120);
185
185
  ```
186
186
 
187
+ ### Cloudflare Turnstile
188
+
189
+ `websiteURL` and `websiteKey` are required. `action` (1 to 32 characters of `A-Z a-z 0-9 _ -`) and `cData` (1 to 255 characters of the same set) are optional and replace the page's `data-action` / `data-cdata`. The solution holds `token` (the `cf-turnstile-response` value) and `timing.solveMs`; Turnstile returns no `userAgent`.
190
+
191
+ ```typescript
192
+ const solution = await client.solve({
193
+ type: TaskType.TURNSTILE_PROXYLESS,
194
+ websiteURL: 'https://example.com/login',
195
+ websiteKey: '0x4AAAAAAAxxxxxxxxxxxxxx',
196
+ }, 120);
197
+ const token = solution.token;
198
+ ```
199
+
200
+ With your own proxy (`TurnstileTask` requires one): a single `http(s)` URL in the `proxy` field, no `socks`:
201
+
202
+ ```typescript
203
+ const solution = await client.solve({
204
+ type: TaskType.TURNSTILE,
205
+ websiteURL: 'https://example.com/login',
206
+ websiteKey: '0x4AAAAAAAxxxxxxxxxxxxxx',
207
+ action: 'login',
208
+ cData: 'session-42',
209
+ proxy: 'http://user:pass@host:port',
210
+ }, 120);
211
+ ```
212
+
187
213
  ### With Proxy
188
214
 
189
215
  All task types support proxy configuration:
@@ -248,6 +274,8 @@ TaskType.RECAPTCHA_V3 // ReCaptchaV3Task
248
274
  TaskType.RECAPTCHA_V3_PROXYLESS // ReCaptchaV3TaskProxyLess
249
275
  TaskType.RECAPTCHA_V3_ENTERPRISE // ReCaptchaV3EnterpriseTask
250
276
  TaskType.RECAPTCHA_V3_ENTERPRISE_PROXYLESS // ReCaptchaV3EnterpriseTaskProxyLess
277
+ TaskType.TURNSTILE // TurnstileTask
278
+ TaskType.TURNSTILE_PROXYLESS // TurnstileTaskProxyLess
251
279
  ```
252
280
 
253
281
  ## Documentation
@@ -273,6 +301,7 @@ See the [examples](examples/) directory for complete runnable examples:
273
301
  - [recaptcha-v2.ts](examples/recaptcha-v2.ts) - reCAPTCHA v2 solving
274
302
  - [recaptcha-v3.ts](examples/recaptcha-v3.ts) - reCAPTCHA v3 solving
275
303
  - [aws-waf.ts](examples/aws-waf.ts) - AWS WAF challenge solving
304
+ - [turnstile.ts](examples/turnstile.ts) - Cloudflare Turnstile solving
276
305
 
277
306
  ### Advanced Examples
278
307
  Full integration examples in the [documentation](https://github.com/CapBypass-Development/capbypass-sdks/tree/main/docs/examples):
package/dist/index.d.mts CHANGED
@@ -16,6 +16,8 @@ declare const TaskType: {
16
16
  readonly HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless";
17
17
  readonly CAPTCHA_FOX: "CaptchaFoxTask";
18
18
  readonly CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess";
19
+ readonly TURNSTILE: "TurnstileTask";
20
+ readonly TURNSTILE_PROXYLESS: "TurnstileTaskProxyLess";
19
21
  };
20
22
  type TaskTypeValue = typeof TaskType[keyof typeof TaskType];
21
23
  /**
package/dist/index.d.ts CHANGED
@@ -16,6 +16,8 @@ declare const TaskType: {
16
16
  readonly HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless";
17
17
  readonly CAPTCHA_FOX: "CaptchaFoxTask";
18
18
  readonly CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess";
19
+ readonly TURNSTILE: "TurnstileTask";
20
+ readonly TURNSTILE_PROXYLESS: "TurnstileTaskProxyLess";
19
21
  };
20
22
  type TaskTypeValue = typeof TaskType[keyof typeof TaskType];
21
23
  /**
package/dist/index.js CHANGED
@@ -167,7 +167,7 @@ function parseError(errorCode, errorDescription) {
167
167
 
168
168
  // src/client.ts
169
169
  var DEFAULT_BASE_URL = "https://api.capbypass.pro";
170
- var SDK_VERSION = true ? "1.0.9" : "unknown";
170
+ var SDK_VERSION = true ? "1.0.10" : "unknown";
171
171
  var USER_AGENT = `capbypass-sdk-typescript/${SDK_VERSION}`;
172
172
  var POLL_DELAYS_SECONDS = [1, 1, 1, 2, 2];
173
173
  var MAX_POLL_DELAY_SECONDS = 3;
@@ -404,7 +404,10 @@ var TaskType = {
404
404
  HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless",
405
405
  // CaptchaFox
406
406
  CAPTCHA_FOX: "CaptchaFoxTask",
407
- CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess"
407
+ CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess",
408
+ // Cloudflare Turnstile
409
+ TURNSTILE: "TurnstileTask",
410
+ TURNSTILE_PROXYLESS: "TurnstileTaskProxyLess"
408
411
  };
409
412
  // Annotate the CommonJS export names for ESM import in node:
410
413
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -116,7 +116,7 @@ function parseError(errorCode, errorDescription) {
116
116
 
117
117
  // src/client.ts
118
118
  var DEFAULT_BASE_URL = "https://api.capbypass.pro";
119
- var SDK_VERSION = true ? "1.0.9" : "unknown";
119
+ var SDK_VERSION = true ? "1.0.10" : "unknown";
120
120
  var USER_AGENT = `capbypass-sdk-typescript/${SDK_VERSION}`;
121
121
  var POLL_DELAYS_SECONDS = [1, 1, 1, 2, 2];
122
122
  var MAX_POLL_DELAY_SECONDS = 3;
@@ -353,7 +353,10 @@ var TaskType = {
353
353
  HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless",
354
354
  // CaptchaFox
355
355
  CAPTCHA_FOX: "CaptchaFoxTask",
356
- CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess"
356
+ CAPTCHA_FOX_PROXYLESS: "CaptchaFoxTaskProxyLess",
357
+ // Cloudflare Turnstile
358
+ TURNSTILE: "TurnstileTask",
359
+ TURNSTILE_PROXYLESS: "TurnstileTaskProxyLess"
357
360
  };
358
361
  export {
359
362
  AuthenticationError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capbypass/sdk",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Official TypeScript/JavaScript SDK for CapBypass CAPTCHA solving service",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",