{"id":24809535,"url":"https://github.com/eroydev/bip39-rusty","last_synced_at":"2026-02-22T00:36:40.974Z","repository":{"id":273191560,"uuid":"918435012","full_name":"ERoydev/bip39-rusty","owner":"ERoydev","description":"Rust library for BIP-39 mnemonic system","archived":false,"fork":false,"pushed_at":"2025-04-16T05:51:31.000Z","size":180,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-31T18:04:30.150Z","etag":null,"topics":["bip39","bitcoin","cryptocurrency","cryptography","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/ERoydev.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-01-17T23:40:13.000Z","updated_at":"2025-04-16T05:51:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"ab130b56-bdb3-4cfc-876c-38f212528696","html_url":"https://github.com/ERoydev/bip39-rusty","commit_stats":null,"previous_names":["eroydev/bip39-rusty"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ERoydev/bip39-rusty","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Fbip39-rusty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Fbip39-rusty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Fbip39-rusty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Fbip39-rusty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ERoydev","download_url":"https://codeload.github.com/ERoydev/bip39-rusty/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ERoydev%2Fbip39-rusty/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014793,"owners_count":26085594,"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-10-13T02:00:06.723Z","response_time":61,"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":["bip39","bitcoin","cryptocurrency","cryptography","rust"],"created_at":"2025-01-30T11:14:33.529Z","updated_at":"2025-10-13T11:31:21.310Z","avatar_url":"https://github.com/ERoydev.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BIP-39 Implementation in Rust\r\n\r\nCrate Url: https://crates.io/crates/bip39-rusty\r\n\r\nThis repository contains a custom implementation of the BIP-39 standard in Rust. The implementation allows for the generation of mnemonic phrases based on entropy, checksum, and wordlists. It supports multiple languages and mnemonic types (128-bit and 256-bit entropy).\r\nI Developed this to simplify using the bip39 more easily in rust than the current bip39 that i found. The code is easy to understand and well documented, feel free to suggest improvements :)\r\n## Features\r\n\r\n- **Entropy Generation**: Generate random entropy with secure randomness.\r\n- **Checksum Calculation**: Append a checksum based on the entropy.\r\n- **Mnemonic Phrase Generation**: Convert entropy to mnemonic phrases using predefined wordlists.\r\n- **Language Support**: Extendable to multiple languages.\r\n\r\n## Installation\r\n\r\n1. Clone the repository:\r\n   ```bash\r\n   git clone https://github.com/your-username/bip39-rust.git\r\n   \r\n   \r\n   cd bip39-rust\r\n   ```\r\n\r\n2. Ensure you have Rust installed. If not, install it using [rustup](https://rustup.rs/):\r\n\r\n\r\n3. Build the project:\r\n   ```bash\r\n   cargo build\r\n   ```\r\n\r\n4. Run the tests:\r\n   ```bash\r\n   cargo test\r\n   ```\r\n\r\n## Usage\r\n\r\nHere is an example of how to use the library to generate a mnemonic phrase:\r\n\r\n```rust\r\nuse bip39_rusty::{Mnemonic, Language, MnemonicType};\r\n\r\nfn main() {\r\n    /*\r\n        Demonstrating the use of the bip39-rusty library to generate a BIP39 mnemonic phrase.\r\n\r\n        The `Mnemonic` struct expects:\r\n            - Language (e.g., Language::English)\r\n            - MnemonicType (e.g., Bits128 or Bits256)\r\n\r\n        Once created, you can use the following getter method:\r\n            - .mnemonic_phrase() =\u003e Returns the generated mnemonic phrase as a Vec\u003cString\u003e.\r\n\r\n        Note: If any internal error occurs during mnemonic generation,\r\n              the library will return a default Mnemonic with 256 bits and Language::English type.\r\n    */\r\n\r\n    // Create a new mnemonic\r\n    let mnemonic = Mnemonic::new(Language::English, MnemonicType::Bits256);\r\n\r\n    // Display the mnemonic phrases\r\n    println!(\"Generated Mnemonic Phrase: {:?}\", mnemonic.mnemonic_phrase());\r\n\r\n    // validate the checksum\r\n    let validation_result = mnemonic.validate_checksum();\r\n\r\n    match validation_result {\r\n        Ok(value) =\u003e {\r\n            println!(\"Its valid\")\r\n        }\r\n        Err(e) =\u003e {\r\n            println!(\"Not valid\")\r\n        }\r\n    }\r\n\r\n}\r\n```\r\n\r\n## Library Structure\r\n\r\n### Mnemonic\r\n- Represents a BIP-39 mnemonic phrase.\r\n- Fields:\r\n  - `lang`: Language for the wordlist.\r\n  - `mnemonic_type`: Type of mnemonic.\r\n  - `entropy`: Generated entropy bytes. \r\n  - `checksum`: Checksum appended to entropy. \r\n  - `mnemonic_phrase`: List of words representing the mnemonic phrase. \r\n\r\n### MnemonicType\r\n- Enum representing the type of mnemonic:\r\n  - `Bits128`: 128-bit entropy (12 words).\r\n  - `Bits256`: 256-bit entropy (24 words).\r\n\r\n### Language\r\n- Represents the wordlist language. You can add custom wordlists by extending this module.\r\n```rust\r\npub enum Language {\r\n    ChineseSimplified,\r\n    ChineseTraditional,\r\n    Czech,\r\n    English,\r\n    French,\r\n    Italian,\r\n    Japanese,\r\n    Korean,\r\n    Portuguese,\r\n    Spanish\r\n}\r\n```\r\n## Wordlist Support\r\n\r\nThe `Language` module provides predefined wordlists. Currently supported:\r\n- English\r\n- Chinese Simplified\r\n- Chinese Traditional\r\n- Korean\r\n- Japanese\r\n- French\r\n- Czech\r\n- Italian\r\n- Portuguese\r\n- Spanish\r\n\r\nTo add more languages, implement the wordlist in the `Language` module.\r\n\r\n## Contributing\r\n\r\nContributions are welcome! If you have a feature request, bug report, or want to contribute code, please open an issue or a pull request.\r\n\r\n### Steps to Contribute\r\n1. Fork the repository.\r\n2. Create a feature branch:\r\n   ```bash\r\n   git checkout -b feature-name\r\n   ```\r\n3. Commit your changes:\r\n   ```bash\r\n   git commit -m \"Add feature-name\"\r\n   ```\r\n4. Push to your branch:\r\n   ```bash\r\n   git push origin feature-name\r\n   ```\r\n5. Open a pull request.\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\r\n\r\n---\r\n\r\nFeel free to explore, modify, and use this library as per your requirements. Happy coding!\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feroydev%2Fbip39-rusty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feroydev%2Fbip39-rusty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feroydev%2Fbip39-rusty/lists"}