Releases: solana-foundation/solana-web3.js
The New web3.js - Release Candidate `rc.4`
v2.0.0-rc.4 (2024-11-05)
This version fixes a bug with program error decoding that we introduced in Release Candidate 2. We now expect this, Release Candidate 4, to be the final version before tagging version 2.0 of @solana/web3.js. Please submit any final bug reports before Thursday, November 7th by filing a GitHub Issue.
To install the Release Candidate:
npm install --save @solana/web3.js@rc- Try the runnable examples in the
examples/directory to get a feel for the API. - Use the example dApp at https://solana-labs.github.io/solana-web3.js/example/ – source available here – for an example of how to build transactions with the new web3.js for use with wallets.
- Install TypeScript clients for on-chain programs like System and Token, then build a useful application or backend service.
Changelog since Release Candidate rc.3
- #3519
2798061Thanks @lorisleiva! - Accept bigints in RPC error factories, fixing functions such asisProgramError
The New web3.js - Release Candidate `rc.3`
v2.0.0-rc.3 (2024-10-31)
This version fixes a bug with RPC subscriptions that we introduced in Release Candidate 2. We now expect this, Release Candidate 3, to be the final version before tagging version 2.0 of @solana/web3.js. Please submit any final bug reports before Thursday, November 7th by filing a GitHub Issue.
To install the Release Candidate:
npm install --save @solana/web3.js@rc- Try the runnable examples in the
examples/directory to get a feel for the API. - Use the example dApp at https://solana-labs.github.io/solana-web3.js/example/ – source available here – for an example of how to build transactions with the new web3.js for use with wallets.
- Install TypeScript clients for on-chain programs like System and Token, then build a useful application or backend service.
Changelog since Release Candidate rc.2
- #3507
45df702Thanks @mcintyre94! - Fixed a bug where the subcription server's response would not be detected, because of a mismatch in the format of theid. Now all RPC message ids are strings, for avoidance of doubt.
The New web3.js - Release Candidate `rc.2`
v2.0.0-rc.2 (2024-10-31)
We expect this to be the final release candidate version before tagging version 2.0 of @solana/web3.js. Please submit any final bug reports before Thursday, November 7th by filing a GitHub Issue.
To install the Release Candidate:
npm install --save @solana/web3.js@rc- Try the runnable examples in the
examples/directory to get a feel for the API. - Use the example dApp at https://solana-labs.github.io/solana-web3.js/example/ – source available here – for an example of how to build transactions with the new web3.js for use with wallets.
- Install TypeScript clients for on-chain programs like System and Token, then build a useful application or backend service.
Changelog since Release Candidate rc.1
-
#3213
3fc388fThanks @mcintyre94! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export -
#3137
fd72c2eThanks @mcintyre94! - The build is now compatible with the Vercel Edge runtime and Cloudflare Workers through the addition ofedge-lightandworkerdto the package exports. -
#3251 Thanks @ryoid! -
isAddress()no longer throws despite that the input might be unparseable as a base-58 string. Now, it correctly, simply, returnsfalse. -
#3361
441fa3aThanks @steveluscher! - Fixed a bug where calls toisEd25519CurveSupported()might have resulted in uncaught rejections bubbling up through the app, in cases where Ed25519 is not supported -
#3134
38faba0Thanks @buffalojoec! - Change unix timestamp type to bigint with an unsafe label -
#3128
0158b31Thanks @lorisleiva! - Fix missing export in@solana/keyspackage. This means, thegetPublicKeyFromPrivateKeyfunction is now properly exported. -
#3407
10b08acThanks @lorisleiva! - UseRpcRequest,RpcResponseand their transformers in RPC Subscriptions packagesThis change makes the RPC and RPC Subscriptions architecture more consistent by using the same
RpcRequestandRpcResponsetypes and transformers as the basis for handling user requests (RPC calls or subscriptions) and returning responses to them.See the following PRs for more details:
-
#3453
bafefedThanks @mcintyre94! - Rename decodeTransactionMessage to decompileTransactionMessageFetchingLookupTables -
#3290
2368163Thanks @mcintyre94! - Throw an error if a transaction fails when being simulated to estimate CUs -
#3145
1c25dd4Thanks @lorisleiva! - RenameRpcResponsetype toRpcResponseDatato make room for a newRpcResponsetype -
#3213
3fc388fThanks @mcintyre94! - Clean up SolanaRpcApi: no longer extend RpcApiMethods + remove export -
#3454
1fde4b1Thanks @mcintyre94! - Correct type of replacementBlockhash in simulateTransaction -
#3456
0245265Thanks @lorisleiva! - RemoveUnsafeBeyond2Pow53Minus1type suffixes -
#3150
a705413Thanks @lorisleiva! - MakeRpcApiuse newRpcRequestTransformerandRpcResponseTransformer -
#3202
bf07a60Thanks @disco-infinex! - PerformanceSample return type field numNonVoteTransaction corrected to numNonVoteTransactions -
#3161
9dfca45Thanks @lorisleiva! - AddgetIntegerOverflowRequestTransformer,getBigIntDowncastRequestTransformerandgetTreeWalkerRequestTransformerhelpers -
#3134
38faba0Thanks @buffalojoec! - Change unix timestamp type to bigint with an unsafe label -
#3148
e1cb697Thanks @lorisleiva! - MakeRpcTransportreturn newRpcReponsetype instead of parsed JSON data -
#3201
02cefa7Thanks @lorisleiva! - Update the response type of thegetClusterNodesRPC method -
#3098
2f541b6Thanks @buffalojoec! - Update program accounts filters forprogramAccountsquery -
#3221
6b43588Thanks @lorisleiva! - Add newisJsonRpcPayloadhelper method -
c8e6e71Thanks @steveluscher! - We refactored the lower levels of the subscriptions API entirely.Previously, all layers of the subscriptions implementation, from the
WebSockettransport to the API that developers use, dealt inAsyncIterables. These are notoriously difficult to code in such a way that expresses all of the ways in which a subscription might be cancelled or error out. Very slight omissions of care could open memory leaks that would bring down the simplest of apps. The new subscriptions infra in Release Candidate 2 deals with event-based subscriptions all the way up to the highest level API, at which point the subscription is vended to the application as anAsyncIterable.This has eliminated several classes of memory leak and has made it easier to implement higher-level transports (like the autopinger and the subscription coalescer). Additionally, this update introduces a new channel pool implementation that opens new
WebSocketconnections when existing ones become ‘full.’ Lastly, performance in the new implementation has been improved through a new demultiplexing utility that can separatemessageevents into several channels based on arbitrary criteria, meaning you can apply transforms to the message right at the source, and vend subscriptions to downstream consumers that care only about one particular kind of message...
v1.95.4
v1.95.3
The New web3.js - Release Candidate `rc.1`
v2.0.0-rc.1 (2024-08-09)
Since we published the first Release Candidate of @solana/[email protected] your feedback has helped us to catch bugs that we missed during development. A special thank you today to @WilfredAlmeida the reports that led to the fixes in this, updated Release Candidate rc.1.
Also new in this release are handy tools that help you load key pairs and to derive public CryptoKey instances from private CryptoKey instances.
To install the Release Candidate:
npm install --save @solana/web3.js@rc- Try the runnable examples in the
examples/directory to get a feel for the API. - Use the example dApp at https://solana-labs.github.io/solana-web3.js/example/ – source available here – for an example of how to build transactions with the new web3.js for use with wallets.
- Install TypeScript clients for on-chain programs like System and Token, then build a useful application or backend service.
Before the general release of web3.js, shortly before Breakpoint 2024 in September, we want to collect as much feedback as possible from you. If you find a bug, are missing a feature, or would like an API modified, file a GitHub Issue.
Changelog since Release Candidate rc.0
-
#3050
7d310f6Thanks @lorisleiva! - Add acreateKeyPairFromPrivateKeyByteshelper that creates a keypair from the 32-byte private key bytes.import { createKeyPairFromPrivateKeyBytes } from '@solana/keys'; const { privateKey, publicKey } = await createKeyPairFromPrivateKeyBytes(new Uint8Array([...]));
-
#3049
f9a8446Thanks @lorisleiva! - Add agetPublicKeyFromPrivateKeyhelper that, given an extractableCryptoKeyprivate key, gets the corresponding public key as aCryptoKey.import { createPrivateKeyFromBytes, getPublicKeyFromPrivateKey } from '@solana/keys'; const privateKey = await createPrivateKeyFromBytes(new Uint8Array([...]), true); const publicKey = await getPublicKeyFromPrivateKey(privateKey); const extractablePublicKey = await getPublicKeyFromPrivateKey(privateKey, true);
-
#3051
1ad523dThanks @lorisleiva! - Add acreateKeyPairSignerFromPrivateKeyByteshelper that composecreateKeyPairFromPrivateKeyBytesandcreateSignerFromKeyPair. -
#3071
b4bf318Thanks @steveluscher! - Created a helper that you can use to race two or more promises without having to worry about them leaking memory -
#3070
f2bb4e8Thanks @steveluscher! - Created a package for dealing with JavaScript Promises, and copied the implementation ofgetAbortablePromiseinto it -
#3072
c122c75Thanks @steveluscher! - Fixed a memory leak with transaction confirmation and subscriptions
The New web3.js - Release Candidate
v2.0.0-rc.0 (2024-07-31)
This is an open invitation to test out what we intend to release as v2.0. Your feedback in these final moments before release will help us catch any bugs and rough edges that we missed during development.
To install the Release Candidate:
npm install --save @solana/web3.js@rc- Try the runnable examples in the
examples/directory to get a feel for the API. - Use the example dApp at https://solana-labs.github.io/solana-web3.js/example/ – source available here – for an example of how to build transactions with the new web3.js for use with wallets.
- Install TypeScript clients for on-chain programs like System and Token, then build a useful application or backend service.
Before the general release of web3.js, shortly before Breakpoint 2024 in September, we want to collect as much feedback as possible from you. If you find a bug, are missing a feature, or would like an API modified, file a GitHub Issue.
Changelog since Technology Preview 4
- #2907
677a9c4Thanks @steveluscher! -__DEV__mode will now be the default if you don't setprocess.env.NODE_ENVat all. This means fewer people ‘accidentally’ finding themselves in production mode with minified error messages. - #2905
56fde06Thanks @steveluscher! - Fixed the type ofconfigongetComputeUnitEstimateForTransactionMessage. It is now optional and does not includetransactionMessage. - #2968
9239e6eThanks @lorisleiva! - Tighten return type of isProgramError - #2928
bac3747Thanks @steveluscher! - Added auseSignInhook that, given aUiWalletorUiWalletAccount, returns a function that you can call to trigger a wallet's ‘Sign In With Solana’ feature. - #2950
29821dfThanks @mcintyre94! - Refactor rpc-spec to remove requirement for transports to implement parts of JSON RPC spec - #2910
42a70f4Thanks @Jac0xb! - Fixed a bug where the RPC would fail to throw errors in the event that you configured it with anAbortSignal - #2969
419c12eThanks @mcintyre94! - Add a function to replace accounts in a transaction message using lookup tables - #2905
56fde06Thanks @steveluscher! - Fixed the type ofconfigongetComputeUnitEstimateForTransactionMessage. It is now optional and does not includetransactionMessage.