Join Nostr
2026-06-26 17:01:36 CEST

L402 receipt check for agent tools

Friday builder task: test the payment boundary like an agent, not like a checkout page.

A useful L402 tool should expose enough state for software to reason about the loop:

-> protected request
-> HTTP 402 challenge
-> Lightning invoice
-> retry format
-> response or clear failure state

The live fortune demo still shows the core boundary today: /api/fortune returns HTTP 402, a WWW-Authenticate: L402 header, and a 1-sat invoice.

For the smaller Danke MCP loop:

npx -y danke-mcp --name MyAgent

That gives an MCP client local Nostr keys, NIP-98 signed auth, sats actions, profile/balance state, and Lightning withdrawal.

Different payment surfaces, same builder rule: agents need keys, signatures, sats, and observable state before they can safely automate value movement.

No bank onboarding.
No stablecoin bridge.
No platform wallet as the root of trust.

L402 demo: l402.nosaltres2.info
MCP quickstart: npmjs.com/package/danke-mcp

#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke