github anza-xyz/kit v6.2.0

7 hours ago

@solana/kit

v6.2.0 (2026-03-09)

Minor Changes

  • [@solana/codecs-data-structures] #1394 3f4c5f0 Thanks @mcintyre94! - Adds new functions getPatternMatchEncoder, getPatternMatchDecoder and getPatternMatchCodec.

    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] #1415 587ede3 Thanks @mcintyre94! - Add new @solana/wallet-account-signer package that will contain functions for converting from Wallet Standard accounts on Solana chains, to Kit Signer objects.

Patch Changes

  • [@solana/codecs-data-structures] #1420 5390602 Thanks @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] #1440 0d0be3e Thanks @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] #1432 7568a12 Thanks @lorisleiva! - Add SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION and SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS error codes for high-level transaction sending wrappers.

  • [@solana/errors] #1442 e33a65f Thanks @lorisleiva! - Remove stale $encodedData interpolation from the BORSH_IO_ERROR message. The encodedData context property was removed in v5.0.0 but the message template was not updated, causing the literal $encodedData to appear in the rendered error message.

  • [@solana/errors, @solana/instruction-plans] #1433 49c1195 Thanks @lorisleiva! - Add abortReason to the SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN error context so consumers can access the abort reason when converting this error to higher-level error types.

  • [@solana/instruction-plans] #1435 98a8869 Thanks @lorisleiva! - Add createFailedToExecuteTransactionPlanError factory helper for custom transaction plan executor authors and refactor the built-in executor to use it.

  • [@solana/instruction-plans] #1434 79db829 Thanks @lorisleiva! - Add createFailedToSendTransactionError and createFailedToSendTransactionsError factory helpers that create high-level SolanaError instances from failed or canceled transaction plan results, with unwrapped simulation errors, preflight data, and logs in the error context.

  • [@solana/sysvars] #1428 b28b843 Thanks @datasalaryman! - use internals codecs dependencies

Don't miss a new kit release

NewReleases is sending notifications on new releases.