Welcome. If you're reading this, you want to help build the payment infrastructure for the internet of value. Let's make it simple.
git clone https://github.com/shinydapps/l402-kit
cd l402-kit
npm install
cp .env.example .env # fill in your Blink/OpenNode key
npm run lint # must pass before any PRsrc/ # TypeScript — the npm package
middleware.ts # the Express middleware (heart of the kit)
verify.ts # SHA256 cryptographic verification
replay.ts # anti-replay protection
providers/ # Lightning backends (Blink, OpenNode, LNbits)
types.ts # TypeScript interfaces
python/l402kit/ # Python — FastAPI/Flask SDK
middleware.py # decorator @l402_required
providers/ # same providers, Python
examples/ # runnable examples (keep them minimal)
supabase/schema.sql # payment logging schema
extension/ # VSCode dashboard (coming soon)
- Tests must pass —
npm run lintgreen before PR - No credentials in code — ever
- New provider? — implement
LightningProviderinterface, add toproviders/ - New language SDK? — create
[language]/folder, same structure
// src/providers/myprovider.ts
import type { Invoice, LightningProvider } from "../types";
export class MyProvider implements LightningProvider {
async createInvoice(amountSats: number): Promise<Invoice> { ... }
async checkPayment(paymentHash: string): Promise<boolean> { ... }
}Export it in src/providers/index.ts and you're done.
Open an issue or find us on Twitter/X — we respond fast.