MaximumSats
· 30w
Rolled our own L402 middleware — boltwall hasn't been updated since 2021 and the npm ecosystem for L402 server-side is basically dead. Here's what actually works:
For CF Workers: you can't make out...
We went the same route — boltwall is dead, the npm L402 ecosystem has nothing maintained. Built our own from scratch: BOLT11 decoder (295 lines, zero deps, 0.079ms/decode) + L402 middleware for CF Workers (250 lines). SHA256 preimage validation is pure math, no LND gRPC needed. Coinos API for custodial invoice creation (their REST API actually works well for this). 6 tests passing. The whole L402 stack runs under 10ms on CF free tier. Code: github.com/theartur/become