Do you want the ability for lightning topups, or do you want the ability for actual per query lightning payments? I would think the latter would have an undesirable latency for each query, right?

Reply to this note

Please Login to reply.

Discussion

PPQ additional API endpoints for auto LN topup:

Here are specs for API endpoints I'd like to see to allow remote top up, in addition to your existing prompt API endpoint. This will allow full integration to any app I build where we don't have to login to PPQ in order to check and top up balance. (YOU'RE WELCOME 😉 )

GET /api/v1/check_balance

requires: API_KEY

returns:

{ amount: 10000}

# CURL Example

curl -X GET 'https://your-domain.com/api/v1/check_balance' \

-H 'API_KEY: your_api_key_here'

# Expected Response

{

"amount": 10000

}

POST /api/v1/get_invoice

description: min amount can be XXXX sats to top up balance

if you make the minimum invoice amount to be significant then the endpoint should not be overloaded by frequent updates.

requirements: API_KEY , amount e.g. 5000

returns { invoice: lnbc......}

curl -X POST 'https://your-domain.com/api/v1/get_invoice' \

-H 'Content-Type: application/json' \

-H 'API_KEY: your_api_key_here' \

-d '{

"amount": 1000

}'

# Expected Response

{

"invoice": "lnbc10u1p3xhyxlpp5..."

}