polkadart_scale_codec 2.0.0
polkadart_scale_codec: ^2.0.0 copied to clipboard
Implementation of the SCALE codec in Dart
2.0.0 #
Breaking Changes #
- Removed
Registryclass (metadata parsing logic) from core library - Removed
ScaleCodecwrapper class from core library - Core library now only contains
Codecmixin - Added required
isSizeZero()method toCodecmixin - all custom codecs must implement this
Added #
LengthPrefixedCodec<T>- Generic wrapper adding CompactScaleRawBytes- Wrapper class for already-encoded SCALE bytes- Avoids decode/re-encode cycles
- Codec writes raw bytes directly without encoding
- Extends
Equatablefor value comparison
Primitivesenum utility - Maps primitive type names to codecs with staticfromString()methodisSizeZero()implementations across all primitives:NullCodec: Returnstrue- always size zeroCompositeCodec: Returnstrueif empty OR all inner codecs are size zeroU8ArrayCodec: Returnslength == 0- zero only if empty arrayOptionCodec,NestedOptionCodec,ResultCodec,U8Codec,U8SequenceCodec,LengthPrefixedCodec: Returnfalse
- ResultCodec test coverage - New test file with test cases for encoding/decoding Result types
Changed #
- Core library simplified to only contain
codec_mixin.dart - Main library now exports
extended_codecs/length_prefixed_codec.dart - Minor formatting improvements in
CompositeCodecandOption.none()constructor
1.6.0 #
- Update dependencies
1.5.1 #
- Fixes an issue where
StrCodecwould preserve null bytes from fixed-length strings in blockchain metadata, causing invalid string literals in generated code. The decoder now strips trailing null bytes from decoded strings.
1.5.0 #
- Bump polkadart version to 0.7.0
1.4.2 #
- Fixes an issue when decoding a Bytes string
1.4.1 #
- Packages were bumped for new publish workflow
1.4.0 #
- All packages have been bumped to add web support
1.3.0 #
- Removes
json_schema2from being a required dependency
1.2.1 #
- Fixes
UnmodifiableUint8ListViewmissing on newer dart versions
1.2.0 #
- Adds support for custom signed extensions
1.1.2 #
- License update
1.1.1 #
- Publishing packages under polkadart.dev publisher
1.1.0 #
- Graduate package to a stable release. See pre-releases prior to this version for changelog entries.