Easily add a bitcoin faucet to your WordPress pages and posts!
I created the Sinclair Faucet back in late 2019. A simple form where you could charge a faucet and share as an lnurl QR code. Within a few weeks people had created a range of scripts to repeatedly hit the faucets (amilking).
Later we created the LNURLw extension in LNbits, an easy way for people to create their own lnurl-withdraw links/faucets. We tried to counter amilking by adding a “unique” option. The “unique” variable meant each withdraw of the withdraw-link created a unique lnurl/QR code. However people soon managed to bot their way around this one as well.
Clearly these bots needed a captcha!
lnbits-captcha-faucet easy to add WordPress shortcode, that requires the completion of a captcha, which then hashes and checks the users IP. All this is made possible as LNURLw now has another endpoint so people can relate an withdraw-link with a hash before fetching, in this shortcodes case, the hash sent is the users hashed IP.
Installation
- server: an LNbits server
- key: LNbits wallet invoice key attached to lnurl-withdraw
- lnurl: lnurl-withdraw id generated in LNbits
Important! ~ Change the $secret_key in lnbits_faucet_shortcode as this is the string that is used to encrypt data to pass through the front-end of your captcha.