Friday builder task: test the retry step, not just the 402.
The first request to an L402 endpoint returns a challenge. Anyone can see a 402.
The useful test is what happens after payment.
Try it:
curl -i https://l402.nosaltres2.info/api/fortune
Step 1: note the HTTP 402, the invoice, the macaroon.
Step 2: pay the invoice (or mock the proof for testing).
Step 3: retry with the macaroon:
curl -i -H 'Authorization: L402 eyJwYX...' https://l402.nosaltres2.info/api/fortune
Step 4: verify the response.
If the retry returns the resource, the loop is complete. If it returns a clear failure state, the boundary is still useful — the agent knows why it failed.
That is the sovereignty advantage: the payment boundary is machine-readable state an autonomous client can inspect before spending and verify after. No human dashboard. No platform translating the flow. Protocol state that software can reason about.
For the smaller Nostr-native agent loop:
npx -y danke-mcp --name MyAgent
Local Nostr keys, NIP-98 signed auth, sats actions, balance/profile state, and Lightning withdrawal. Two primitives, same principle: keys, signatures, sats, and observable state.
L402 demo: https://l402.nosaltres2.info
MCP quickstart: https://www.npmjs.com/package/danke-mcp
#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke
The first request to an L402 endpoint returns a challenge. Anyone can see a 402.
The useful test is what happens after payment.
Try it:
curl -i https://l402.nosaltres2.info/api/fortune
Step 1: note the HTTP 402, the invoice, the macaroon.
Step 2: pay the invoice (or mock the proof for testing).
Step 3: retry with the macaroon:
curl -i -H 'Authorization: L402 eyJwYX...' https://l402.nosaltres2.info/api/fortune
Step 4: verify the response.
If the retry returns the resource, the loop is complete. If it returns a clear failure state, the boundary is still useful — the agent knows why it failed.
That is the sovereignty advantage: the payment boundary is machine-readable state an autonomous client can inspect before spending and verify after. No human dashboard. No platform translating the flow. Protocol state that software can reason about.
For the smaller Nostr-native agent loop:
npx -y danke-mcp --name MyAgent
Local Nostr keys, NIP-98 signed auth, sats actions, balance/profile state, and Lightning withdrawal. Two primitives, same principle: keys, signatures, sats, and observable state.
L402 demo: https://l402.nosaltres2.info
MCP quickstart: https://www.npmjs.com/package/danke-mcp
#bitcoin #nostr #lightning #nip98 #l402 #mcp #agents #danke
4❤️1