solana_kit_transactions 0.10.0
solana_kit_transactions: ^0.10.0 copied to clipboard
Transaction compilation and signing 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
Fixes #
Reject truncated numeric reads with SolanaError instead of RangeError
A decoder reading a fixed-width field out of malformed wire data could raise a raw RangeError or IndexError out of the SDK instead of the documented SolanaError, so a caller catching SolanaError saw an escaped exception rather than a rejection it could handle. A truncated account, transaction, or RPC payload reaching the decoders was enough to trigger it; no signature or cluster access was required.
The guard that upstream @solana/kit applies in its number decoder factory was missing from three ports of it. numberDecoderFactory and floatDecoderFactory read through a ByteData view without first checking that the requested width was available, and the six BigInt decoders (u64, i64, u128, i128, u256, i256) indexed bytes directly with the same gap. All eight now call assertByteArrayIsNotEmptyForCodec and assertByteArrayHasEnoughBytesForCodec before reading, raising codecsCannotDecodeEmptyByteArray or codecsInvalidByteLength as upstream does. A new bigIntDecoderFactory carries the guard for the multi-word widths.
Two further escape sites in solana_kit_transaction_messages are fixed. The version 1 instruction payload slice computed pos + numInstructionDataBytes and sliced without confirming the buffer held that many bytes; it now asserts the length the way upstream's fixDecoderSize wrapper does. The transaction version decoder read bytes[offset] unguarded — upstream tolerates this because JavaScript yields undefined, which then silently takes the legacy branch and misreports a truncated buffer as an unversioned message, so this port rejects the empty buffer rather than reproducing that fallback.
Encoders are unchanged and still raise RangeError when a destination buffer is too small. Upstream writes into a scratch buffer and then bytes.sets it, which throws in JavaScript too, so that behavior is deliberate parity rather than a defect.
Callers that caught RangeError around a decode should catch SolanaError. Callers that already caught SolanaError now see malformed input rejected where it previously surfaced as a crash.
Owner: Ifiok Jr. · Introduced in: f21cd21
Add version 1 transaction coverage with oversized payloads
Adds regression tests for the version 1 transaction wire format introduced by SIMD-0296 and SIMD-0385, which raise the transaction size ceiling from 1232 to 4096 bytes.
packages/solana_kit_transactions/test/v1_transaction_test.dart pins the exact bytes against vectors generated by upstream @solana/kit 8.3.0, so a regression in the v1 envelope, config mask, or config value encoding fails loudly instead of silently producing transactions the cluster rejects. The vectors live in test/fixtures/v1_wire_vectors.json, alongside a README documenting how to regenerate them; the largest asserts a 3216-byte transaction byte-for-byte, which no legacy transaction can represent.
On-chain coverage lands in packages/solana_kit_integration_tests/test/integration/v1_transaction_test.dart. It submits a v1 transaction with a 1600-byte memo — over the legacy ceiling — and asserts the node accepts it, recovers the full memo, reports the inline transactionConfig with the requested compute unit and loaded accounts limits, and moves lamports. The same suite asserts the node rejects a payload above 4096 bytes.
A second on-chain suite, resource_limit_estimation_test.dart, submits a v1 transaction whose limits were produced by estimateResourceLimitsFactory and asserts the node executes it.
IntegrationTestEnv gains sendV1Instructions and buildV1WireTransaction helpers, and fetchTransaction now requests maxSupportedTransactionVersion: 1 so v1 responses can be read back rather than failing with RPC error -32015. No public library behavior changes.
Owner: Ifiok Jr. · Introduced in: 19932db
0.9.3 - 2026-09-12 #
Changed #
- No package-specific changes were recorded;
solana_kit_transactionswas updated to 0.9.3 as part of groupmain.
0.9.2 - 2026-09-06 #
🐛 Fixed #
Protect transaction signing integrity
Freeze transaction message and signature buffers so retained references cannot change reviewed signing payloads. Decode v1 message-first transaction envelopes with the correct signature ordering. Preserve v1 configuration when attaching signers and honor fee payer address replacements without retaining the old fee payer signer.
0.9.1 - 2026-08-30 #
Changed #
- No package-specific changes were recorded;
solana_kit_transactionswas updated to 0.9.1 as part of groupmain.
0.9.0 - 2026-08-30 #
💥 Breaking Change #
Sync upstream @solana/kit v8.1.0
Tracks upstream APIs and behavior through v8.1.0:
-
solana_kit_transaction_messages(breaking): removed the deprecated compute-unit-limit helpersfillTransactionMessageProvisoryComputeUnitLimitandestimateAndSetComputeUnitLimitFactory, matching upstream@solana/kit's removal of the deprecated@solana/kitestimation helpers (#1948). UsefillTransactionMessageProvisoryResourceLimitsandestimateAndSetResourceLimitsFactoryinstead, which additionally reserve and set the loaded accounts data size limit for version 1 transactions.setTransactionMessageComputeUnitLimitandsetTransactionMessageConfignow reject compute unit limits the runtime will not honor — an integer outside[0, 1400000]— throwingSolanaErrorCode.transactionComputeUnitLimitOutOfRange, and reject invalid heap sizes — not a multiple of 1024 bytes in[32768, 262144]— throwingSolanaErrorCode.transactionInvalidHeapSize(upstream #1972). Added the upstreamheap-size.tsmodule asgetTransactionMessageHeapSize/setTransactionMessageHeapSizewith the same validation, andresource_limit_validation.dartwithassertIsValidComputeUnitLimit/assertIsValidHeapSize,minHeapSize,maxHeapSize, andheapSizeMultipleOf. Decoding is unaffected:decompileTransactionMessagestill returns messages carrying out-of-range values.Migration:
fillTransactionMessageProvisoryComputeUnitLimit(m)→fillTransactionMessageProvisoryResourceLimits(m).estimateAndSetComputeUnitLimitFactory(estimate)→estimateAndSetResourceLimitsFactory(estimateResourceLimitsFactory(estimate)).
-
solana_kit_transactions(breaking): removed the fixed-size constantstransactionPacketSize,transactionPacketHeader, andtransactionSizeLimit, matching upstream's removal ofTRANSACTION_PACKET_SIZE,TRANSACTION_PACKET_HEADER, andTRANSACTION_SIZE_LIMIT(#1948). UsegetTransactionSizeLimitto derive the limit for a specific transaction, or the per-version constantslegacyTransactionSizeLimit(1232) andv1TransactionSizeLimit(4096).Migration:
TRANSACTION_SIZE_LIMIT - getTransactionSize(t)→getTransactionSizeLimit(t) - getTransactionSize(t). -
solana_kit_errors: added thefailedToSignTransaction(13) andfailedToSignTransactions(14) error codes with upstream messages, plus the transaction codestransactionComputeUnitLimitOutOfRange(5663039) andtransactionInvalidHeapSize(5663040) (upstream #1902, #1972). -
solana_kit_instruction_plans: addedcreateFailedToSendTransactionError,createFailedToSendTransactionsError,createFailedToSignTransactionError,createFailedToSignTransactionsError, andcreateFailedToExecuteTransactionPlanError, mirroring upstream@solana/instruction-plans'transaction-plan-errors.ts(#1902, #1434). The signing factories carry the same non-enumerabletransactionPlanResultand optionallogs/preflightDatacontext as their sending counterparts, but the message includes no submission-location indicator because signing never submits. The executor now throws throughcreateFailedToExecuteTransactionPlanError. -
solana_kit: added theClientWithTransactionSendingandClientWithTransactionSigningclient interfaces, mirroring upstream@solana/plugin-interfaces(#1899).signTransaction/signTransactionsaccept the same flexible inputs as their sending counterparts and return signed transactions without submitting them. Sending results guarantee a signature-bearingcontext; signing makes no default guarantee about the context, matching the upstreamTContextparameterization (adapted to Dart's map-based result contexts). -
solana_kit_rpc_transformers(breaking): removedgetBigIntDowncastRequestTransformer, matching upstream #1948. It was no longer used by the default Solana RPC request transformer: the Solana RPC transport serializesBigIntvalues losslessly as large integer literals viastringifyJsonWithBigInts, and Agave parses JSON integers across the fullu64range without precision loss, so downcastingBigInts to (potentially lossy)ints is unnecessary.getDefaultRequestTransformerForSolanaRpcno longer downcasts; if you still need this behavior, recreate it withgetTreeWalkerRequestTransformerand a visitor that replacesBigIntnodes withintvalues. -
solana_kit_rpc_transformers: the numeric allow-list keepstransactionConfig.computeUnitLimit,transactionConfig.heapSize, andtransactionConfig.loadedAccountsDataSizeLimitfrom version 1 transaction responses as numbers instead of upcasting them toBigInt(upstream #1951). -
Documentation now tracks
@solana/kitv8.1.0, and the reference pin inconfig/reference-repos.jsonmoved tobb54243d8a57(tagv8.1.0).
Migration example:
// Before (removed):
// final estimate = estimateComputeUnitLimitFactory(rpc);
// var message = await estimateAndSetComputeUnitLimitFactory(estimate)(message);
// final freeBytes = transactionSizeLimit - getTransactionSize(transaction);
// After:
final estimate = estimateResourceLimitsFactory(rpc);
var message = await estimateAndSetResourceLimitsFactory(estimate)(message);
final freeBytes =
getTransactionSizeLimit(transaction) - getTransactionSize(transaction);
Owner: @ifiokjr · Review: PR #225 · Related issues: #1899, #1902, #1910, #1913, #1948, #1951, #1957, #1970, #1971, #1972, #1979, #220
📖 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.
0.8.0 - 2026-08-19 #
Changed #
- No package-specific changes were recorded;
solana_kit_transactionswas updated to 0.8.0 as part of groupmain.
0.7.0 - 2026-08-18 #
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.
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
🐛 Fixed #
Add well-known program, sysvar, SPL, Metaplex, and token mint address constants
Add centralized address constants to solana_kit_addresses so that any package can reference well-known on-chain addresses without importing the full domain package or hardcoding strings.
New exports:
program_addresses.dart— All Agave/Solana native program addresses (system, ALT, BPF loaders, compute budget, config, stake, vote, etc.)sysvar_addresses.dart— All sysvar addresses (clock, rent, recentBlockhashes, fees, rewards, etc.) plus the sysvar owner addressspl_addresses.dart— SPL program addresses (Token, Token-2022, ATA, Memo, Memo Legacy)metaplex_addresses.dart— Metaplex program addresses (Token Metadata, Bubblegum, Auth Rules, Core, SPL Account Compression, Noop)well_known_addresses.dart— Well-known token mint addresses (Wrapped SOL, USDC, USDT)
Also re-exports from solana_kit_address (Address type, codecs, comparator, PublicKey) and solana_kit_address_constants (well-known address constants).
Owner: Ifiok Jr. · Introduced in: 3f596ef · Last updated in: 4643648
🧪 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
Add version-aware transaction size helpers and constants
Owner: Ifiok Jr. · Introduced in: 9ee2e44 · Last updated in: a526ea3