<q-expansion-item
  group="extras"
  icon="swap_vertical_circle"
  label="About lnAddress"
  :content-inset-level="0.5"
>
  <q-card>
    <q-card-section>
      <h5 class="text-subtitle1 q-my-none">
        lnAddress: Get paid sats to sell lightning addresses on your domains
      </h5>
      <p>
        Charge people for using your domain name...<br />

        <a
          href="https://github.com/lnbits/lnbits-legend/tree/main/lnbits/extensions/lnaddress"
          >More details</a
        >
        <br />
        <small>
          Created by,
          <a href="https://twitter.com/talvasconcelos">talvasconcelos</a></small
        >
      </p>
    </q-card-section>
  </q-card>
</q-expansion-item>
<q-expansion-item
  group="extras"
  icon="swap_vertical_circle"
  label="API info"
  :content-inset-level="0.5"
>
  <q-btn flat label="Swagger API" type="a" href="../docs#/lnaddress"></q-btn>
  <q-expansion-item group="api" dense expand-separator label="GET domains">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          lnaddress/api/v1/domains</code
        >
        <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>JSON list of users</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}lnaddress/api/v1/domains -H
          "X-Api-Key: {{ user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="POST domain">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-green">POST</span>
          /lnAddress/api/v1/domains</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code
          >{"X-Api-Key": &lt;string&gt;, "Content-type":
          "application/json"}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Body (application/json) - "wallet" is a YOUR wallet ID
        </h5>
        <code
          >{"wallet": &lt;string&gt;, "domain": &lt;string&gt;, "cf_token":
          &lt;string&gt;,"cf_zone_id": &lt;string&gt;,"webhook": &lt;Optional
          string&gt; ,"cost": &lt;integer&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">
          Returns 201 CREATED (application/json)
        </h5>
        <code
          >{"id": &lt;string&gt;, "wallet": &lt;string&gt;, "domain":
          &lt;string&gt;, "webhook": &lt;string&gt;, "cf_token": &lt;string&gt;,
          "cf_zone_id": &lt;string&gt;, "cost": &lt;integer&gt;}</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url }}lnaddress/api/v1/domains -d
          '{"wallet": "{{ user.wallets[0].id }}", "domain": &lt;string&gt;,
          "cf_token": &lt;string&gt;,"cf_zone_id": &lt;string&gt;,"webhook":
          &lt;Optional string&gt; ,"cost": &lt;integer&gt;}' -H "X-Api-Key: {{
          user.wallets[0].inkey }}" -H "Content-type: application/json"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="DELETE domain">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-red">DELETE</span>
          /lnaddress/api/v1/domains/&lt;domain_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X DELETE {{ request.base_url
          }}lnaddress/api/v1/domains/&lt;domain_id&gt; -H "X-Api-Key: {{
          user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="GET addresses">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          lnaddress/api/v1/addresses</code
        >
        <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>JSON list of addresses</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url }}lnaddress/api/v1/addresses -H
          "X-Api-Key: {{ user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item group="api" dense expand-separator label="GET address info">
    <q-card>
      <q-card-section>
        <code
          ><span class="text-light-blue">GET</span>
          lnaddress/api/v1/address/&lt;domain&gt;/&lt;username&gt;/&lt;wallet_key&gt;</code
        >
        <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>JSON list of addresses</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X GET {{ request.base_url
          }}lnaddress/api/v1/address/&lt;domain&gt;/&lt;username&gt;/&lt;wallet_key&gt;
          -H "X-Api-Key: {{ user.wallets[0].inkey }}"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
  <q-expansion-item
    group="api"
    dense
    expand-separator
    label="POST address"
    class="q-pb-md"
  >
    <q-card>
      <q-card-section>
        <code
          ><span class="text-green">POST</span>
          /lnaddress/api/v1/address/&lt;domain_id&gt;</code
        >
        <h5 class="text-caption q-mt-sm q-mb-none">Headers</h5>
        <code>{"X-Api-Key": &lt;string&gt;}</code>
        <h5 class="text-caption q-mt-sm q-mb-none">Curl example</h5>
        <code
          >curl -X POST {{ request.base_url
          }}lnaddress/api/v1/address/&lt;domain_id&gt; -d '{"domain":
          &lt;string&gt;, "username": &lt;string&gt;,"email": &lt;Optional
          string&gt;, "wallet_endpoint": &lt;string&gt;, "wallet_key":
          &lt;string&gt;, "sats": &lt;integer&gt; "duration": &lt;integer&gt;,}'
          -H "X-Api-Key: {{ user.wallets[0].inkey }}" -H "Content-type:
          application/json"
        </code>
      </q-card-section>
    </q-card>
  </q-expansion-item>
</q-expansion-item>
