Merge pull request #1258 from lnbits/nip05linkinstructions

Added docs to nostrnip05
This commit is contained in:
Arc 2022-12-29 23:39:14 +00:00 committed by GitHub
commit 9b9ecfb913
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 73 additions and 2 deletions

View File

@ -1,9 +1,73 @@
<q-expansion-item
group="extras"
icon="swap_vertical_circle"
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>

View File

@ -163,6 +163,12 @@
<h6 class="text-subtitle1 q-my-none">
{{SITE_TITLE}} Nostr NIP-5 extension
</h6>
<p>
<strong
>Allow users to NIP-05 verify themselves at a domain you
control</strong
>
</p>
</q-card-section>
<q-card-section class="q-pa-none">
<q-separator></q-separator>

View File

@ -39,7 +39,8 @@ context %} {% block page %}
<b
>{{ "{:0,.2f}".format(domain.amount / 100) }} {{ domain.currency }}</b
>
for a <b>lifetime</b> account.
for an account (if you do not own the domain, the service provider can
disable at any time).
</p>
<p>After submitting payment, your address will be</p>