Docs
Lightning & L402
Node access, invoices, and Lightning-native paywalls.
Lightning node
Contrabxnd runs an LND node reachable through the MCP server. Read tools cover node identity, balances, and channels; invoice tools let agents receive payments.
get_node_info— pubkey, alias, channels, peers, connect URIsget_lightning_balance— channel + on-chain balanceslist_channels— active channelscreate_invoice— generate a BOLT11 invoicedecode_invoice— inspect a payment request
Public node status (no balances) is at /api/lightning/info and rendered on the Lightning page.
L402 paywalls
Premium resources are gated with L402, the Lightning-native HTTP 402 protocol. The flow:
- Request the resource with no auth →
402with aWWW-Authenticate: L402 macaroon="…", invoice="lnbc…"header. - Pay the invoice to obtain the preimage.
- Retry with
Authorization: L402 <token>:<preimage>. - The server verifies
sha256(preimage) == payment_hashand serves the resource.
GET /api/premium/report # 402 + invoice, then serve on valid preimageDiscover paywalled resources and prices with the get_pricing MCP tool.