nip05er
High five users by adding them to nostr.json which is used to validate their nip05 address if it matches user@your.domain. The term "nip05er" is an abbreviation of "nip05 user."
-
This works withou any necessary web-interface or separate database. The user is never required to fill out a separate form. All they do is set up their nip-05 the way they want to, in the app of their choice. The script will record which users registered a name and ensure the user keeps that name. All of the concerns about the UX remain in the nostr client and there is no additional fees for shorter names. It's a first come first serve basis.
-
The script operates on an nostr.json file in-place, and maintains all of your manual modifications. However, you should make regular backups and periodically review the resulting nostr.json, just in-case there are any unforseen issues with this lightly tested script that you got for free. 🙃
reports
Helper script to show all NIP-1984 reports on local users by local users.
installation
pip install --upgrade pip
pip install bleetube-nip05er
configure secrets
We automatically read database connection parameters from an environment file named .env by default:
DB_HOST=/var/run/postgresql
DB_PORT=5432
DB_NAME=nostream
DB_USER=nostream
DB_PASSWORD='hunter2'
RELAY_DOMAIN=bitcoiner.social
NIP05ER_JSON=/var/www/html/.well-known/nostr.json
NIP05ER_DATA=/var/cache/nip05er
NIP05ER_LOG_PATH=/var/log/nip05er.log
The last couple variables are unique to this script. The rest overlap with what you would already have configured in a docker-compose environment file.
running
nip05er update
troubleshooting
You can have the script dump all the environment variables:
nip05er update --showvars
Development
Clone the repo and install dependencies into a local virtual environment:
git clone git@github.com/bleetube/nip05er
cd nip05er
python -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install --editable .
nip05er update
reports show
todo:
- Remove names if they no longer appear in the user's profile.
- We should also check external relays because the client isn't guaranteed to have broadcast the profile to our local relay.
- When checking external relays, we should use only the most recent event
Metadata
Release files for bleetube-nip05er 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bleetube_nip05er-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for bleetube_nip05er-0.1.3-py3-none-any.whl |
Release files / bleetube_nip05er-0.1.3-py3-none-any.whl
| Download URL | bleetube_nip05er-0.1.3-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
26ae3cd90b03feb9888344ab9d11c745b19baef3b67c808cf698227d469a88ae
|
|
BLAKE2b-256 checksum How to use checksums |
84fcfdf611fa9b80d32880b9f0437a076b103186b453b66de4e9d33252a0565d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for bleetube-nip05er 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.