Giter Site home page Giter Site logo

b3nac / nostr_keygen Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 343 KB

Probably the easiest way to locally generate Nostr keys. So much punk cybers in this Python script. ๐Ÿ’ปโ˜•

License: MIT License

Python 100.00%
cyberpunk nostr nostr-protocol python python3

nostr_keygen's Introduction

Why

I was looking for the easiest way to generate npub and nsec keys myself locally without a ton of dependencies. There wasn't a solution out there for Python so here we are. Currently planning on building upon this example and adding various features.

Dependencies to run nostr_keygen.py

  1. On Debian/Ubuntu you might need to install

sudo apt install build-essential automake pkg-config libtool libffi-dev

to compile libsecp256k1.

  1. Python3 and what's in the requirements.txt file.

If you have multiple Python versions or are worried about dependency conflicts I recommend using a virtual environment.

python3 -m venv envname

source path/to/env/bin/activate

else:

pip install -r requirements.txt

python3 nostr_keygen.py

Build from source into a binary

pyinstaller --add-data bech32:bech32 --add-binary _cffi_backend.cpython-310-x86_64-linux-gnu.so:. --onefile nostr_keygen.py

What nostr_keygen does currently

The script will print out the npub and nsec address that is randomly generated as well as ascii qrcodes for mobile clients.

In the works

  • Add import private key function
  • Add CLI params for specific output
  • Add a way to generate a specific number of key pairs
  • Add support for NIP-05 via output of nostr.json via CLI param

Support

Please send Satoshis so I can feed my plants

https://getalby.com/p/proudforest149266

nostr_keygen's People

Contributors

b3nac avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.