<q-expansion-item
  group="extras"
  icon="info"
  label="Guide"
  :content-inset-level="0.5"
>
  <q-card>
    <p>
      <q-card-section>
        <strong>Usage</strong><br />

        1. Create a Domain by clicking "NEW DOMAIN"\<br />
        2. Fill the options for your DOMAIN<br />
        - select the wallet<br />
        - select the fiat currency the invoice will be denominated in<br />
        - select an amount in fiat to charge users for verification<br />
        - enter the domain (or subdomain) you want to provide verification
        for<br />
        3. You can then use share your signup link with your users to allow them
        to sign up *Note, you must own this domain and have access to a web
        server*
        <br /><br />
        <strong>Installation</strong><br />

        In order for this to work, you need to have ownership of a domain name,
        and access to a web server that this domain is pointed to. Then, you'll
        need to set up a proxy that points
        `https://{your_domain}/.well-known/nostr.json` to
        `https://{your_lnbits}/nostrnip5/api/v1/domain/{domain_id}/nostr.json`
        <br /><br />
        <strong>Example nginx configuration</strong>
        <br />

        <q-card>
          <q-card-section>
            <small class="text-caption">
              proxy_cache_path /tmp/nginx_cache keys_zone=nip5_cache:5m
              levels=1:2 inactive=300s max_size=100m use_temp_path=off;<br />

              location /.well-known/nostr.json {<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_pass
              https://{your_lnbits}/nostrnip5/api/v1/domain/{domain_id}/nostr.json;<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_set_header Host {your_lnbits};<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_ssl_server_name on;<br /><br />

              &nbsp;&nbsp;&nbsp;&nbsp;expires 5m;<br />
              &nbsp;&nbsp;&nbsp;&nbsp;add_header Cache-Control "public,
              no-transform";<br /><br />

              &nbsp;&nbsp;&nbsp;&nbsp;proxy_cache nip5_cache;<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_cache_lock on;<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_cache_valid 200 300s;<br />
              &nbsp;&nbsp;&nbsp;&nbsp;proxy_cache_use_stale error timeout
              invalid_header updating http_500 http_502 http_503 http_504;<br />
              }
            </small>
          </q-card-section>
        </q-card>
      </q-card-section>
    </p>
  </q-card>
</q-expansion-item>

<q-expansion-item
  group="extras"
  icon="api"
  label="API info"
  :content-inset-level="0.5"
>
  <q-btn flat label="Swagger API" type="a" href="../docs#/nostrnip5"></q-btn>
  <q-expansion-item group="api" dense expand-separator label="List Domains">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">GET</span> /nostrnip5/api/v1/domains</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>[&lt;domain_object&gt;, ...]</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}nostrnip5/api/v1/domains -H
          "X-Api-Key: &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item group="api" dense expand-separator label="List Addresses">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">GET</span> /nostrnip5/api/v1/addresses</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>[&lt;address_object&gt;, ...]</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}nostrnip5/api/v1/addresses -H
          "X-Api-Key: &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item group="api" dense expand-separator label="Fetch Domain">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">GET</span>
          /nostrnip5/api/v1/domain/{domain_id}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>{domain_object}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}nostrnip5/api/v1/domain/{domain_id}
          -H "X-Api-Key: &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item group="api" dense expand-separator label="Create Domain">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">POST</span> /nostrnip5/api/v1/domain</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>{domain_object}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url }}nostrnip5/api/v1/domain -H
          "X-Api-Key: &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item group="api" dense expand-separator label="Create Address">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">POST</span>
          /nostrnip5/api/v1/domain/{domain_id}/address</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;invoice_key&gt;}</code><br />
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>{address_object}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url
          }}nostrnip5/api/v1/domain/{domain_id}/address -H "X-Api-Key:
          &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="Create Invoice Payment"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">POST</span>
          /invoices/api/v1/invoice/{invoice_id}/payments</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <code>{payment_object}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url
          }}invoices/api/v1/invoice/{invoice_id}/payments -H "X-Api-Key:
          &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>

  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="Check Invoice Payment Status"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-blue">GET</span>
          /nostrnip5/api/v1/domain/{domain_id}/payments/{payment_hash}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">Body (application/json)</h5>
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 200 OK (application/json)
        </h5>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url
          }}nostrnip5/api/v1/domain/{domain_id}/payments/{payment_hash} -H
          "X-Api-Key: &lt;invoice_key&gt;"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
</q-expansion-item>
