{"id":28172849,"url":"https://github.com/jalfr3d/hex-to-wif","last_synced_at":"2025-08-24T16:32:12.888Z","repository":{"id":293516022,"uuid":"971684032","full_name":"jalfr3d/hex-to-wif","owner":"jalfr3d","description":"I don't trust online website that offer to do this and prefer to do it offline. ","archived":false,"fork":false,"pushed_at":"2025-05-15T17:54:22.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T18:45:59.464Z","etag":null,"topics":["btc-tool","hex","hextowif","import-wallet","private-key","python","script","wif"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jalfr3d.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-04-23T22:45:42.000Z","updated_at":"2025-05-15T17:54:25.000Z","dependencies_parsed_at":"2025-05-15T18:46:02.182Z","dependency_job_id":"94a4e7da-8f68-4ce2-a237-29a9b7d31e71","html_url":"https://github.com/jalfr3d/hex-to-wif","commit_stats":null,"previous_names":["jalfr3d/hex-to-wif"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jalfr3d/hex-to-wif","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fhex-to-wif","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fhex-to-wif/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fhex-to-wif/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fhex-to-wif/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jalfr3d","download_url":"https://codeload.github.com/jalfr3d/hex-to-wif/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jalfr3d%2Fhex-to-wif/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271902273,"owners_count":24841171,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["btc-tool","hex","hextowif","import-wallet","private-key","python","script","wif"],"created_at":"2025-05-15T20:11:13.421Z","updated_at":"2025-08-24T16:32:12.856Z","avatar_url":"https://github.com/jalfr3d.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔐 BTC HEX to WIF Private Key Converter\n\nThis simple Python script converts a **Bitcoin private key in hexadecimal (HEX)** format into **WIF (Wallet Import Format)**. It supports both **compressed** and **uncompressed** formats.\n\n## 📜 What It Does\n\n- Takes a private key in HEX format (e.g., `730FC235C1942C1AE`)\n- Pads it to 32 bytes if necessary\n- Converts it to the WIF format\n- Prints the WIF private key string\n\n## 🧪 Example\n\n```python\nimport hashlib\nimport base58\n\ndef private_key_to_wif(hex_key, compressed=True):\n    prefix = b'\\x80'\n    key_bytes = bytes.fromhex(hex_key)\n    if compressed:\n        key_bytes += b'\\x01'\n    extended_key = prefix + key_bytes\n    checksum = hashlib.sha256(hashlib.sha256(extended_key).digest()).digest()[:4]\n    wif = base58.b58encode(extended_key + checksum)\n    return wif.decode()\n\n# Example usage:\nhex_priv = \"730FC235C1942C1AE\"\nhex_priv = hex_priv.rjust(64, '0')  # pad with zeros to full 32 bytes\nwif = private_key_to_wif(hex_priv)\nprint(wif)\n```\n\n## 🧾 Output\n```\nL4RjWUyUf1Gc...  (your WIF key will vary)\n```\n\n## ⚙️ Requirements\nNo external dependencies! Just Python's standard library:\n-hashlib\n-base58 (make sure to install this with pip)\n\n```\npip install base58\n```\n## 🔧 Options\nSet compressed=False to generate an uncompressed WIF key.\n\nEnsure your private key is exactly 64 hex characters (32 bytes). The script automatically pads it if it's shorter.\n\n## 📂 Use Cases\n- Brute-force or puzzle-solving workflows\n- Key conversions during wallet development\n- Educational purposes\n\n## 🔒 Disclaimer\nThis script is for educational and research purposes only. Use responsibly. Do not use on live/private wallets unless you understand what you're doing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalfr3d%2Fhex-to-wif","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjalfr3d%2Fhex-to-wif","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjalfr3d%2Fhex-to-wif/lists"}