diff --git a/Cargo.toml b/Cargo.toml index 5a1734c..dedaa9a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["RSS Blue", "Dovydas Joksas"] name = "v4v" -version = "0.5.2" +version = "0.5.3" edition = "2021" description = "Value-for-value helper utilities for Podcasting 2.0" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index 9cba5ff..cf31532 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,28 @@ A set of helper functions for dealing with value-for-value (V4V) calculations an Modules include -- [alby] for dealing with Alby's API. - [pc20] for Podcasting 2.0-specific functions, including those related to [sat calculations](pc20::calc), [V4V payments](pc20::payments), and [sat forwarding](pc20::forwarding). +- [alby] for interacting with [Alby](https://getalby.com)'s API. Check out [docs.rs](https://docs.rs/v4v) for all available functions. + +## Example + +```rust +let splits = vec![1, 99]; +let total_sats = 10; +// The crate ensures that +// - even after rounding, the total number of sats is preserved +// - if possible, everyone gets at least 1 sat (and thus their own TLV record) +assert_eq!(v4v::pc20::calc::compute_sat_recipients(&splits, total_sats), vec![1, 9]); +``` + +## Install + +```text +cargo add v4v +``` + +## Contribute + +Please feel free to contribute by submitting a PR on [GitHub](https://github.com/rssblue/v4v).