github anza-xyz/kit v4.0.0

latest releases: v6.5.0, v6.4.0, v6.3.1...
5 months ago

@solana/kit

v4.0.0 (2025-10-08)

Major Changes

  • [@solana/react, @solana/signers] #927 c035ab8 Thanks @mcintyre94! - Update the signer API to return Transaction & TransactionWithLifetime

    The modifyAndSignTransactions function for a TransactionModifyingSigner must now return a Transaction & TransactionWithLifetime & TransactionWithinSizeLimit. Previously it technically needed to return a type derived from the input TransactionMessage, but this wasn't checked.

    If you have written a TransactionModifyingSigner then you should review the changes to useWalletAccountTransactionSigner in the React package for guidance. You may need to use the new getTransactionLifetimeConstraintFromCompiledTransactionMessage function to obtain a lifetime for the transaction being returned.

    If you are using a TransactionModifyingSigner such as useWalletAccountTransactionSigner, then you will now receive a transaction with TransactionWithLifetime when you would previously have received a type with a lifetime matching the input transaction message. This was never guaranteed to match at runtime, but we incorrectly returned a stronger type than can be guaranteed. You may need to use the new isTransactionWithBlockhashLifetime or isTransactionWithDurableNonceLifetime functions to check the lifetime type of the returned transaction. For example, if you want to pass it to a function returned by sendAndConfirmTransactionFactory then you must use isTransactionWithBlockhashLifetime or assertIsTransactionWithBlockhashLifetime to check its lifetime first.

  • [@solana/rpc-graphql, @solana/rpc-subscriptions-api, @solana/rpc-types] #550 ce7f91c Thanks @steveluscher! - Removed rentEpoch from the AccountInfoBase type. This property is no longer relevant post SIMD-215. Developers whose applications rely on this property being numeric should either eliminate it or hardcode it to 18_446_744_073_709_551_615n.

Minor Changes

Patch Changes

  • [@solana/codecs-core, @solana/errors] #944 22f18d0 Thanks @mcintyre94! - Add a function to create a decoder that checks the size of the input bytes

  • [@solana/compat] #906 eabeb3a Thanks @guibescos! - Fixed a bug where calling fromVersionedTransaction() with a VersionedTransaction that uses address table lookups would result in a runtime fatal

  • [@solana/errors, @solana/transactions] #918 5408f52 Thanks @mcintyre94! - Add a function to extract the lifetime from a CompiledTransactionMessage

  • [@solana/errors, @solana/transaction-messages, @solana/transactions] #871 cb11699 Thanks @mcintyre94! - Do not allow decoding transactions with an unsupported version

  • [@solana/errors] #873 9fa8465 Thanks @steveluscher! - When you use the @solana/errors CLI you will now always get version 5.6.2 of chalk and version 14.0.0 of commander, which themselves are zero-dependency.

  • [@solana/errors, @solana/react] #919 c87cada Thanks @mcintyre94! - Update useWalletAccountTransactionSigner to return a LifetimeConstraint for the updated transaction

  • [@solana/keys] #901 f591dea Thanks @guibescos! - Added assertion (assertIsSignatureBytes), guard (isSignatureBytes), and coercion (signatureBytes) methods to make it easier to work with callsites that demand a SignatureBytes type

  • [@solana/kit] #521 98bde94 Thanks @tao-stones! - Add loadedAccountsDataSize to simulateTransaction response

  • [@solana/rpc-subscriptions] #904 9e8bfe4 Thanks @steveluscher! - yExported all of the channel creators that form part of createDefaultSolanaRpcSubscriptionsChannelCreator() so that developers can configure their own custom channels

  • [@solana/transaction-confirmation] #793 cfc1d92 Thanks @steveluscher! - Fixed a bug where transaction errors discovered during recent transaction confirmation might not be thrown

  • [@solana/transaction-messages] #951 54d8445 Thanks @tanmay5114! - compressTransactionMessageUsingAddressLookupTables() will no longer convert an account to a lookup table account, if the address of that account is used as a program address anywhere in the transaction.

  • [@solana/transactions] #925 af01f27 Thanks @mcintyre94! - Add functions to narrow a TransactionWithLifetime to a specific lifetime

  • [@solana/webcrypto-ed25519-polyfill] #806 f254415 Thanks @steveluscher! - The Ed25519 polyfill now correctly returns ArrayBuffer from exportKey() and sign() rather than Uint8Array

Don't miss a new kit release

NewReleases is sending notifications on new releases.