lnbits-legend/lnbits/extensions/subdomains
2021-01-03 16:37:13 +01:00
..
templates/subdomains refactored docs 2021-01-03 16:37:13 +01:00
__init__.py moved code for generating new dns name and updating the invoice in database to the invoiceListener 2021-01-02 22:38:28 +01:00
cloudflare.py added checks to the cloudflare if the domain can be created; code refactoring - moved calls to cloudflare to seperate file 2021-01-03 11:22:42 +01:00
config.json prettier formatting 2021-01-02 16:58:03 +01:00
crud.py black formatting 2021-01-03 00:31:02 +01:00
migrations.py black formatting 2020-12-31 18:50:16 +01:00
models.py refactoring & bug fixes 2020-12-31 18:39:16 +01:00
README.md prettier formatting 2021-01-02 16:58:03 +01:00
tasks.py added checks to the cloudflare if the domain can be created; code refactoring - moved calls to cloudflare to seperate file 2021-01-03 11:22:42 +01:00
util.py checks before creating new subdomain 2021-01-03 00:26:33 +01:00
views_api.py black formatting 2021-01-03 11:28:23 +01:00
views.py black formatting 2020-12-31 18:50:16 +01:00

Subdomains Extension

So the goal of the extension is to allow the owner of a domain to sell their subdomain to the 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

  1. Register at cloudflare and setup your domain with them. (Just follow instructions they provide...)
  2. Change DNS server at your domain registrar to point to cloudflare's
  3. Get Cloudflare zoneID for your domain
  4. get Cloudflare API TOKEN
  5. Open the lnbits subdomains extension and register your domain with lnbits
  6. 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 domain

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>

Useful

Cloudflare