Full rewrite with a single public entry point (package:bcs/bcs.dart);
implementation moved to lib/src/.
Breaking changes:
- Remove the legacy string-based registry API (LegacyBCS,
registerStructType, ...) and the split libraries (bcs_type.dart,
utils.dart, hex.dart, index.dart, consts.dart, ...).
- Rename encoding helpers to hexEncode/hexDecode and
base58Encode/base58Decode; drop the Encoding enum and base64 wrappers
(use dart:convert).
Improvements:
- Strictly typed inputs; u64/u128/u256 accept int, BigInt or decimal
String. struct/enumeration accept any Map or object with toJson().
- Stricter, hardened decoding: canonical booleans, bounds-checked reads,
validated enum indexes, ULEB128 capped at u32, vector lengths checked
against remaining input, strict hex parsing, byte-range validation.
- BcsWriter grows its buffer geometrically and writes in bulk.
- Strict analyzer modes; requires Dart 3.2+.