{"id":13832874,"url":"https://github.com/grunch/rana","last_synced_at":"2025-04-13T02:11:52.286Z","repository":{"id":62321537,"uuid":"557508220","full_name":"grunch/rana","owner":"grunch","description":"Nostr public key mining tool","archived":false,"fork":false,"pushed_at":"2024-03-01T20:55:30.000Z","size":216,"stargazers_count":249,"open_issues_count":3,"forks_count":34,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-05-03T02:10:29.062Z","etag":null,"topics":["mining","nostr","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grunch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-25T20:18:02.000Z","updated_at":"2024-05-29T23:55:57.006Z","dependencies_parsed_at":"2024-01-13T16:36:25.384Z","dependency_job_id":"52c80945-cad0-45a4-9229-a2da4f43041e","html_url":"https://github.com/grunch/rana","commit_stats":{"total_commits":95,"total_committers":12,"mean_commits":7.916666666666667,"dds":0.5789473684210527,"last_synced_commit":"562295d7055072e163f16244dbea3d8a89508834"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Frana","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Frana/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Frana/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grunch%2Frana/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grunch","download_url":"https://codeload.github.com/grunch/rana/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248654089,"owners_count":21140236,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mining","nostr","rust"],"created_at":"2024-08-04T11:00:32.545Z","updated_at":"2025-04-13T02:11:52.260Z","avatar_url":"https://github.com/grunch.png","language":"Rust","readme":"# Rana 🐸\n\n![Rana](rana.png)\n\nMine public keys that can be used with nostr.\n\nThis is based on [nip13](https://github.com/nostr-protocol/nips/blob/master/13.md) example.\n\nProvide the desired difficulty or the vanity prefix as arguments. See below.\n\n## Requirements:\n\n0. You need Rust version 1.64 or higher to compile.\n\n## Install\n\nUsing Cargo to install (requires ~/.cargo/bin to be in PATH)\n\n```bash\ncargo install rana\n```\n\n### Compile and execute it:\n\nTo compile on Ubuntu/Pop!\\_OS/Debian, please install [cargo](https://www.rust-lang.org/tools/install), then run the following commands:\n\n```bash\nsudo apt update\nsudo apt install -y cmake build-essential\n```\n\nThen clone the repo, build and run:\n\n```bash\ngit clone https://github.com/grunch/rana.git\ncd rana\ncargo run --release\n```\n\nBy default it will generate a public key with a difficulty of `10` but you can customize its difficulty or vanity prefix with the proper parameters.\n\nUsage:\n\n```\nOptions:\n  -d, --difficulty \u003cDIFFICULTY\u003e\n          Enter the number of starting bits that should be 0. [default: 10]\n  -v, --vanity \u003cVANITY_PREFIX\u003e\n          Enter the prefix your public key should have when expressed\n          as hexadecimal.\n  -n, --vanity-n-prefix \u003cVANITY_NPUB_PREFIXES_RAW_INPUT\u003e\n          Enter the prefix your public key should have when expressed\n          in npub format (Bech32 encoding). Specify multiple vanity\n          targets as a comma-separated list.\n  -s, --vanity-n-suffix \u003cVANITY_NPUB_SUFFIXES_RAW_INPUT\u003e\n          Enter the suffix your public key should have when expressed\n          in npub format (Bech32 encoding). Specify multiple vanity\n          targets as a comma-separated list.\n  -c, --cores \u003cNUM_CORES\u003e\n          Number of processor cores to use\n  -r, --restore \u003cMNEMONIC_PHRASE\u003e\n          Restore from mnemonic to public private key\n  -g, --generate \u003cWORD_COUNT\u003e\n          Word count of mnemonic to be generated. Should be either 12,18 or 24\n  -p, --passphrase \u003cWORD_COUNT\u003e\n          Passphrase used for restoring mnemonic to keypair\n  -q, --qr\n          Print QR code of the private key\n  -w, --verbose_output\n          Print verbose ouput of non-matching public keys\n```\n\nExamples:\n\n```bash\ncargo run --release -- --difficulty=20\n\n# Vanity only accepts hexadecimal values. DEAD corresponds to https://www.hexdictionary.com/hex/DEAD, not an example username string.\ncargo run --release -- --vanity=dead\n\ncargo run --release -- --vanity-n-prefix=rana\n\ncargo run --release -- --vanity-n-prefix=rana,h0dl,n0strfan\n\ncargo run --release -- -n=rana,h0dl,n0strfan\n\ncargo run --release -- --vanity-n-suffix=ranaend\n\n# You can combine prefix and suffix\ncargo run --release -- -n=rana,h0dl,n0strfan -s theend,end\n\n# Generate key pair with 12 words mnemonic\ncargo run --release -- -g 12\n\n# Restore key pair from mnemonic. Use quotes and separate each word with a space\ncargo run --release -- -r \"congress evoke onion donate fantasy soccer project fiction envelope body faith mean\"\n```\n\nIf you have it installed with `cargo install`:\n\n```bash\nrana --difficulty=20\n\nrana --vanity=dead\n\nrana --vanity-n-prefix=rana\n\nrana -n=rana,h0dl,n0strfan\n\nrana -n=rana,h0dl,n0strfan -s theend,end\n```\n\nKeep in mind that you cannot specify a difficulty and a vanity prefix at the same time.\nAlso, the more requirements you have, the longer it will take to reach a satisfactory public key.\n\n### Searching for multiple vanity targets at once\n\nSpecifying multiple `vanity-n-*` targets allows you to leverage the work you've already done to generate each new `npub` candidate. Searching a candidate `npub` for additional targets is incredibly fast because it's just a trivial string compare.\n\nStatistically speaking, searching for `rana,h0dl` should take half the time that searching for `rana` and then doing a second, separate search for `hodl` would take.\n","funding_links":[],"categories":["Vanity pubkey mining"],"sub_categories":["Client reviews and/or comparisons"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunch%2Frana","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrunch%2Frana","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrunch%2Frana/lists"}