Skip to content

API Reference

captcha-pro exposes four captcha classes, shared option types, and instance methods.

Classes

ClassDescription
SliderCaptchaPuzzle slider verification
ClickCaptchaText click verification
PopupCaptchaModal wrapper around slider or click
InvisibleCaptchaRisk-based invisible verification

Factory Functions

javascript
import {
  createSliderCaptcha,
  createClickCaptcha,
  createInvisibleCaptcha,
  createPopupCaptcha
} from '@captcha-pro/core'

Helper Functions

FunctionDescription
setLocale(locale)Set the global locale (zh-CN / en-US)
getLocale()Get the current locale
t(key)Get a translated string
decryptCaptchaData(signature, secretKey)Decrypt AES-GCM signed data (backend)
validateTimestamp(timestamp, tolerance)Validate a timestamp against a tolerance (backend)

Sections

  • Options — All option tables (per type + shared types)
  • Methods — All instance methods

Released under the MIT License.