Skip to main content

Internal devops tool for managing inventory of collectors

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bleetube_nip05er-0.1.3-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file bleetube_nip05er-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for bleetube_nip05er-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 26ae3cd90b03feb9888344ab9d11c745b19baef3b67c808cf698227d469a88ae
MD5 46d15d8c7bf5969be83e3dc47007ffc4
BLAKE2b-256 84fcfdf611fa9b80d32880b9f0437a076b103186b453b66de4e9d33252a0565d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page