mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-02-24 14:51:05 +01:00
* readd lndgrpc * debug logging * Use TrackPaymentV2 * /v2/router/track * lnd_router_grpc * flag for blocking check * error handling * fix name * regtest lndgrpc * new test pipeline * fix env * check for description hash * remove unnecessary asserts for clarity * assume that description_hash is a hash already * no lock * description hashing in backend * restore bolt11.py * /api/v1/payments with hex of description * comment * refactor wallets * forgot eclair * fix lnpay * bytes directly * make format * mypy check * make format * remove old code * WIP status check * LND GRPC docs * restore cln to main * fix regtest * import * remove unused import * format * do not expect ok * check ok * delete comments |
||
---|---|---|
.. | ||
templates/subdomains | ||
__init__.py | ||
cloudflare.py | ||
config.json | ||
crud.py | ||
migrations.py | ||
models.py | ||
README.md | ||
tasks.py | ||
util.py | ||
views.py | ||
views_api.py |
Subdomains Extension
So the goal of the extension is to allow the owner of a domain to sell subdomains to anyone who is willing to pay some money for it.
Requirements
- Free Cloudflare account
- Cloudflare as a DNS server provider
- Cloudflare TOKEN and Cloudflare zone-ID where the domain is parked
Usage
-
Register at Cloudflare and setup your domain with them. (Just follow instructions they provide...)
-
Change DNS server at your domain registrar to point to Cloudflare's
-
Get Cloudflare zone-ID for your domain
-
Get Cloudflare API TOKEN
-
Open the LNBits subdomains extension and register your domain
-
Click on the button in the table to open the public form that was generated for your domain
- Extension also supports webhooks so you can get notified when someone buys a new subdomain
- Extension also supports webhooks so you can get notified when someone buys a new subdomain
API Endpoints
- Domains
- GET /api/v1/domains
- POST /api/v1/domains
- PUT /api/v1/domains/<domain_id>
- DELETE /api/v1/domains/<domain_id>
- Subdomains
- GET /api/v1/subdomains
- POST /api/v1/subdomains/<domain_id>
- GET /api/v1/subdomains/<payment_hash>
- DELETE /api/v1/subdomains/<subdomain_id>
Cloudflare
- Cloudflare offers programmatic subdomain registration... (create new A record)
- you can keep your existing domain's registrar, you just have to transfer dns records to the cloudflare (free service)
- more information:
- https://api.cloudflare.com/#getting-started-requests
- API endpoints needed for our project:
- api can be used by providing authorization token OR authorization key
- check API Tokens and API Keys : https://api.cloudflare.com/#getting-started-requests
- Cloudflare API postman collection: https://support.cloudflare.com/hc/en-us/articles/115002323852-Using-Cloudflare-API-with-Postman-Collections