Menu

Post image 1
Post image 2
1 / 2
0

Add a 3-Sat Pay-to-Skip Tier to Your Self-Hosted CAPTCHA

DEV Community·Zeke·24 days ago
#JEJy94E4
#javascript#captcha#skip#server#sats#widget
Reading 0:00
15s threshold

Your CAPTCHA is good at stopping bots. But it stops real users too. The ones who are in a hurry, on mobile, or just sick of clicking traffic lights. Here is a way to let the real ones skip it for 3 sats. Three sats. About a third of a cent. Enough to filter automation running at scale. Cheap enough that humans pay without noticing. What you are gonna build A self-hosted CAPTCHA widget with two tiers running side by side: Free path: SHA-256 proof-of-work in a Web Worker. Pure JavaScript, no WASM, no tracking, no third-party calls. Skip tier: click the lightning bolt, scan a bolt11 invoice in any wallet, ship. Same widget. Same token format on the server. The user picks the path that fits their hurry. How the skip tier works The flow is dead simple: User clicks the ⚡ Skip (3 sats) button on the widget. Browser hits POST /api/skip on your server. Your server asks LNBits for a bolt11 invoice and returns it with a payment_hash . Widget pops a modal with the invoice. Click-to-copy bolt11.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More