{
  "version": "1",
  "service": {
    "name": "satsdns",
    "description": "Authoritative DNS hosting (DNSSEC-signed, record API), secondary DNS and dynamic-DNS hostnames for agents, paid in sats per order (L402 or Cashu NUT-24); no account needed. Paid routes are validated for free first (name, clash, delegation to our nameservers); an invalid request gets a 4xx and no invoice. Management uses the token returned at purchase; optional Nostr (NIP-98) accounts are free."
  },
  "payment_methods": [
    {
      "type": "lightning",
      "scheme": "L402",
      "challenge_header": "WWW-Authenticate",
      "invoice_issuer_header": "X-L402-Invoice-Issuer",
      "note": "The invoice normally comes from the service's own node. When that node cannot make one, an accepted Cashu mint issues it and X-L402-Invoice-Issuer names the mint; pay it the same way. If no invoice can be made at all, the 402 offers Cashu only, with Retry-After."
    },
    {
      "type": "cashu",
      "spec": "NUT-24",
      "challenge_header": "X-Cashu",
      "unit": "sat",
      "mints": [
        {
          "url": "https://mint.minibits.cash/Bitcoin",
          "input_fee_ppk": 0
        },
        {
          "url": "https://21mint.me",
          "input_fee_ppk": 0
        },
        {
          "url": "https://mint.routstr.com",
          "input_fee_ppk": 0
        },
        {
          "url": "https://forge.flashapp.me",
          "input_fee_ppk": 0
        },
        {
          "url": "https://mint.cashu.chat",
          "input_fee_ppk": 0
        },
        {
          "url": "https://mint.coinos.io",
          "input_fee_ppk": 100
        },
        {
          "url": "https://mint.macadamia.cash",
          "input_fee_ppk": 150
        }
      ],
      "fee_rule": "A token must be worth price + the mint's NUT-02 input fee, ceil(sum of input_fee_ppk over its proofs / 1000) sat (wallets: send with include-fees)."
    }
  ],
  "routes": [
    {
      "path": "/v1/zones/create/30d",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 500,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com (delegated to our nameservers first)"
      },
      "challenge_methods": [
        "HEAD",
        "GET"
      ]
    },
    {
      "path": "/v1/zones/create/1y",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 5000,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com"
      }
    },
    {
      "path": "/v1/zones/renew/30d",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 500,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com"
      },
      "challenge_methods": [
        "HEAD",
        "GET"
      ]
    },
    {
      "path": "/v1/zones/renew/1y",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 5000,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com"
      }
    },
    {
      "path": "/v1/zones/queries/1m",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 200,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com"
      }
    },
    {
      "path": "/v1/ddns/create/30d",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 200,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "hostname": "myhost"
      },
      "challenge_methods": [
        "HEAD",
        "GET"
      ]
    },
    {
      "path": "/v1/ddns/create/1y",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 2000,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "hostname": "myhost"
      }
    },
    {
      "path": "/v1/ddns/renew/30d",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 200,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "hostname": "myhost"
      }
    },
    {
      "path": "/v1/ddns/renew/1y",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 2000,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "hostname": "myhost"
      }
    },
    {
      "path": "/v1/secondary/create/30d",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 500,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com",
        "primaries": [
          "192.0.2.53"
        ]
      },
      "challenge_methods": [
        "HEAD",
        "GET"
      ]
    },
    {
      "path": "/v1/secondary/create/1y",
      "methods": [
        "POST"
      ],
      "price": {
        "amount_sat": 5000,
        "type": "static"
      },
      "macaroon_timeout_secs": 3600,
      "body": {
        "zone": "example.com",
        "primaries": [
          "192.0.2.53"
        ]
      }
    }
  ],
  "free_routes": [
    {
      "path": "/v1/info",
      "methods": [
        "GET"
      ],
      "auth": "none",
      "note": "nameservers, products and prices, limits"
    },
    {
      "path": "/v1/zones/{zone}[/records|/dnssec|/token|/settings|/lnurl|/secondary|/xfr-peers|/transfer]",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "auth": "Authorization: Bearer <zone token>, or the owning account"
    },
    {
      "path": "/v1/ddns/{hostname}[/update|/token|/settings|/lnurl|/transfer]",
      "methods": [
        "GET",
        "POST",
        "PATCH",
        "DELETE"
      ],
      "auth": "Authorization: Bearer <hostname token>, or the owning account"
    },
    {
      "path": "/nic/update",
      "methods": [
        "GET"
      ],
      "auth": "Basic (password = hostname token)",
      "note": "dyndns2"
    },
    {
      "path": "/v1/auth/session, /v1/account[/...], /v1/invoices/{id}",
      "methods": [
        "GET",
        "POST",
        "PUT",
        "PATCH",
        "DELETE"
      ],
      "auth": "Authorization: Nostr <NIP-98 event>, or an API key",
      "note": "optional accounts; orders there get their own invoice"
    },
    {
      "path": "/lnurlp/{pay_id}[/callback]",
      "methods": [
        "GET"
      ],
      "auth": "none",
      "note": "LNURL-pay (LUD-06) to extend a zone or hostname"
    }
  ],
  "challenge_note": "HEAD and GET on routes with challenge_methods answer a cached 402 (the same invoice for about 50 minutes) whose macaroon is bound to POST on that route; pay it and POST the JSON body. Other paid routes answer 405 to HEAD and GET."
}
