Crates.io | bip329 |
lib.rs | bip329 |
version | 0.1.1 |
source | src |
created_at | 2024-07-28 20:07:17.788072 |
updated_at | 2024-07-28 20:50:52.431917 |
description | A library for working with BIP329 labels |
homepage | https://github.com/bitcoinppl/bip329 |
repository | https://github.com/bitcoinppl/bip329 |
max_upload_size | |
id | 1318211 |
size | 50,300 |
A library for working with BIP329 labels.
Labels
struct, which is a list of Label
structs.Label
enum containing all the different types of labels.Labels
struct can be imported/exported to/from a JSONL file.encryption
module.uniffi
feature, for easy integration with other languages.use bip329::Labels;
let labels = Labels::try_from_file("tests/data/labels.jsonl").unwrap();
use bip329::Labels;
// Create a Labels struct
let labels = Labels::try_from_file("tests/data/labels.jsonl").unwrap();
// Create a JSONL string
let jsonl = labels.export().unwrap();
use bip329::{Labels, encryption::EncryptedLabels};
let labels = Labels::try_from_file("tests/data/labels.jsonl").unwrap();
let encrypted = EncryptedLabels::encrypt(&labels, "passphrase").unwrap();
let decrypted: Labels = encrypted.decrypt("passphrase").unwrap();