@solana/kit
v6.2.0 (2026-03-09)
Minor Changes
-
[
@solana/codecs-data-structures] #13943f4c5f0Thanks @mcintyre94! - Adds new functionsgetPatternMatchEncoder,getPatternMatchDecoderandgetPatternMatchCodec.These can be used to write an encoder that switches between any number of encoders based on the value being encoded, or a decoder that switches between any number of decoders based on the byte array being decoded.
For example for the encoder, the input is a list of [predicate, encoder] pairs. Each predicate is a function from the value being encoded to true/false. The encoder used is the first one where its predicate is true.
-
[
@solana/wallet-account-signer] #1415587ede3Thanks @mcintyre94! - Add new@solana/wallet-account-signerpackage that will contain functions for converting from Wallet Standard accounts on Solana chains, to Kit Signer objects.
Patch Changes
-
[
@solana/codecs-data-structures] #14205390602Thanks @mcintyre94! - Enable pattern match encoder/codec to use type narrowing. This means that if your predicate narrows the type of the value, then the matching encoder only needs to handle the narrowed type.This means that you can write, for example:
getPatternMatchEncoder<string | number>([ [value => typeof value === 'string', {} as Encoder<string>], [value => typeof value === 'number', {} as Encoder<number>], ]);
-
[
@solana/errors] #14400d0be3eThanks @lorisleiva! - Append the instruction index to all instruction error messages (e.g.(instruction #1)) and add a human-readable message for unknown instruction errors. -
[
@solana/errors] #14327568a12Thanks @lorisleiva! - AddSOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONandSOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONSerror codes for high-level transaction sending wrappers. -
[
@solana/errors] #1442e33a65fThanks @lorisleiva! - Remove stale$encodedDatainterpolation from theBORSH_IO_ERRORmessage. TheencodedDatacontext property was removed in v5.0.0 but the message template was not updated, causing the literal$encodedDatato appear in the rendered error message. -
[
@solana/errors,@solana/instruction-plans] #143349c1195Thanks @lorisleiva! - AddabortReasonto theSOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLANerror context so consumers can access the abort reason when converting this error to higher-level error types. -
[
@solana/instruction-plans] #143598a8869Thanks @lorisleiva! - AddcreateFailedToExecuteTransactionPlanErrorfactory helper for custom transaction plan executor authors and refactor the built-in executor to use it. -
[
@solana/instruction-plans] #143479db829Thanks @lorisleiva! - AddcreateFailedToSendTransactionErrorandcreateFailedToSendTransactionsErrorfactory helpers that create high-levelSolanaErrorinstances from failed or canceled transaction plan results, with unwrapped simulation errors, preflight data, and logs in the error context. -
[
@solana/sysvars] #1428b28b843Thanks @datasalaryman! - use internals codecs dependencies