@solana/kit
v4.0.0 (2025-10-08)
Major Changes
-
[
@solana/react,@solana/signers] #927c035ab8Thanks @mcintyre94! - Update the signer API to return Transaction & TransactionWithLifetimeThe
modifyAndSignTransactionsfunction for aTransactionModifyingSignermust now return aTransaction & TransactionWithLifetime & TransactionWithinSizeLimit. Previously it technically needed to return a type derived from the inputTransactionMessage, but this wasn't checked.If you have written a
TransactionModifyingSignerthen you should review the changes touseWalletAccountTransactionSignerin the React package for guidance. You may need to use the newgetTransactionLifetimeConstraintFromCompiledTransactionMessagefunction to obtain a lifetime for the transaction being returned.If you are using a
TransactionModifyingSignersuch asuseWalletAccountTransactionSigner, then you will now receive a transaction withTransactionWithLifetimewhen 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 newisTransactionWithBlockhashLifetimeorisTransactionWithDurableNonceLifetimefunctions to check the lifetime type of the returned transaction. For example, if you want to pass it to a function returned bysendAndConfirmTransactionFactorythen you must useisTransactionWithBlockhashLifetimeorassertIsTransactionWithBlockhashLifetimeto check its lifetime first. -
[
@solana/rpc-graphql,@solana/rpc-subscriptions-api,@solana/rpc-types] #550ce7f91cThanks @steveluscher! - RemovedrentEpochfrom theAccountInfoBasetype. 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 to18_446_744_073_709_551_615n.
Minor Changes
- [
@solana/rpc-transport-http] #88805970dfThanks @prashanFOMO! - The React Native and Node builds now permit you to set theOriginheader. This header continues to be forbidden in the browser build, as it features on the list of forbidden request headers: https://developer.mozilla.org/en-US/docs/Glossary/Forbidden\_request\_header
Patch Changes
-
[
@solana/codecs-core,@solana/errors] #94422f18d0Thanks @mcintyre94! - Add a function to create a decoder that checks the size of the input bytes -
[
@solana/compat] #906eabeb3aThanks @guibescos! - Fixed a bug where callingfromVersionedTransaction()with aVersionedTransactionthat uses address table lookups would result in a runtime fatal -
[
@solana/errors,@solana/transactions] #9185408f52Thanks @mcintyre94! - Add a function to extract the lifetime from a CompiledTransactionMessage -
[
@solana/errors,@solana/transaction-messages,@solana/transactions] #871cb11699Thanks @mcintyre94! - Do not allow decoding transactions with an unsupported version -
[
@solana/errors] #8739fa8465Thanks @steveluscher! - When you use the@solana/errorsCLI you will now always get version 5.6.2 ofchalkand version 14.0.0 ofcommander, which themselves are zero-dependency. -
[
@solana/errors,@solana/react] #919c87cadaThanks @mcintyre94! - Update useWalletAccountTransactionSigner to return a LifetimeConstraint for the updated transaction -
[
@solana/keys] #901f591deaThanks @guibescos! - Added assertion (assertIsSignatureBytes), guard (isSignatureBytes), and coercion (signatureBytes) methods to make it easier to work with callsites that demand aSignatureBytestype -
[
@solana/kit] #52198bde94Thanks @tao-stones! - Add loadedAccountsDataSize to simulateTransaction response -
[
@solana/rpc-subscriptions] #9049e8bfe4Thanks @steveluscher! - yExported all of the channel creators that form part ofcreateDefaultSolanaRpcSubscriptionsChannelCreator()so that developers can configure their own custom channels -
[
@solana/transaction-confirmation] #793cfc1d92Thanks @steveluscher! - Fixed a bug where transaction errors discovered during recent transaction confirmation might not be thrown -
[
@solana/transaction-messages] #95154d8445Thanks @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] #925af01f27Thanks @mcintyre94! - Add functions to narrow a TransactionWithLifetime to a specific lifetime -
[
@solana/webcrypto-ed25519-polyfill] #806f254415Thanks @steveluscher! - The Ed25519 polyfill now correctly returnsArrayBufferfromexportKey()andsign()rather thanUint8Array