rust-bitcoin-unsafe-fast/units
merge-script 6501b0d781
Merge rust-bitcoin/rust-bitcoin#3666: Implement serde modules for `FeeRate`
f5eb8f4747 api: Run just check-api (Tobin C. Harding)
472b1d3ff3 units: Add serde regression test (Tobin C. Harding)
dedae8acf2 Implement custom serde modules for FeeRate (Tobin C. Harding)
d94e5f03e6 Move fee_rate.rs to module (Tobin C. Harding)
c3c1f6f82d Add missing license comment to test file (Tobin C. Harding)

Pull request description:

  Implement and enforce explicit unit when serializing. This is as we do for `Amount` (see #3672 for similar).

  To test it, and as part of the 1.0 effort; add regression tests for `serde` stuff in `units`.

  With this applied one must use attributes to serialize `FeeRate`.

  ```rust
      #[derive(Serialize, Deserialize)]
      pub struct Foo {
          #[serde(with = "bitcoin_units::fee_rate::serde::as_sat_per_kwu")]
          pub fee_rate: FeeRate,
      }
  ```

ACKs for top commit:
  apoelstra:
    ACK f5eb8f4747a7cd303cad2b7f8f442bb31862c52a; successfully ran local tests; great idea!

Tree-SHA512: 0968ead568b1e3142efd4c0e856192ddde0f441de84215cbb0950b60a56922f1abaf6d4ccfe243b722a6883c0a927d26bcfba979acf3ca84c4f21baba73af764
2025-01-03 16:31:34 +00:00
..
contrib Add Arbitrary dependency 2024-08-23 15:39:20 -05:00
src Merge rust-bitcoin/rust-bitcoin#3666: Implement serde modules for `FeeRate` 2025-01-03 16:31:34 +00:00
tests units: Add serde regression test 2024-12-28 08:15:13 +11:00
CHANGELOG.md bitcoin: Bump version to v0.33.0-alpha.0 2024-12-04 15:58:36 +11:00
Cargo.toml units: Add serde regression test 2024-12-28 08:15:13 +11:00
README.md Bump MSRV to 1.63 2024-07-27 07:24:32 +02:00

README.md

Bitcoin Units

This crate provides basic Bitcoin numeric units such as Amount.

Minimum Supported Rust Version (MSRV)

This library should always compile with any combination of features on Rust 1.63.0.

Licensing

The code in this project is licensed under the Creative Commons CC0 1.0 Universal license. We use the SPDX license list and SPDX IDs.