-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Overview
While using the latest version of @solana/web3.js (^2.0.0-rc.0 and ^2.0.0-rc.4), I was unable to find the sendAndConfirmTransaction function, which is a critical method for submitting and confirming transactions in Solana applications. Instead, I discovered alternative functions with internal naming conventions that suggest they are not intended for general use, such as:
sendAndConfirmTransactionFactorysendAndConfirmDurableNonceTransactionFactorysendAndConfirmTransactionWithBlockhashLifetime_INTERNAL_ONLY_DO_NOT_EXPORTsendAndConfirmDurableNonceTransaction_INTERNAL_ONLY_DO_NOT_EXPORT
This appears to be an unintended omission or a breaking change that is not documented.
Steps to reproduce
- Install the latest
@solana/web3.jspackage using npm:npm install @solana/web3.js@^2.0.0-rc.0
- Attempt to import and use the
sendAndConfirmTransactionfunction:const { sendAndConfirmTransaction } = require('@solana/web3.js'); console.log(sendAndConfirmTransaction); // Expected: function definition, Actual: undefined
- Search through the library exports to verify if the function exists:
const solanaWeb3 = require('@solana/web3.js'); console.log(Object.keys(solanaWeb3));
Description of bug
The sendAndConfirmTransaction function is absent in the latest release candidates (^2.0.0-rc.0 and ^2.0.0-rc.4). This function is essential for users of the library, and its absence is unexpected. Based on the library exports, only factory methods and internal methods appear to be available, none of which provide clear documentation or guidance for users.
This breaks existing codebases that rely on the previous stable versions of @solana/web3.js. Additionally, the lack of documentation regarding this change exacerbates the issue.
Environment Details
- Node.js version:
v20.11.1 - npm version:
10.4.0 @solana/web3.jsversion:^2.0.0-rc.0and^2.0.0-rc.4