How solvercaptcha/solvecaptcha-javascript works
This is a Node.js client for the SolveCaptcha service. A caller configures a Solver and submits one of the documented captcha types; the client formats requests to the service and handles results, with parameter normalization and validation supporting the solve methods. The README also documents balance and reporting operations. A separate HTTP callback server is present but marked work in progress. The main client excerpt is partial, so details of individual solve and polling paths are not fully visible.
Main entry points: solvecaptcha.ts Solver operations · index.ts Package exports · solvecaptchaServer.ts HTTP callback server · providers.ts Provider selection
Components 14
Client API
- Package exports
src/index.ts - Solver operations
src/structs/solvecaptcha.ts - Captcha solve methods
src/structs/solvecaptcha.ts - Balance and reports
src/structs/solvecaptcha.ts
Request internals
- Parameter validation
src/utils/checkCaptchaParams.ts - Parameter mapping
src/utils/renameParams.ts - Payload formatting
src/utils/generic.ts - Provider selection
src/structs/providers/providers.ts - Provider endpoints
src/structs/constants/constants.ts - API errors
src/structs/solvecaptchaError.ts
Callback server
- HTTP callback server
src/structs/solvecaptchaServer.ts
Other components
- Node.js caller
- SolveCaptcha API
- HTTP clients
Connections 16
- Node.js caller → Package exports: imports
src/index.ts - Package exports → Solver operations: exports
src/index.ts - Node.js caller → Solver operations: configures
README.md - Solver operations → Captcha solve methods: provides
README.md - Solver operations → Balance and reports: provides
README.md - Captcha solve methods → Parameter mapping: normalizes params
src/structs/solvecaptcha.ts - Captcha solve methods → Parameter validation: checks params
src/structs/solvecaptcha.ts - Solver operations → Payload formatting: formats payloads
src/structs/solvecaptcha.ts - Solver operations → Provider selection: selects provider
src/structs/solvecaptcha.ts - Provider selection → Provider endpoints: reads endpoint config
src/structs/providers/providers.ts - Solver operations → SolveCaptcha API: submits and polls
README.md - Solver operations → HTTP clients: sends requests
src/structs/solvecaptcha.ts - Solver operations → API errors: uses errors
src/structs/solvecaptcha.ts - Package exports → API errors: exports
src/index.ts - HTTP callback server → HTTP clients: creates server
src/structs/solvecaptchaServer.ts - HTTP callback server → Solver operations: uses captcha types
src/structs/solvecaptchaServer.ts