solana_kit_codecs_data_structures 0.10.0 copy "solana_kit_codecs_data_structures: ^0.10.0" to clipboard
solana_kit_codecs_data_structures: ^0.10.0 copied to clipboard

Struct, enum, tuple, and map codecs for the Solana Kit Dart SDK.

Changelog #

All notable changes to this project will be documented in this file.

This changelog is managed by monochange.

0.10.0 - 2026-09-21 #

Breaking changes #

Raise the Dart and Flutter baseline

The workspace now builds against Dart 3.13.3 and Flutter 3.47.4, and every package declares that floor instead of the previous Dart 3.12 range. Consumers on older SDKs can no longer resolve these packages, so this release is breaking even though no Dart API changed.

The Flutter floor rises from 3.44 to 3.47 for solana_kit_mobile_wallet_adapter, solana_kit_mobile_wallet_adapter_protocol, and solana_kit_wallet_adapter, matching the floor solana_kit_wallet_ui already required. solana_kit_lints ships the raised floor to consumers, so it carries the same breaking bump. Every other package raises only the Dart SDK floor.

Raising the language version also switches dart format to the tall style, so 83 files across library, test, script, and Codama-generated trees are reflowed. The renderer pipes generated output through dart format, so regenerating stays consistent.

Align your own SDK constraint with the workspace:

environment:
  sdk: ^3.13.0
  # Omit for pure Dart packages; required for the Flutter packages above.
  flutter: ">=3.47.0"

Owner: Ifiok Jr. Β· Introduced in: 5f5fe01 Β· Last updated in: 19932db

Features #

Add the upstream size-prefix and UTF-8 codec options

Ports the last two surfaces from upstream @solana/kit v8.3.0. Both are additive: no existing behavior changes.

requireSizePrefix is a named parameter on getArrayDecoder, getArrayCodec, getSetDecoder, getSetCodec, getMapDecoder, and getMapCodec. Upstream defaults it to false, where an exhausted byte array decodes as an empty collection so a collection can be appended to an existing layout. This port defaults it to true and throws, because a silently empty collection hides truncated input. Pass requireSizePrefix: false to opt in:

final lenient = getArrayCodec(getU8Codec(), requireSizePrefix: false);
lenient.decode(Uint8List(0)); // []
getArrayCodec(getU8Codec()).decode(Uint8List(0)); // throws

Utf8CodecConfig is accepted by getUtf8Encoder, getUtf8Decoder, and getUtf8Codec, and carries upstream's three options:

  • fatal rejects malformed input instead of replacing it. Upstream defaults to false, decoding bad bytes as U+FFFD; this port defaults to true and raises a FormatException from decoding and, for lone surrogates, from encoding.
  • ignoreBOM preserves a leading byte order mark. Both default to false, which strips it, matching Dart's Utf8Decoder.
  • removeNullCharacters strips U+0000 from decoded strings. Upstream defaults to true; this port defaults to false so the decoded value reflects the bytes exactly.

The two divergent defaults exist so that malformed or null-padded account and instruction data cannot decode silently. To take upstream's behavior explicitly:

final codec = getUtf8Codec(
  const Utf8CodecConfig(fatal: false, removeNullCharacters: true),
);

Owner: Ifiok Jr. Β· Introduced in: cf4ab87

0.9.3 - 2026-09-12 #

Changed #

  • No package-specific changes were recorded; solana_kit_codecs_data_structures was updated to 0.9.3 as part of group main.

0.9.2 - 2026-09-06 #

πŸ› Fixed #

Bound array decoding from untrusted bytes

Reject missing, invalid, and excessive array counts, and stop remainder decoders that fail to consume input. Callers can set a smaller maxItems limit for application-specific formats.

Owner: @ifiokjr Β· Review: PR #238

0.9.1 - 2026-08-30 #

Changed #

  • No package-specific changes were recorded; solana_kit_codecs_data_structures was updated to 0.9.1 as part of group main.

0.9.0 - 2026-08-30 #

πŸš€ Feature #

Typed tuple codecs and explicit integer factories

Add typed getTuple2Encoder/getTuple2Decoder helpers to solana_kit_codecs_data_structures, exposing two-element tuples as Dart records. Give the integer codec factories in solana_kit_codecs_numbers explicit generic specializations while preserving their existing FixedSizeEncoder<num> public return types. codama-renderers-dart now emits getTuple2* for arity-2 tuple nodes, escapes Dart reserved-word identifiers, keeps generated instructionData locals collision-free, and gives generated byte/list fields recursive value equality and hashing.

Owner: @ifiokjr Β· Review: PR #227

πŸ“– Documentation #

Unslop package docs and code comments

Rewrote every package README from a reader's perspective with verified, compilable examples, removed AI-tell phrasing from docs and code comments, and added a test that analyzes every Dart block in Markdown so examples cannot drift from the API.

Owner: @ifiokjr Β· Review: PR #223

0.8.0 - 2026-08-19 #

πŸ› Fixed #

Reject non-canonical boolean decoder values

Boolean codecs now reject values other than zero and one with a typed error, including nullable prefixes that use boolean tags.

Owner: @ifiokjr Β· Review: PR #217

0.7.0 - 2026-08-18 #

πŸ’₯ Breaking Change #

@solana/kit v7.0.0 upstream sync (foundational breaking changes)

Ports the foundational breaking changes from @solana/kit v7.0.0:

  • solana_kit_errors: new transactionIntrospection error domain + codes (transactionFailedToDecompileInstructionAccountIndexOutOfRange, transactionIntrospectionCannotDecodeJsonParsedTransaction, transactionIntrospectionUnrecognizedGetTransactionResponse) and instruction-plans max-instructions codes (instructionPlansInvalidMaxInstructionsPerTransaction, instructionPlansMaxInstructionsPerTransactionExceeded).
  • solana_kit_codecs_data_structures: createDependentStructDecoder fluent builder for structs whose later fields depend on earlier decoded values.
  • solana_kit_instruction_plans: configurable maxInstructionsPerTransaction (default 16, limit 64) on TransactionPlannerConfig, individual TransactionPlanner invocations, and MessagePacker; invocation-specific planner values take precedence without leaking to later calls.
  • solana_kit_rpc_types: isSolanaRpcResponse runtime guard.
  • solana_kit: removed the local getMinimumBalanceForRentExemption helper (rent exemption is becoming dynamic; use the RPC method instead).
  • solana_kit_subscribable: ReactiveStreamStore v7 rewrite β€” caller-driven connect()/reset()/withSignal(), starts idle, collapses retrying into loading (stale-while-revalidate), renames getUnifiedState() β†’ getState(); removed retry(), value-only getState(), getError(). ReactiveActionStore now passes a fresh CancellationToken to every action, cancels superseded/reset/disposed dispatches, suppresses late outcomes, exposes caller cancellation through withSignal(), and preserves stale results and errors while running.
  • solana_kit_transaction_introspection: new first-class package porting @solana/transaction-introspection β€” RPC transaction decoding, instruction and inner-instruction extraction, loaded-address resolution, and instruction walking helpers; re-exported from the solana_kit umbrella.
  • solana_kit_rpc_parsed_types / solana_kit_rpc_transformers / solana_kit_rpc_api: Agave 4.1.0 parsed-account types β€” vote commissions/latency as int (not BigInt); rent sysvar union (lamportsPerByte vs deprecated burnPercent/exemptionThreshold/ lamportsPerByteYear); stake warmupCooldownRate optional; config slashPenalty/warmupCooldownRate deprecated; keep vote commissions and latency as int in the numeric-keypath allow-lists.

Migration: getMinimumBalanceForRentExemption(space) β†’ rpc.getMinimumBalanceForRentExemption(space).send(); store.retry() β†’ store.connect(); store.getUnifiedState() β†’ store.getState(); the deprecated ReactiveStore/createReactiveStoreFromStreams β†’ createReactiveStreamStore; reactive actions must migrate from (args) async => result to (signal, args) async => result.

// Before
final lamports = getMinimumBalanceForRentExemption(space);
store.retry();
final state = store.getUnifiedState();

// After
final lamports = await rpc.getMinimumBalanceForRentExemption(space).send();
store.connect();
final state = store.getState();

Owner: @ifiokjr Β· Review: PR #204

0.6.0 - 2026-08-12 #

πŸ“– Documentation #

Centralize package version documentation

Centralize package version metadata in versions.json and render package installation snippets from the shared MDT data source. Published package behavior is unchanged.

Owner: @ifiokjr Β· Review: PR #188

Point package README website badges at package docs

Updated package README website badges to link directly to each package's docs catalog entry and added missing package entries to the documentation website catalog/index.

Owner: @ifiokjr Β· Review: PR #192

0.5.0 - 2026-06-01 #

πŸ’₯ Breaking Change #

Raise minimum Dart SDK to 3.12

Raise the minimum supported Dart SDK constraint to ^3.12.0 across public Dart packages.

This is a breaking change because consumers must use Dart 3.12 or newer. Flutter consumers must use a Flutter SDK that bundles Dart 3.12 or newer.

environment:
  sdk: ^3.12.0

Owner: Ifiok Jr. Β· Introduced in: 32d5d36

πŸ§ͺ Testing #

Improve test coverage to 95%+ across all packages

Added 500+ tests covering equality/hashCode/toString, codec edge cases, error paths, and constructor variants. Removed dead code in fast_stable_stringify. Fixed concurrent modification bug in subscribable.

Owner: Ifiok Jr. Β· Introduced in: 48216f9 Β· Last updated in: b7f5419

0.4.0 - 2026-05-30 #

πŸ“ Changed #

Restructure release groups

Move program-specific and domain-specific packages out of the main release group into standalone release schedules with independent versioning. Core SDK packages remain synchronized in the main group.

Owner: Ifiok Jr. Β· Introduced in: fccec7f Β· Last updated in: 93b3cd3

πŸ› Fixed #

Add per-package coverage badges

Add codecov flags and per-package coverage badges to all package READMEs.

Owner: Ifiok Jr. Β· Introduced in: bed1b1f Β· Last updated in: 93b3cd3

0
likes
160
points
3.79k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Struct, enum, tuple, and map codecs for the Solana Kit Dart SDK.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

solana_kit_codecs_core, solana_kit_codecs_numbers, solana_kit_errors

More

Packages that depend on solana_kit_codecs_data_structures