Skip to content

Commit

Permalink
improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
joksas committed Aug 21, 2024
1 parent 1f860d6 commit 187e533
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

0 comments on commit 187e533

Please sign in to comment.