2.1.0 (2025-02-27)
🎉 @solana/kit is the new name for the 2.x line of @solana/web3.js.
This should make it easier to adopt in projects that will continue to depend on the legacy 1.x line of web3.js for the time being. It will also prevent confusion for new developers who might install the 2.x line while following a legacy 1.x tutorial.
In time, more guide-based content will be released; in the meantime take a look at the READMEs, the examples/ directory, and https://tsdocs.dev/docs/@solana/kit. If you have questions, please post at https://sola.na/sse.
@solana/addresses@2.1.0
Minor Changes
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/assertions@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
@solana/errors@2.1.0
Minor Changes
-
5af7f20Thanks @steveluscher! - When the HTTP transport throws an error, you can now access the response headers throughe.context.headers. This can be useful, for instance, if the HTTP error is a 429 Rate Limit error, and the response contains aRetry-Afterheader.try { const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); } catch (e) { if (isSolanaError(e, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR)) { if (e.context.code === 429 /* rate limit error */) { const retryAfterHeaderValue = e.context.headers.get('Retry-After'); if (retryAfterHeaderValue != null) { // ... } } } }
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
#130
c7b7dd9Thanks @lorisleiva! - Gracefully handle JSON RPC errors that do not provide acodeattribute in their response -
704d8a2Thanks @mcintyre94! - Changedatafield of transaction message instructions to useReadonlyUint8Array
@solana/rpc-transport-http@2.1.0
Minor Changes
-
5af7f20Thanks @steveluscher! - When the HTTP transport throws an error, you can now access the response headers throughe.context.headers. This can be useful, for instance, if the HTTP error is a 429 Rate Limit error, and the response contains aRetry-Afterheader.try { const { value: latestBlockhash } = await rpc.getLatestBlockhash().send(); } catch (e) { if (isSolanaError(e, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR)) { if (e.context.code === 429 /* rate limit error */) { const retryAfterHeaderValue = e.context.headers.get('Retry-After'); if (retryAfterHeaderValue != null) { // ... } } } }
Patch Changes
- Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/rpc-spec@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/sysvars@2.1.0
Minor Changes
-
c880687Thanks @steveluscher! - Removed the fees sysvar which has been disabled on the network for a year, and has now been removed from the test validator in Agave 2.0% solana feature status JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG Feature | Status | Activation Slot | Description JAN1trEUEtZjgXYzNBYHU9DYd7GnThhXfFP7SzPXkPsG | active since epoch 483 | 208656004 | disable fees sysvar
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/rpc-types@2.1.0
- @solana/accounts@2.1.0
- @solana/codecs@2.1.0
@solana/accounts@2.1.0
Patch Changes
-
9b179dcThanks @lorisleiva! - Add missingspaceattribute toAccountInfoBaseandBaseAccount -
Updated dependencies [
1adf435,0c577eb,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
- @solana/rpc-types@2.1.0
- @solana/rpc-spec@2.1.0
@solana/assertions@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/errors@2.1.0
@solana/codecs@2.1.0
Patch Changes
- Updated dependencies [
1adf435,cfe6910]:- @solana/codecs-core@2.1.0
- @solana/codecs-data-structures@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/options@2.1.0
@solana/codecs-core@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/errors@2.1.0
@solana/codecs-data-structures@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
cfe6910Thanks @Jasu! -LiteralUnionCodecis now exported from@solana/codecs-data-structures -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/codecs-core@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/errors@2.1.0
@solana/codecs-numbers@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/codecs-core@2.1.0
- @solana/errors@2.1.0
@solana/codecs-strings@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/codecs-core@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/errors@2.1.0
@solana/compat@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
#40
790b050Thanks @steveluscher! - yAdded a helper to convert legacyTransactionInstructionobjects to modernIInstructionobjects -
#57
9029dc1Thanks @nickfrosty! - updated readme to include instruction compat functions -
Updated dependencies [
1adf435,d1c787c,0c577eb,c7b7dd9,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/instructions@2.1.0
- @solana/transactions@2.1.0
@solana/instructions@2.1.0
Patch Changes
-
704d8a2Thanks @mcintyre94! - Changedatafield of transaction message instructions to useReadonlyUint8Array -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/codecs-core@2.1.0
- @solana/errors@2.1.0
@solana/keys@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
#60
d1c787cThanks @steveluscher! - Key operations now work in versions of Firefox that supportEd25519natively -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/assertions@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
@solana/kit@2.1.0
Patch Changes
-
#101
4662f52Thanks @mcintyre94! - Add a new functionfetchAddressesForLookupTablesto fetch the addresses contained in a list of lookup tables' -
Updated dependencies [
a1e45a1,1adf435,d1c787c,0c577eb,c7b7dd9,9b179dc,29d1e28,400f4d5,5af7f20,70eb596,704d8a2,c880687]:- @solana/signers@2.1.0
- @solana/addresses@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/sysvars@2.1.0
- @solana/transaction-confirmation@2.1.0
- @solana/rpc-types@2.1.0
- @solana/accounts@2.1.0
- @solana/rpc-subscriptions@2.1.0
- @solana/rpc@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/instructions@2.1.0
- @solana/programs@2.1.0
- @solana/rpc-parsed-types@2.1.0
- @solana/transactions@2.1.0
- @solana/codecs@2.1.0
- @solana/functional@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/options@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,cfe6910,c7b7dd9,5af7f20,704d8a2]:- @solana/codecs-core@2.1.0
- @solana/codecs-data-structures@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
@solana/programs@2.1.0
Patch Changes
- Updated dependencies [
1adf435,0c577eb,c7b7dd9,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/errors@2.1.0
@solana/react@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
a1e45a1,1adf435,d1c787c,0c577eb,c7b7dd9,5af7f20,704d8a2]:- @solana/signers@2.1.0
- @solana/addresses@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/transactions@2.1.0
- @solana/promises@2.1.0
@solana/rpc@2.1.0
Patch Changes
-
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
Updated dependencies [
1adf435,c7b7dd9,9b179dc,3c25e7f,400f4d5,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/rpc-types@2.1.0
- @solana/rpc-api@2.1.0
- @solana/rpc-transport-http@2.1.0
- @solana/rpc-spec@2.1.0
- @solana/rpc-transformers@2.1.0
- @solana/fast-stable-stringify@2.1.0
- @solana/functional@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/rpc-api@2.1.0
Patch Changes
-
#85
3c25e7fThanks @mcintyre94! - Fix accountKeys type in getTransaction JSON parsed -
Updated dependencies [
1adf435,d1c787c,0c577eb,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/rpc-types@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/rpc-parsed-types@2.1.0
- @solana/transactions@2.1.0
- @solana/rpc-spec@2.1.0
- @solana/rpc-transformers@2.1.0
@solana/rpc-graphql@2.1.0
Patch Changes
-
#153
400f4d5Thanks @steveluscher! - The values of therewardTypeproperty have been corrected. They previously were specified as having a lowercase initial character. -
Updated dependencies [
1adf435]:- @solana/codecs-strings@2.1.0
- @solana/fast-stable-stringify@2.1.0
@solana/rpc-spec@2.1.0
Patch Changes
- Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/rpc-subscriptions@2.1.0
Patch Changes
-
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
70eb596Thanks @steveluscher! - The online/offline checker in the subscriptions implementation no longer throws an error when hosted in the Content Scripts environment of a browser extension -
Updated dependencies [
1adf435,c7b7dd9,9b179dc,29d1e28,400f4d5,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/subscribable@2.1.0
- @solana/rpc-types@2.1.0
- @solana/rpc-subscriptions-channel-websocket@2.1.0
- @solana/rpc-subscriptions-spec@2.1.0
- @solana/rpc-subscriptions-api@2.1.0
- @solana/rpc-transformers@2.1.0
- @solana/fast-stable-stringify@2.1.0
- @solana/functional@2.1.0
- @solana/promises@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/rpc-subscriptions-api@2.1.0
Patch Changes
- Updated dependencies [
1adf435,d1c787c,0c577eb,9b179dc,29d1e28,400f4d5,704d8a2]:- @solana/addresses@2.1.0
- @solana/keys@2.1.0
- @solana/rpc-types@2.1.0
- @solana/rpc-subscriptions-spec@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/transactions@2.1.0
- @solana/rpc-transformers@2.1.0
@solana/rpc-subscriptions-channel-websocket@2.1.0
Patch Changes
-
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
Updated dependencies [
1adf435,c7b7dd9,29d1e28,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/subscribable@2.1.0
- @solana/rpc-subscriptions-spec@2.1.0
- @solana/functional@2.1.0
@solana/rpc-subscriptions-spec@2.1.0
Patch Changes
-
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
Updated dependencies [
1adf435,c7b7dd9,29d1e28,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/subscribable@2.1.0
- @solana/promises@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/rpc-transformers@2.1.0
Patch Changes
- Updated dependencies [
1adf435,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/errors@2.1.0
- @solana/rpc-types@2.1.0
- @solana/functional@2.1.0
- @solana/rpc-spec-types@2.1.0
@solana/rpc-types@2.1.0
Patch Changes
-
9b179dcThanks @lorisleiva! - Add missingspaceattribute toAccountInfoBaseandBaseAccount -
#153
400f4d5Thanks @steveluscher! - The values of therewardTypeproperty have been corrected. They previously were specified as having a lowercase initial character. -
Updated dependencies [
1adf435,0c577eb,c7b7dd9,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
@solana/signers@2.1.0
Patch Changes
-
#151
a1e45a1Thanks @lorisleiva! -addSignersToTransactionMessagenow upgradesfeePayerto a signer when applicable -
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
Updated dependencies [
1adf435,d1c787c,0c577eb,c7b7dd9,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/instructions@2.1.0
- @solana/transactions@2.1.0
@solana/subscribable@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
Updated dependencies [
1adf435,c7b7dd9,5af7f20,704d8a2]:- @solana/errors@2.1.0
@solana/transaction-confirmation@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
29d1e28Thanks @steveluscher! - Disabled theMaxListenersExceededWarningin Node when creating event targets for internal use -
Updated dependencies [
1adf435,d1c787c,0c577eb,c7b7dd9,9b179dc,29d1e28,400f4d5,5af7f20,70eb596,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/rpc-types@2.1.0
- @solana/rpc-subscriptions@2.1.0
- @solana/rpc@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/transactions@2.1.0
- @solana/promises@2.1.0
@solana/transaction-messages@2.1.0
Patch Changes
-
704d8a2Thanks @mcintyre94! - Changedatafield of transaction message instructions to useReadonlyUint8Array -
Updated dependencies [
1adf435,0c577eb,cfe6910,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-data-structures@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/errors@2.1.0
- @solana/rpc-types@2.1.0
- @solana/instructions@2.1.0
- @solana/functional@2.1.0
@solana/transactions@2.1.0
Patch Changes
- Updated dependencies [
1adf435,d1c787c,0c577eb,cfe6910,c7b7dd9,9b179dc,400f4d5,5af7f20,704d8a2]:- @solana/addresses@2.1.0
- @solana/codecs-core@2.1.0
- @solana/codecs-data-structures@2.1.0
- @solana/codecs-numbers@2.1.0
- @solana/codecs-strings@2.1.0
- @solana/errors@2.1.0
- @solana/keys@2.1.0
- @solana/rpc-types@2.1.0
- @solana/transaction-messages@2.1.0
- @solana/instructions@2.1.0
- @solana/functional@2.1.0
@solana/webcrypto-ed25519-polyfill@2.1.0
Patch Changes
-
1adf435Thanks @leantOnSol! - A two-versions-old version of Node LTS is now specified everywhere via theenginesfield, including the one in the root of thepnpmworkspace, and engine-strictness is delegated to the.npmrcfiles. -
#59
710e571Thanks @steveluscher! - Fixed a bug where specifyingEd25519in a different case, or as an object{ name: 'Ed25519' }would cause key operations to be delegated to the underlying runtime instead of the polyfill