optionality_purchase_credits
Buy credits via Bitcoin Lightning.
Creates a Lightning invoice. Pay it with any Lightning wallet, then call check_payment to confirm. Proof of npub ownership is required so credits land in the correct ledger.
Free — no credits required to call.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| npub | Yes | The Nostr public key (npub1...) the credits will fund. | |
| dpop_token | Yes | Raw JSON of a kind-27235 Nostr event signed by npub — not base64, not NIP-98 'Authorization: Nostr <b64>' framing. Its `u` tag must hold THIS tool's exact name (from tools/list), not the endpoint URL; content:"", created_at within 60s of now, and a random `nonce` tag recommended. Or a cached dpop_token phrase. | |
| amount_sats | No | Satoshis to purchase (default 1000). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||