lnbits-legend/lnbits/extensions/subdomains
2021-06-20 21:17:32 -03:00
..
templates/subdomains subdomain: guard allowed_record_types type. 2021-05-15 11:06:35 -03:00
__init__.py remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00
cloudflare.py remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00
config.json prettier formatting 2021-01-02 16:58:03 +01:00
crud.py fix some of mypy complaints. 2021-04-10 18:06:41 -03: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 Documentation Updates (#202) 2021-06-09 12:07:42 -03:00
tasks.py add trio typing. 2021-06-20 21:17:32 -03:00
util.py checks before creating new subdomain 2021-01-03 00:26:33 +01:00
views_api.py catch errors in multiple places that might be destroying the async flow and causing lnbits to die silently. 2021-04-10 17:37:48 -03:00
views.py remove exception to black line-length and reformat. 2021-03-24 00:40:32 -03:00

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.

video tutorial livestream

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 zone-ID for your domain

  4. Get Cloudflare API TOKEN

  5. Open the LNBits subdomains extension and register your domain

  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 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