Changelog¶
All notable changes to dash-types and
dash-types-marker 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¶
- Implementation of
LowerHex,UpperHex,FromStr,From<&[u8; N]>andTryFrom<&[u8]>for{derive,make}_bytes!. ParseHexErroris moved fromdash-num, supersedingdash_num::ParseHexError.serialize::hex::serialize_asandserialize::hex::deserialize_as, to permit caller-defined handling of human-readable encoding while sharing common machine-readable encoding.CompactSize::decode_unbounded, decoding a value read as a number rather than a size, such as service flags, without theMAX_SER_SIZErange check.CompactSize::decode_len, decoding a length or count prefix range-checked likeCompactSize::decodeand bounded by a caller limit and the remaining input.Signable, a trait for consensus types that hold a signature.Signable::payloadreturns the 32-byte digest the key signs,Signable::set_signaturestores a signature if it verifies against the supplied key andSignable::reset_signaturedrops the signature.CompactSize::decode_as, with the sealedCompactUinttrait, forCompactSize-encoded integer fields bounded by bothMAX_SER_SIZEand their type.codec::decode_vecreads a CompactSize-prefixed vector and rejects a count above a caller limit before any element is decoded or allocated.
Changed¶
- The minimum supported Rust version is raised from 1.85 to 1.89.
- Decoding a
CompactSizerejects a value aboveMAX_SER_SIZE. Callers reading a value as a number (instead of a size) must switch toCompactSize::decode_unbounded. - Machine-readable formats receive raw bytes in place of hex or strings. JSON and other human-readable formats are
unaffected unless noted.
{derive,make}_bytes!-defined types serialize as their raw storage bytes. Human-readable formats retain hex in storage order forfwdand in reverse storage order forrev.serialize::hexwrites raw bytes instead of a hex-encoded string.serialize::str_u64writes a nativeu64to work around number-precision limitations in JSON and is now confined to human-readable formats.serialize::utf8_lossywrites raw bytes, or a string only for human-readable formats and valid UTF-8, and reads back in the same manner so round trips succeed.
- The
serdefeature no longer impliescodec.impl_num!andmake_num!are available withoutcodecand emit theirserdeimplementation independently. Callers that relied onserdeto enablecodecmust enable it explicitly. booldecodes any non-zero byte astrueinstead of rejecting bytes above1. Encoding still writes0or1, so a decoded byte above1does not round-trip.- Decoding
Vec<T>,Stringand script buffers treats length prefixes differently.- A prefix above
MAX_SER_SIZEis rejected even when enough bytes remain. - A prefix past the remaining input is reported as
DecodeError::Eofinstead ofCompactSizeExceedsLimit. Vec<T>reserves each batch exactly rather than growing its capacity geometrically past the batch.
- A prefix above
derive_bytes!emitsFrom<[u8; N]>in place ofimpl_bytes!.make_sbytes!emits the implementation itself. Callers ofimpl_bytes!withoutderive_bytes!must now write the conversion manually.make_bytes!andmake_sbytes!therefore emitFrom<[u8; N]>even with thenocodectag or without thecodecfeature, where it was previously absent. Callers that wrote the conversion manually for those configurations must drop it.derive_bytes!(and by extensionmake_bytes!) also emitsFrom<&[u8; N]>,TryFrom<&[u8]>,FromStr,LowerHexandUpperHex, whilemake_sbytes!does not. Types usingderive_bytes!ormake_bytes!that implemented them manually must drop those implementations.
serialize::hex::deserializereturns anyTbuilt from a byte slice instead ofVec<u8>. Callers that relied onVec<u8>as the fixed return type must now mention it explicitly.- The
zeroizeexport is moved from the crate root to__deps. Callers must switch todash_types::__deps::zeroize.
Removed¶
- The
codec::Checkableandcodec::Hashablecompatibility aliases in favour of exports from the crate root.
0.1.0-beta - 2026-09-14¶
- Initial release.