diff --git a/Cargo.toml b/Cargo.toml index 623e58f..77192ed 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,9 +4,13 @@ version = "0.1.0" edition = "2021" description = "A library for working with BIP329 labels" license = "Apache-2.0" + repository = "https://github.com/bitcoinppl/bip329" keywords = ["bitcoin", "bip329", "labels"] categories = ["bitcoin"] +homepage = "https://github.com/bitcoinppl/bip329" +repository = "https://github.com/bitcoinppl/bip329" +documentation = "https://docs.rs/bip329" [features] default = ["encryption"] diff --git a/README.md b/README.md index c5b78d7..47a21a5 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,18 @@ # bip329 + + A library for working with [BIP329 labels](https://github.com/bitcoin/bips/blob/master/bip-00329.mediawiki). This library provides a way to work with BIP329 labels in a Rust program. -The main data structure is the [`Labels`] struct, which is a list of `Label` structs. +The main data structure is the [`Labels`](https://docs.rs/bip329/latest/bip329/struct.Labels.html) struct, which is a list of [`Label`](https://docs.rs/bip329/latest/bip329/enum.Label.html) structs. -The [`Label`] enum is a discriminated union of all the different types of labels. +The [`Label`](https://docs.rs/bip329/latest/bip329/enum.Label.html) enum is a discriminated union of all the different types of labels. -The [`Labels`] struct can be exported to a JSONL file. +The [`Labels`](https://docs.rs/bip329/latest/bip329/struct.Labels.html) struct can be exported to a JSONL file. -The [`Labels`] struct can be imported from a JSONL file. +The `Labels` struct can be imported from a JSONL file. #### Example Import: ```rust @@ -30,7 +32,7 @@ let labels = Labels::try_from_file("tests/data/labels.jsonl").unwrap(); let jsonl = labels.export().unwrap(); ``` -You can encrypt and decrypt the [`Labels`] into/from the [`encryption::EncryptedLabels`] struct using the `encryption` feature. +You can encrypt and decrypt the `Labels` into/from the [`encryption::EncryptedLabels`](https://docs.rs/bip329/latest/bip329/encryption/struct.EncryptedLabels.html) struct using the `encryption` feature. #### Example encryption: ```rust @@ -41,5 +43,4 @@ let encrypted = EncryptedLabels::encrypt(&labels, "passphrase").unwrap(); let decrypted: Labels = encrypted.decrypt("passphrase").unwrap(); ``` - -License: Apache-2.0 + diff --git a/src/lib.rs b/src/lib.rs index e715c9b..803cc2e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,13 +2,13 @@ //! //! This library provides a way to work with BIP329 labels in a Rust program. //! -//! The main data structure is the [`Labels`] struct, which is a list of `Label` structs. +//! The main data structure is the [`Labels`](crate::Labels) struct, which is a list of [`Label`](crate::Label) structs. //! -//! The [`Label`] enum is a discriminated union of all the different types of labels. +//! The [`Label`](crate::Label) enum is a discriminated union of all the different types of labels. //! -//! The [`Labels`] struct can be exported to a JSONL file. +//! The [`Labels`](crate::Labels) struct can be exported to a JSONL file. //! -//! The [`Labels`] struct can be imported from a JSONL file. +//! The `Labels` struct can be imported from a JSONL file. //! //! ### Example Import: //! ```rust @@ -28,7 +28,7 @@ //! let jsonl = labels.export().unwrap(); //! ``` //! -//! You can encrypt and decrypt the [`Labels`] into/from the [`encryption::EncryptedLabels`] struct using the `encryption` feature. +//! You can encrypt and decrypt the `Labels` into/from the [`encryption::EncryptedLabels`](crate::encryption::EncryptedLabels) struct using the `encryption` feature. //! //! ### Example encryption: //! ```rust