crypto_bolt11_decode
Lightning BOLT11 invoice decoder and validator — Decode and check a Bitcoin Lightning invoice before paying it (also accepts a lightning: URI or an L402/LSAT WWW-Authenticate header value that contains invoice=). Returns status VALID, EXPIRED or INVALID; network; amount in msat, sat and BTC (null for zero-amount invoices); description or description hash; payment hash and payment secret; payee node id (from the n field, or recovered from the secp256k1 signature); created and expiry times with seconds left; min final CLTV delta; route hints; fallback on-chain addresses; feature bits; plus the BOLT11 rule violations a compliant wallet must refuse (wrong field lengths, duplicate or missing p/s fields, missing description, unknown required feature bits, bad or high-S signature). Offline, passes the BOLT11 spec test vectors; no network calls. Returns 422 if the string is not a decodable invoice. Price: $0.003 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"invoice": "<invoice>"
},
"name": "crypto_bolt11_decode"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice | Yes | lnbc2500u1pvjluezsp5zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zyg3zygspp5qqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqqqsyqcyq5rqwzqfqypqdq5xysxxatsyp3k7enxv4jsxqzpu9qrsgquk0rl77nj30yxdy8j9vdx85fkpmdla2087ne0xh8nhedh8w27kyke0lp53ut353s06fv3qfegext0eh0ymjpf39tuven09sam30g4vgpfna3rh |