Skip to content

Commit

Permalink
Make documentation look a little nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenperera committed Jul 28, 2024
1 parent f891b60 commit 34e885d
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 28 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog

## [Unreleased]
## [0.1.1] - 2023-07-28

- Documentation formatting

## [0.1.0] - 2023-07-28

- Import and export BIP329 labels from and to JSONL files
- Basic encryption and decryption support
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
authors = ["Praveen Perera <[email protected]>"]
name = "bip329"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "A library for working with BIP329 labels"
license = "Apache-2.0"
Expand Down
19 changes: 5 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,20 @@

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`](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`](https://docs.rs/bip329/latest/bip329/enum.Label.html) enum is a discriminated union of all the different types of labels.

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 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`](https://docs.rs/bip329/latest/bip329/enum.Label.html) enum containing all the different types of labels.
- The [`Labels`](https://docs.rs/bip329/latest/bip329/struct.Labels.html) struct can be imported/exported to/from a JSONL file.
- Supports encryption and decryption using the [`encryption`](https://docs.rs/bip329/latest/bip329/encryption/) module.
- Supports the [`uniffi`](https://github.com/mozilla/uniffi-rs) feature, for easy integration with other languages.

#### Example Import:

```rust
use bip329::Labels;

let labels = Labels::try_from_file("tests/data/labels.jsonl").unwrap();
```

#### Example Export:

```rust
use bip329::Labels;

Expand All @@ -41,10 +35,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`](https://docs.rs/bip329/latest/bip329/encryption/struct.EncryptedLabels.html) struct using the `encryption` feature.

#### Example encryption:

```rust
use bip329::{Labels, encryption::EncryptedLabels};

Expand Down
16 changes: 5 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
//! 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`](crate::Labels) struct, which is a list of [`Label`](crate::Label) structs.
//!
//! The [`Label`](crate::Label) enum is a discriminated union of all the different types of labels.
//!
//! The [`Labels`](crate::Labels) struct can be exported to a JSONL file.
//!
//! The `Labels` struct can be imported from a JSONL file.
//! - The main data structure is the [`Labels`](crate::Labels) struct, which is a list of [`Label`](crate::Label) structs.
//! - The [`Label`](crate::Label) enum containing all the different types of labels.
//! - The [`Labels`](crate::Labels) struct can be imported/exported to/from a JSONL file.
//! - Supports encryption and decryption using the [`encryption`](crate::encryption) module.
//! - Supports the [`uniffi`](https://github.com/mozilla/uniffi-rs) feature, for easy integration with other languages.
//!
//! ### Example Import:
//! ```rust
Expand All @@ -28,8 +24,6 @@
//! let jsonl = labels.export().unwrap();
//! ```
//!
//! You can encrypt and decrypt the `Labels` into/from the [`encryption::EncryptedLabels`](crate::encryption::EncryptedLabels) struct using the `encryption` feature.
//!
//! ### Example encryption:
//! ```rust
//! use bip329::{Labels, encryption::EncryptedLabels};
Expand Down

0 comments on commit 34e885d

Please sign in to comment.