JSPM

@bitsocial/captcha-canvas-challenge

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 27
  • Score
    100M100P100Q92310F
  • License GPL-3.0-only

Standalone captcha canvas challenge for pkc-js

Package Exports

  • @bitsocial/captcha-canvas-challenge
  • @bitsocial/captcha-canvas-challenge/package.json

Readme

@bitsocial/captcha-canvas-challenge

Standalone captcha canvas challenge extracted from pkc-js, packaged with independent dependencies.

Security Warning

This captcha can be brute-forced easily and should not be used to protect a real community.

Status

  • @pkcprotocol/pkc-js is a dev dependency used only for TypeScript types. It is not required at runtime.

Requirements

  • Node.js >=22
  • ESM-only environment

Install

npm install @bitsocial/captcha-canvas-challenge

Usage

import PKC from "@pkcprotocol/pkc-js";
import { captchaCanvasChallenge } from "@bitsocial/captcha-canvas-challenge";

PKC.challenges["captcha-canvas-v3"] = captchaCanvasChallenge;

Challenge Options

  • characters: Amount of characters of the captcha (default: 6)
  • height: Height of the captcha in pixels (default: 100)
  • width: Width of the captcha in pixels (default: 300)
  • colors: Colors of the captcha text as hex comma separated values (default: #32cf7e)

Scripts

npm run typecheck
npm run build
npm test