bcs_dart
Binary Canonical Serialization (BCS) for Dart: encode/decode BCS bytes for Sui and Move types (structs, enums, vectors, options).
0.2.1
jovinlidan/bcs-dart
What this package is like to depend on
Last release 1 months ago
08 Jul 2026
Release timing varies
gaps range from 8 days to 10 months
Nearly every release is documented
notes for 3 of 3 stable releases
Nothing withdrawn
no release was ever pulled
11 months old
3 releases · first in 2025
3 releases in the last 12 months
see the full history below
Release timeline
3 releases · Sep 2025 to Jul 2026
2026
Releases
latest 3-
0.2.108 Jul 2026Release notes
Open source →Added
- Example at
example/bcs_dart_example.dart.
Changed
- Expanded the package description and corrected the
repositoryURL. - Formatting and static-analysis cleanup across the package (no API changes).
- Example at
-
0.2.030 Jun 2026Release notes
Open source →Synced to
f898c13.Behavior changes
Bcs.mapnow sorts entries by their serialized key bytes before writing, for canonical key ordering. Maps that were not already in canonical key order now produce different (correct) bytes.Hex.decode(andfromHEX) now reject non-hex input (sign characters, whitespace, other non-[0-9a-fA-F]characters) with aFormatExceptioninstead of silently producing corrupt bytes.
Fixes
BcsWriter.ensureSizeOrGrowgrows the buffer to fit a single write larger thanallocateSizeinstead of throwing.ulebDecodethrows on a truncated buffer (continuation bit with no more bytes) and on values exceedingMAX_SAFE_INTEGER.Bcs.enumerationread bounds-checks the variant index and throws a descriptive error for an unknown variant.
Added
- Top-level
compareBcsBytes(lexicographic byte comparison). Bcs.byteVector()— a fastvector<u8>that reads/writes raw bytes (same wire bytes asvector(u8())).BcsWriter.writeBytes(Uint8List)bulk write.- Top-level
isSerializedBcs(Object?)type guard;bcs_type.dartis now re-exported from thebcs.dartbarrel. BcsType.transformaccepts one-directional transforms (input/outputare now optional).
-
0.1.212 Sep 2025