BIP329
A library for working with BIP329 labels.
- The main data structure is the
Labelsstruct, which is a list ofLabelstructs. - The
Labelenum containing all the different types of labels. - The
Labelsstruct can be imported/exported to/from a JSONL file. - Supports encryption and decryption using the
encryptionmodule. - Supports the
uniffifeature, for easy integration with other languages.
Example Import:
use Labels;
let labels = try_from_file.unwrap;
Example Export:
use Labels;
// Create a Labels struct
let labels = try_from_file.unwrap;
// Create a JSONL string
let jsonl = labels.export.unwrap;
Example encryption:
use ;
let labels = try_from_file.unwrap;
let encrypted = encrypt.unwrap;
let encrypted = read_from_file.unwrap;
let decrypted = encrypted.decrypt.unwrap;
assert_eq!;