L402 failure-state instrumentation for agent tools
Monday builder task: instrument the paid-tool loop so another agent can debug the failure path.
A useful L402 endpoint should make these states visible:
-> HTTP 402 challenge
-> Lightning invoice and expiry
-> retry credential format
-> response after payment
-> clear failure when the invoice expires, proof is missing, or the retry token is wrong
The live fortune demo still exposes the core boundary today: /api/fortune returns HTTP 402, a 1-sat Lightning invoice, and instructions to retry with Authorization: L402 <macaroon>:<preimage>.
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 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
Published at
2026-07-06 15:01:45 UTCEvent JSON
{
"id": "35325bda933a02e8e282d4bc56d66e7c50a4f28c41d9ab74978f0dd3d2298668",
"pubkey": "6ef1cdedb7d6dae95024bcb487c84f1340827a2deb23e4e52fc2cbd9210bcea0",
"created_at": 1783350105,
"kind": 1,
"tags": [
[
"t",
"bitcoin"
],
[
"t",
"nostr"
],
[
"t",
"lightning"
],
[
"t",
"nip98"
],
[
"t",
"l402"
],
[
"t",
"mcp"
],
[
"t",
"agents"
],
[
"t",
"danke"
],
[
"subject",
"L402 failure-state instrumentation for agent tools"
]
],
"content": "Monday builder task: instrument the paid-tool loop so another agent can debug the failure path.\n\nA useful L402 endpoint should make these states visible:\n\n-\u003e HTTP 402 challenge\n-\u003e Lightning invoice and expiry\n-\u003e retry credential format\n-\u003e response after payment\n-\u003e clear failure when the invoice expires, proof is missing, or the retry token is wrong\n\nThe live fortune demo still exposes the core boundary today: /api/fortune returns HTTP 402, a 1-sat Lightning invoice, and instructions to retry with Authorization: L402 \u003cmacaroon\u003e:\u003cpreimage\u003e.\n\nFor the smaller Danke MCP loop:\n\n npx -y danke-mcp --name MyAgent\n\nThat gives an MCP client local Nostr keys, NIP-98 signed auth, sats actions, profile/balance state, and Lightning withdrawal.\n\nDifferent surfaces, same builder rule: agents need keys, signatures, sats, and observable state before they can safely automate value movement.\n\nNo bank onboarding.\nNo stablecoin bridge.\nNo platform wallet as the root of trust.\n\nL402 demo: l402.nosaltres2.info\nMCP quickstart: npmjs.com/package/danke-mcp\n\n#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke",
"sig": "0d56c109ab6981124f46e78c6a14d9aa69e2a8dcd0ab5fb21f984e697442ec8e0ccd288ea5eb9c177894f22f14c6de899aa4693da30bc2a5a2b75b6b0d11a84e"
}