| Crates.io | bech32-utils |
| lib.rs | bech32-utils |
| version | 0.2.0 |
| created_at | 2024-03-29 14:10:03.473245+00 |
| updated_at | 2024-03-29 14:10:03.473245+00 |
| description | A CLI tool for converting Bech32 addresses with different prefixes. |
| homepage | |
| repository | https://github.com/mbbrainz/bech32-utils |
| max_upload_size | |
| id | 1190144 |
| size | 69,572 |
bech32-utils is a command-line tool written in Rust that allows you to transform any Bech32 prefixed address into another address with a different prefix. It's designed to be simple, efficient, and easy to use.
To install bech32-utils, you need to have Rust and Cargo installed on your machine. If you don't have them installed, please follow the instructions here: Install Rust.
Once Rust and Cargo are installed, you can install bech32-utils by cloning the repository and building the project:
git clone https://github.com/mbbrainz/bech32-utils.git
cd bech32-utils
cargo build --release
The built binary will be located at target/release/bech32-utils.
To use bech32-utils, you need to provide the original Bech32 address and the prefix you want to convert it to. The tool also accepts an optional derivation path.
./bech32-utils single <address> <new_prefix> [derivation_path]
Or what you can do is use a csv file with records like the following <ADDRESS>,[..<EXTRA_INFO>] (e.g. pasg000000000000000000000000000000000000000,1231241,staker,69,420)
./bech32-utils convert-csv <INPUT_DIR> <OUTPUT_DIR> <PREFIX>
<address>: The original Bech32 address you want to convert.<new_prefix>: The new prefix for the address.[derivation_path]: Optional. The derivation path if applicable.Convert an address to a new prefix:
./bech32-utils bc1qp... zil1
Convert an address to a new prefix with a derivation path:
./bech32-utils bc1qp... zil1 m/44'/0'/0'/0/0
Contributions are what make the open-source community such a fantastic place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
to run the cli commands from source run
cargo run -- single <ADDRESS> <PREFIX>
Distributed under the MIT License. See LICENSE for more information.
Maurits Bos - maurits.bos@gmail.com
Project Link: https://github.com/mbbrainz/bech32-utils