Changelog¶
All notable changes to dash-num will be documented in this file.
The format is based on Keep a Changelog, and this crate adheres to Semantic Versioning.
Unreleased¶
Added¶
CompactTarget::block_proof, the work contributed by a block with that target, zero for negative, overflowing or zero targets.from_hex_lossyforHashBlob,make_hash!types andArith256, an infallible parse of the leading hex digits of a string, matching the reference implementation.u64operands forArith256:+=,-=,|=,^=,/,/=,==and!=. Inferred operands such asa == x.into()may now need a type annotation.From<&T>conversions intoArith256from&u8through&u128and&Hash256, andFrom<&Arith256>forHash256.
Changed¶
HashBlob,make_hash!types andArith256serialize as their little-endian storage bytes for machine-readable formats, JSON retains hex encoded big-endian string encoding.CompactTarget::from_strrequires exactly 8 hex digits, optionally0x/0X-prefixed. Shorter input is now rejected withParseHexError::OddLengthorParseHexError::InvalidLength.
Removed¶
ParseHexErrorhas moved todash-typesasdash_types::ParseHexError.- The
dash_types::Numericre-export in favour of a wholesale crate re-export.dash_num::Numericimports must switch todash_num::__deps::dash_types::Numericor depend ondash-typesdirectly.
Fixed¶
Arith256::to_f64rounds like the reference implementation. It was one ULP off on roughly 1% of inputs.
0.1.0-beta - 2026-09-14¶
- Initial release.