| Crates.io | bitcoin-blob |
| lib.rs | bitcoin-blob |
| version | 0.1.18 |
| created_at | 2025-07-09 00:40:55.20378+00 |
| updated_at | 2025-07-09 00:40:55.20378+00 |
| description | Rust library for defining and manipulating fixed-size opaque byte blobs with serialization, deserialization, hex conversion, and byte iteration capability. |
| homepage | |
| repository | https://github.com/klebs6/bitcoin-rs |
| max_upload_size | |
| id | 1743744 |
| size | 250,180 |
bitcoin-blob is a highly specialized Rust library designed to handle fixed-size, opaque byte arrays known as blobs. It provides extensive functionality for iterating, serializing, deserializing, hex encoding/decoding, and more.
Below is an example of how to define and use a 256-bit blob:
#[macro_use]
extern crate bitcoin_blob;
base_blob!(BaseBlob256, 256, 32);
fn main() {
let mut blob = BaseBlob256::zero();
blob.set_hex_from_str("abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890");
println!("Hex: {}", blob.to_string());
}
For comprehensive examples and detailed information on each macro, refer to the documentation.
bitcoin-blob is licensed under the MIT License.
Disclaimer: This README.md was generated by an AI model and may not be 100% accurate; however, it should be pretty good.