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¶
0.2.0-beta - 2026-10-20¶
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¶
- The minimum supported Rust version is raised from 1.85 to 1.89.
HashBlob,make_hash!types andArith256serialize as their little-endian storage bytes for machine-readable formats. JSON retains the hex-encoded big-endian string.- The
serdefeature no longer impliescodec.CompactTargetimplementsSerializeandDeserializewithoutcodec. Callers that relied onserdeto enablecodecmust enable it explicitly. CompactTarget::from_strrequires exactly 8 hex digits, optionally0x/0X-prefixed. Shorter input is rejected withParseHexError::OddLengthorParseHexError::InvalidLength.Arith256::to_f64rounds like the reference implementation, where it was one ULP off on roughly 1% of inputs.
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.
0.1.0-beta - 2026-09-14¶
- Initial release.